Package diva.canvas
Interface CanvasComponent
-
- All Known Subinterfaces:
Connector
,EventAcceptor
,Figure
,FigureContainer
,GrabHandle
,ShapedFigure
,Terminal
,VisibleComponent
- All Known Implementing Classes:
AbstractConnector
,AbstractFigure
,AbstractFigureContainer
,ArcConnector
,ArcManipulator
,AttributeBoundsManipulator
,BasicCanvasPane
,BasicEdgeHighlighter
,BasicEllipse
,BasicFigure
,BasicGrabHandle
,BasicGraphPane
,BasicHighlighter
,BasicRectangle
,BoundsManipulator
,BubblePane
,CanvasLayer
,CanvasPane
,CircleManipulator
,CompositeFigure
,ConnectorManipulator
,ConnectorTutorial.SitedRectangle
,EventLayer
,FigureDecorator
,FigureLayer
,FigureTutorial.CustomRectangle
,FigureWrapper
,GraphicsPane
,GraphPane
,GridLayer
,IconFigure
,ImageFigure
,KielerLayoutArcConnector
,KielerLayoutConnector
,LabelFigure
,LabelWrapper
,LinkManhattanConnector
,ManhattanConnector
,Manipulator
,MoveHandle
,OverlayLayer
,PaintedFigure
,PaneWrapper
,PathFigure
,PathManipulator
,PortTerminal
,RelativeLinkFigure
,RoundedRectangle
,ShadowHighlighter
,SimplePane
,StateBubble
,StraightConnector
,StraightTerminal
,SwingWrapper
,TerminalFigure
,TransformedFigureTutorial.CloudFigure
,TypedDecorator
,VectorFigure
public interface CanvasComponent
A CanvasComponent is an object that can be inserted into the display tree of a JCanvas. The tree is rooted by an instance of CanvasPane, then consists of CanvasLayers, Figures, and other kinds of recursively-structured CanvasComponents.- Version:
- $Id$
- Author:
- John Reekie
- Pt.AcceptedRating:
- Yellow
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CanvasComponent
getParent()
Return the parent of this component.TransformContext
getTransformContext()
Return the transform context of the component.void
repaint()
Schedule a repaint of the component.void
repaint(DamageRegion damageRegion)
Accept notification that a repaint has occurred somewhere in the tree below this component.
-
-
-
Method Detail
-
getParent
CanvasComponent getParent()
Return the parent of this component. Return null if the component does not have a parent.- Returns:
- The parent of this component.
-
getTransformContext
TransformContext getTransformContext()
Return the transform context of the component. If the component has its own transform context, this method should return it, otherwise it should return the transform context of its parent.- Returns:
- The transform context of this component.
-
repaint
void repaint()
Schedule a repaint of the component. This should be called after performing modifications on the component.
-
repaint
void repaint(DamageRegion damageRegion)
Accept notification that a repaint has occurred somewhere in the tree below this component. The component must clear any cached data that depends on its children and forward the notification upwards.- Parameters:
damageRegion
- The region where a repaint has occurred.
-
-