|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.CanvasPane
diva.canvas.GraphicsPane
public class GraphicsPane
A CanvasPane which has a default set of layers that are useful for interactive drawing and editing applications. The layers are organized as follows:
(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:
Yellow |
Field Summary | |
---|---|
protected EventLayer |
_backgroundEventLayer
|
protected CanvasLayer |
_backgroundLayer
|
protected EventLayer |
_foregroundEventLayer
|
protected FigureLayer |
_foregroundLayer
|
protected CanvasLayer[] |
_layers
|
protected OverlayLayer |
_overlayLayer
|
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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 |
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 |
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 |
Methods inherited from class diva.canvas.CanvasPane |
---|
_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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected CanvasLayer[] _layers
protected EventLayer _foregroundEventLayer
protected OverlayLayer _overlayLayer
protected FigureLayer _foregroundLayer
protected CanvasLayer _backgroundLayer
protected EventLayer _backgroundEventLayer
Constructor Detail |
---|
public GraphicsPane()
public GraphicsPane(FigureLayer foregroundLayer)
Method Detail |
---|
public EventLayer getBackgroundEventLayer()
public CanvasLayer getBackgroundLayer()
public FigureLayer getForegroundLayer()
public OverlayLayer getOverlayLayer()
public EventLayer getForegroundEventLayer()
public java.util.Iterator layersFromFront()
layersFromFront
in class CanvasPane
public java.util.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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |