- All Known Subinterfaces:
- All Known Implementing Classes:
public interface CanvasComponentA 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.
- John Reekie
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
getParent()Return the parent of this component.
getTransformContext()Return the transform context of the component.
repaint()Schedule a repaint of the component.
repaint(DamageRegion damageRegion)Accept notification that a repaint has occurred somewhere in the tree below this component.
CanvasComponent getParent()Return the parent of this component. Return null if the component does not have a parent.
- The parent of this component.
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.
- The transform context of this component.
void repaint()Schedule a repaint of the component. This should be called after performing modifications on the component.
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.
damageRegion- The region where a repaint has occurred.