|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tigris.gef.base.Layer
org.tigris.gef.base.LayerDiagram
A Layer like found in many drawing applications. It contains a collection of Fig's, ordered from back to front. Each LayerDiagram contains part of the overall picture that the user is drawing. Needs-More-Work: eventually add a "Layers" menu to the Editor. FEATURE: graph_visualization
Field Summary | |
protected static int |
_nextLayerNumbered
A counter so that layers have default names like 'One', 'Two', ... |
Fields inherited from class org.tigris.gef.base.Layer |
_onMenu |
Constructor Summary | |
LayerDiagram()
Construct a new LayerDiagram with a default name and do not put it on the Layer's menu. |
|
LayerDiagram(java.lang.String name)
Construct a new LayerDiagram with the given name, and add it to the menu of layers. |
Method Summary | |
void |
add(org.tigris.gef.presentation.Fig f)
Add a Fig to the contents of this layer. |
void |
bringForward(org.tigris.gef.presentation.Fig f)
Reorder the given Fig in this layer. |
void |
bringInFrontOf(org.tigris.gef.presentation.Fig f1,
org.tigris.gef.presentation.Fig f2)
Reorder the given Fig in this layer. |
void |
bringToFront(org.tigris.gef.presentation.Fig f)
Reorder the given Fig in this layer. |
java.util.Enumeration |
elements()
|
java.util.List |
getContents()
Reply the contents of this layer. |
java.util.Collection |
getContents(java.util.Collection c)
Reply the contents of this layer. |
org.tigris.gef.presentation.FigNode |
getPortFig(java.lang.Object port)
Find the FigNode that is being used to visualize the given NetPort, or null if there is none in this layer. |
org.tigris.gef.presentation.Fig |
hit(java.awt.Rectangle r)
Reply the 'top' Fig under the given (mouse) coordinates. |
int |
indexOf(org.tigris.gef.presentation.Fig f)
Add a Fig to the contents of this layer. |
void |
insertAt(org.tigris.gef.presentation.Fig f,
int index)
Add a Fig to the contents of this layer. |
protected static java.lang.String |
numberWordFor(int n)
A utility function to give the spelled-out word for numbers. |
void |
paintContents(java.awt.Graphics g)
Paint all the Fig's that belong to this layer. |
void |
paintContents(java.awt.Graphics g,
org.tigris.gef.presentation.FigPainter painter)
Paint all the Fig's that belong to this layer using a given FigPainter. |
void |
postLoad()
|
void |
postSave()
|
void |
preSave()
|
int |
presentationCountFor(java.lang.Object obj)
|
org.tigris.gef.presentation.Fig |
presentationFor(java.lang.Object obj)
Find the Fig that visualized the given NetNode in this layer, or null if there is none. |
void |
remove(org.tigris.gef.presentation.Fig f)
Remove the given Fig from this layer. |
void |
removeAll()
Delete all Fig's from this layer. |
void |
reorder(org.tigris.gef.presentation.Fig f,
int function)
Reorder the given Fig in this layer. |
void |
sendBackward(org.tigris.gef.presentation.Fig f)
Reorder the given Fig in this layer. |
void |
sendToBack(org.tigris.gef.presentation.Fig f)
Reorder the given Fig in this layer. |
Methods inherited from class org.tigris.gef.base.Layer |
addEditor, adjust, calcDrawingArea, clone, damageAll, deleted, elementsIn, getContentsEdgesOnly, getContentsNoEdges, getEditors, getGrayed, getHidden, getLocked, getName, getOnMenu, getPerspectiveType, getScale, isAlwaysOnTop, nodesIn, paint, paint, paintGrayContents, print, refreshEditors, removeEditor, setAlwaysOnTop, setGrayed, setHidden, setLocked, setName, setOnMenu, setPerspectiveType, setScale, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static int _nextLayerNumbered
Constructor Detail |
public LayerDiagram()
public LayerDiagram(java.lang.String name)
Method Detail |
public java.util.Enumeration elements()
elements
in class Layer
protected static java.lang.String numberWordFor(int n)
public void add(org.tigris.gef.presentation.Fig f)
add
in class Layer
f
- the fig to add
java.lang.IllegalArgumentException
- if the fig is nullLayerDiagram
public void insertAt(org.tigris.gef.presentation.Fig f, int index)
f
- the fig to insert
java.lang.IllegalArgumentException
- if the fig is nullpublic int indexOf(org.tigris.gef.presentation.Fig f)
f
- the fig to insert
java.lang.IllegalArgumentException
- if the fig is nullpublic void remove(org.tigris.gef.presentation.Fig f)
remove
in class Layer
public java.util.Collection getContents(java.util.Collection c)
getContents
in class Layer
c
- the collection in which to place the edges or null
if a new collection should be created
public java.util.List getContents()
getContents
in class Layer
public org.tigris.gef.presentation.Fig hit(java.awt.Rectangle r)
hit
in class Layer
public void removeAll()
removeAll
in class Layer
public org.tigris.gef.presentation.FigNode getPortFig(java.lang.Object port)
public org.tigris.gef.presentation.Fig presentationFor(java.lang.Object obj)
presentationFor
in class Layer
public int presentationCountFor(java.lang.Object obj)
public void paintContents(java.awt.Graphics g)
paintContents
in class Layer
public void paintContents(java.awt.Graphics g, org.tigris.gef.presentation.FigPainter painter)
paintContents
in class Layer
public void sendToBack(org.tigris.gef.presentation.Fig f)
sendToBack
in class Layer
public void bringToFront(org.tigris.gef.presentation.Fig f)
bringToFront
in class Layer
public void sendBackward(org.tigris.gef.presentation.Fig f)
sendBackward
in class Layer
public void bringForward(org.tigris.gef.presentation.Fig f)
bringForward
in class Layer
public void bringInFrontOf(org.tigris.gef.presentation.Fig f1, org.tigris.gef.presentation.Fig f2)
bringInFrontOf
in class Layer
public void reorder(org.tigris.gef.presentation.Fig f, int function)
reorder
in class Layer
public void preSave()
preSave
in class Layer
public void postSave()
postSave
in class Layer
public void postLoad()
postLoad
in class Layer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |