|
||||||||||
| 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
public class 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 |
|---|
_editors, _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(Fig f)
Add a Fig to the contents of this layer. |
void |
bringForward(Fig f)
Reorder the given Fig in this layer. |
void |
bringInFrontOf(Fig f1,
Fig f2)
Reorder the given Fig in this layer. |
void |
bringToFront(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. |
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. |
Fig |
hit(java.awt.Rectangle r)
Reply the 'top' Fig under the given (mouse) coordinates. |
int |
indexOf(Fig f)
Add a Fig to the contents of this layer. |
void |
insertAt(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,
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)
|
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(Fig f)
Remove the given Fig from this layer. |
void |
removeAll()
Delete all Fig's from this layer. |
void |
reorder(Fig f,
int function)
Reorder the given Fig in this layer. |
void |
sendBackward(Fig f)
Reorder the given Fig in this layer. |
void |
sendToBack(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 Layerprotected static java.lang.String numberWordFor(int n)
public void add(Fig f)
add in class Layerf - the fig to add
java.lang.IllegalArgumentException - if the fig is nullLayerDiagram
public void insertAt(Fig f,
int index)
f - the fig to insert
java.lang.IllegalArgumentException - if the fig is nullpublic int indexOf(Fig f)
f - the fig to insert
java.lang.IllegalArgumentException - if the fig is nullpublic void remove(Fig f)
remove in class Layerpublic java.util.Collection getContents(java.util.Collection c)
getContents in class Layerc - 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 Layerpublic Fig hit(java.awt.Rectangle r)
hit in class Layerpublic void removeAll()
removeAll in class Layerpublic FigNode getPortFig(java.lang.Object port)
public Fig presentationFor(java.lang.Object obj)
presentationFor in class Layerpublic int presentationCountFor(java.lang.Object obj)
public void paintContents(java.awt.Graphics g)
paintContents in class Layer
public void paintContents(java.awt.Graphics g,
FigPainter painter)
paintContents in class Layerpublic void sendToBack(Fig f)
sendToBack in class Layerpublic void bringToFront(Fig f)
bringToFront in class Layerpublic void sendBackward(Fig f)
sendBackward in class Layerpublic void bringForward(Fig f)
bringForward in class Layer
public void bringInFrontOf(Fig f1,
Fig f2)
bringInFrontOf in class Layer
public void reorder(Fig f,
int function)
reorder in class Layerpublic void preSave()
preSave in class Layerpublic void postSave()
postSave in class Layerpublic void postLoad()
postLoad in class Layer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||