public class GraphicsPane extends CanvasPane
(front) Foreground event Overlay Foreground graphics Background graphics Background eventThis organization allows applications to easily overlay and underlay graphics and event handling around the main application window.
Typical uses of each of these layers include:
Modifier and Type | Field and Description |
---|---|
protected EventLayer |
_backgroundEventLayer |
protected CanvasLayer |
_backgroundLayer |
protected EventLayer |
_foregroundEventLayer |
protected FigureLayer |
_foregroundLayer |
protected CanvasLayer[] |
_layers |
protected OverlayLayer |
_overlayLayer |
Constructor and Description |
---|
GraphicsPane()
Create a new Graphics pane with an instance of
FigureLayer as the main figure layer.
|
GraphicsPane(FigureLayer foregroundLayer)
Create a new Graphics pane with the passed Layer
as the main graphics pane.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_rebuildLayerArray()
Rebuild the array of layers for use by iterators
|
EventLayer |
getBackgroundEventLayer()
Get the background event layer
|
CanvasLayer |
getBackgroundLayer()
Get the background layer
|
EventLayer |
getForegroundEventLayer()
Get the foreground event layer
|
FigureLayer |
getForegroundLayer()
Get the foreground layer
|
OverlayLayer |
getOverlayLayer()
Get the overlay layer
|
Iterator |
layersFromBack()
Return an iteration of the layers, in redraw order (that is,
from back to front).
|
Iterator |
layersFromFront()
Return an iteration of the layers, in event-processing order
(that is, from front to back).
|
void |
setBackgroundEventLayer(EventLayer l)
Set the background event layer
|
void |
setBackgroundLayer(CanvasLayer l)
Set the background figure layer
|
void |
setForegroundEventLayer(EventLayer l)
Set the foreground event layer
|
void |
setForegroundLayer(FigureLayer l)
Set the foreground figure layer
|
void |
setOverlayLayer(OverlayLayer l)
Set the overlay 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
protected CanvasLayer[] _layers
protected EventLayer _foregroundEventLayer
protected OverlayLayer _overlayLayer
protected FigureLayer _foregroundLayer
protected CanvasLayer _backgroundLayer
protected EventLayer _backgroundEventLayer
public GraphicsPane()
public GraphicsPane(FigureLayer foregroundLayer)
public EventLayer getBackgroundEventLayer()
public CanvasLayer getBackgroundLayer()
public FigureLayer getForegroundLayer()
public OverlayLayer getOverlayLayer()
public EventLayer getForegroundEventLayer()
public Iterator layersFromFront()
layersFromFront
in class CanvasPane
public Iterator layersFromBack()
layersFromBack
in class CanvasPane
public void setBackgroundEventLayer(EventLayer l)
public void setBackgroundLayer(CanvasLayer l)
public void setForegroundLayer(FigureLayer l)
public void setOverlayLayer(OverlayLayer l)
public void setForegroundEventLayer(EventLayer l)
protected void _rebuildLayerArray()
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.