Package 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
,KielerLayoutArcConnector
,KielerLayoutConnector
,LabelFigure
,LabelWrapper
,LinkManhattanConnector
,ManhattanConnector
,Manipulator
,MoveHandle
,OverlayLayer
,PaintedFigure
,PaneWrapper
,PathFigure
,PathManipulator
,PortTerminal
,RelativeLinkFigure
,RoundedRectangle
,ShadowHighlighter
,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$
- Author:
- John Reekie
- Pt.AcceptedRating:
- Yellow
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isVisible()
Test the visibility flag of this object.void
paint(java.awt.Graphics2D graphics2D)
Paint this object onto a 2D graphics object.void
paint(java.awt.Graphics2D graphics2D, 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.-
Methods inherited from interface diva.canvas.CanvasComponent
getParent, getTransformContext, repaint, repaint
-
-
-
-
Method Detail
-
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.- Returns:
- true if the object is visible.
-
paint
void paint(java.awt.Graphics2D graphics2D)
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.- Parameters:
graphics2D
- The 2D graphics object that this object it to be painted upon.
-
paint
void paint(java.awt.Graphics2D graphics2D, 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.- Parameters:
graphics2D
- The 2D graphics object that this object it to be painted upon.region
- The region.
-
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.- Parameters:
flag
- True if this object is to be visible.
-
-