|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tigris.gef.base.LayerManager
This class implements a kind of Layer that contains other Layers. Layer's can be nested in an is-part-of tree. That tree can be walked to paint the contents of the view, find what the user clicked on, find a layer by name, save the contents to a file, etc.
Field Summary | |
protected Layer |
_activeLayer
In most editors one Layer is the active layer and all mouse clicks go to the contents of that layer. |
Editor |
_editor
|
protected java.util.List |
_layers
The Layer's contained within this LayerManager. |
Constructor Summary | |
LayerManager(Editor editor)
Construct a new LayerManager with no sublayers. |
Method Summary | |
void |
add(org.tigris.gef.presentation.Fig f)
When the user tries to add a new Fig to a LayerManager, pass that addition along to my active layer. |
void |
addLayer(Layer lay)
|
void |
addLayer(Layer lay,
boolean makeActive)
Add a sublayer to this layer. |
void |
bringForward(org.tigris.gef.presentation.Fig f)
See comments above, this message is passed to my active layer. |
void |
bringToFront(org.tigris.gef.presentation.Fig f)
See comments above, this message is passed to my active layer. |
java.util.Enumeration |
elements()
See comments above, this message is passed to my active layer. |
Layer |
findLayerNamed(java.lang.String aName)
Find a layer with the given name somewhere in the layer tree. |
Layer |
getActiveLayer()
Reply which layer is the active one. |
java.util.Collection |
getContents(java.util.Collection c)
When an editor or some tool wants to look at all the Figs that are contained in this layer, reply the contents of my active layer. |
Editor |
getEditor()
|
boolean |
getPaintActiveOnly()
|
boolean |
getPaintLayers()
|
org.tigris.gef.presentation.Fig |
hit(java.awt.Rectangle r)
See comments above, this message is passed to my active layer. |
void |
paint(java.awt.Graphics g)
Paint the contents of this LayerManager by painting all layers. |
void |
paint(java.awt.Graphics g,
org.tigris.gef.presentation.FigPainter painter)
Paint the contents of this LayerManager using a given painter by painting all layers. |
void |
postLoad()
|
void |
postSave()
|
void |
preSave()
|
org.tigris.gef.presentation.Fig |
presentationFor(java.lang.Object obj)
Try to find a FigNode instance that presents the given Net-level object. |
void |
remove(org.tigris.gef.presentation.Fig f)
When the user tries to remove a new Fig from a LayerManager, pass that removal along to my active layer. |
void |
removeAll()
See comments above, this message is passed to my active layer. |
void |
removeAllLayers()
|
void |
removeLayer(Layer lay)
Remove a sublayer to this layer. |
void |
reorder(org.tigris.gef.presentation.Fig f,
int function)
See comments above, this message is passed to my active layer. |
void |
replaceActiveLayer(Layer layer)
|
void |
replaceLayer(Layer oldLayer,
Layer newLayer)
|
void |
sendBackward(org.tigris.gef.presentation.Fig f)
See comments above, this message is passed to my active layer. |
void |
sendToBack(org.tigris.gef.presentation.Fig f)
See comments above, this message is passed to my active layer. |
void |
setActiveLayer(Layer lay)
Make one of my layers the active one. |
void |
setEditor(Editor ed)
|
void |
setPaintActiveOnly(boolean activeOnly)
|
void |
setPaintLayers(boolean paintLayers)
|
void |
setScale(double scale)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.List _layers
protected Layer _activeLayer
public Editor _editor
Constructor Detail |
public LayerManager(Editor editor)
Method Detail |
public void addLayer(Layer lay, boolean makeActive)
public void addLayer(Layer lay)
public void removeAllLayers()
public void replaceLayer(Layer oldLayer, Layer newLayer)
public void replaceActiveLayer(Layer layer)
public void removeLayer(Layer lay)
public Layer findLayerNamed(java.lang.String aName)
public void setActiveLayer(Layer lay)
public Layer getActiveLayer()
public java.util.Collection getContents(java.util.Collection c)
public void paint(java.awt.Graphics g)
public void paint(java.awt.Graphics g, org.tigris.gef.presentation.FigPainter painter)
public void add(org.tigris.gef.presentation.Fig f)
public void remove(org.tigris.gef.presentation.Fig f)
public void removeAll()
public java.util.Enumeration elements()
public org.tigris.gef.presentation.Fig hit(java.awt.Rectangle r)
public org.tigris.gef.presentation.Fig presentationFor(java.lang.Object obj)
public void sendToBack(org.tigris.gef.presentation.Fig f)
public void bringForward(org.tigris.gef.presentation.Fig f)
public void sendBackward(org.tigris.gef.presentation.Fig f)
public void bringToFront(org.tigris.gef.presentation.Fig f)
public void reorder(org.tigris.gef.presentation.Fig f, int function)
public void setEditor(Editor ed)
public Editor getEditor()
public void preSave()
public void postSave()
public void postLoad()
public void setPaintActiveOnly(boolean activeOnly)
public boolean getPaintActiveOnly()
public void setPaintLayers(boolean paintLayers)
public boolean getPaintLayers()
public void setScale(double scale)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |