public class BasicCanvasPane extends CanvasPane
Modifier and Type | Field and Description |
---|---|
(package private) java.util.ArrayList |
_layers
The array of layers
|
Constructor and Description |
---|
BasicCanvasPane()
Create a new canvas pane with a single figure layer
at index zero.
|
BasicCanvasPane(CanvasLayer layer)
Create a new canvas pane with the given layer at index zero.
|
Modifier and Type | Method and Description |
---|---|
void |
addLayer(CanvasLayer layer)
Add the given layer to the list of layers.
|
void |
addLayer(int index,
CanvasLayer layer)
Insert the given layer into the list of layers at the
given index.
|
FigureLayer |
getLayer(int index)
Get the layer at the given index.
|
int |
indexOf(CanvasLayer layer)
Get the index of the given layer, or -1 if it is not
in this pane.
|
java.util.Iterator |
layersFromBack()
Return an iteration of the layers, in redraw order (that is,
from back to front).
|
java.util.Iterator |
layersFromFront()
Return an iteration of the layers, in event-processing order (that is,
from front to back).
|
void |
removeLayer(CanvasLayer layer)
Remove the given layer.
|
_initNewLayer, _nullifyLayer, dispatchEvent, getCanvas, getParent, getSize, getToolTipText, getTransformContext, isAntialiasing, isEnabled, layers, paint, paint, processLayerEvent, repaint, repaint, scale, setAntialiasing, setCanvas, setEnabled, setParent, setSize, setSize, setTransform, translate
public BasicCanvasPane()
public BasicCanvasPane(CanvasLayer layer)
public void addLayer(CanvasLayer layer)
public void addLayer(int index, CanvasLayer layer)
public FigureLayer getLayer(int index)
public int indexOf(CanvasLayer layer)
public java.util.Iterator layersFromFront()
layersFromFront
in class CanvasPane
public java.util.Iterator layersFromBack()
layersFromBack
in class CanvasPane
public void removeLayer(CanvasLayer layer)