diva.canvas
Interface VisibleComponent
- All Superinterfaces:
- CanvasComponent
- All Known Subinterfaces:
- Connector, Figure, FigureContainer, GrabHandle, ShapedFigure, Terminal
- All Known Implementing Classes:
- AbstractConnector, AbstractFigure, AbstractFigureContainer, ArcConnector, ArcManipulator, AttributeBoundsManipulator, BasicEdgeHighlighter, BasicEllipse, BasicFigure, BasicGrabHandle, BasicHighlighter, BasicRectangle, BoundsManipulator, CircleManipulator, CompositeFigure, ConnectorManipulator, ConnectorTutorial.SitedRectangle, FigureDecorator, FigureLayer, FigureTutorial.CustomRectangle, FigureWrapper, GridLayer, IconFigure, ImageFigure, LabelFigure, LabelWrapper, LinkManhattanConnector, ManhattanConnector, Manipulator, MoveHandle, OverlayLayer, PaintedFigure, PaneWrapper, PathFigure, PathManipulator, PortTerminal, RoundedRectangle, StateBubble, StraightConnector, StraightTerminal, SwingWrapper, TerminalFigure, TransformedFigureTutorial.CloudFigure, TypedDecorator, VectorFigure
public interface VisibleComponent
- extends CanvasComponent
A visible component is a canvas component that is painted onto a
graphics context. This interface contains a small set of methods
that are required by any such object. It is also used as a tagging
interface so that paint routines can tell whether certain objects
want to be painted or not.
- Version:
- $Id: VisibleComponent.java 38798 2005-07-08 20:00:01Z cxh $
- Author:
- John Reekie
- Accepted Rating:
Method Summary |
boolean |
isVisible()
Test the visibility flag of this object. |
void |
paint(java.awt.Graphics2D g2d)
Paint this object onto a 2D graphics object. |
void |
paint(java.awt.Graphics2D g,
java.awt.geom.Rectangle2D region)
Paint this object onto a 2D graphics object, within the given
region. |
void |
setVisible(boolean flag)
Set the visibility flag of this object. |
isVisible
boolean isVisible()
- Test the visibility flag of this object. Note that this flag
does not indicate whether the object is actually visible on
the screen, as one of its ancestors may not be visible.
paint
void paint(java.awt.Graphics2D g2d)
- Paint this object onto a 2D graphics object. Implementors
should first test if the visibility flag is set, and
paint the object if it is.
paint
void paint(java.awt.Graphics2D g,
java.awt.geom.Rectangle2D region)
- Paint this object onto a 2D graphics object, within the given
region. Implementors should first test if the visibility flag is
set, and paint the object if it is. The provided region can be
used to optimize the paint, but implementors can assume that the
clip region is correctly set beforehand.
setVisible
void setVisible(boolean flag)
- Set the visibility flag of this object. If the flag is false,
then the object will not be painted on the screen.