public abstract class CanvasLayer extends java.lang.Object implements CanvasComponent
Modifier and Type | Field and Description |
---|---|
(package private) CanvasPane |
_containingPane
The pane containing this layer.
|
Constructor and Description |
---|
CanvasLayer()
Create a new layer that is not in a pane.
|
CanvasLayer(CanvasPane pane)
Create a new layer within the given pane.
|
Modifier and Type | Method and Description |
---|---|
CanvasPane |
getCanvasPane()
Get the pane containing this layer.
|
java.awt.geom.Rectangle2D |
getLayerBounds()
Get the bounds of the shapes draw in this layer.
|
CanvasComponent |
getParent()
Get the parent component, or null if there isn't one.
|
java.lang.String |
getToolTipText(LayerEvent e)
Get the toolTipText for the point in the given MouseEvent.
|
TransformContext |
getTransformContext()
Return the transform context of the parent pane, if there is one.
|
void |
repaint()
Schedule a repaint of this layer.
|
void |
repaint(DamageRegion d)
Accept notification that a repaint has occurred somewhere
in this layer.
|
void |
setParent(CanvasComponent parent)
Set the parent component of this layer.
|
CanvasPane _containingPane
public CanvasLayer()
public CanvasLayer(CanvasPane pane)
pane
- The pane in which to create the layerpublic final CanvasPane getCanvasPane()
public java.awt.geom.Rectangle2D getLayerBounds()
public final CanvasComponent getParent()
getParent
in interface CanvasComponent
public java.lang.String getToolTipText(LayerEvent e)
e
- The layer event, ignored in this class.public final TransformContext getTransformContext()
getTransformContext
in interface CanvasComponent
public void repaint()
repaint
in interface CanvasComponent
public void repaint(DamageRegion d)
repaint
in interface CanvasComponent
d
- The region where a repaint has occurred.public final void setParent(CanvasComponent parent)
parent
- The parent of this layer