|
||||||||||
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.LayerGrid
Paint a background drawing guide consisting of horizontal and vertical lines in a neutral color. This feature is common to many drawing applications (e.g., MacDraw). LayerGrid is in concept a Layer, just like any other so it can be composed, locked, grayed, hidden, and reordered.
Field Summary | |
protected java.awt.Color |
_bgColor
The color of the space between the lines or dots. |
protected java.awt.Color |
_color
The color of the grid lines or dots. |
protected int |
_dotSize
The size of the dots. |
protected boolean |
_paintBackground
True means to fill in the image stamp or drawing area with the background color. |
Fields inherited from class org.tigris.gef.base.Layer |
_onMenu |
Constructor Summary | |
LayerGrid()
Construct a new LayerGrid and name it 'Grid'. |
|
LayerGrid(java.awt.Color fore,
java.awt.Color back,
int spacing,
boolean lines)
Construct a new LayerGrid with the given foreground color, background color, line spacing, and lines/dots flag. |
Method Summary | |
void |
adjust()
Eventually this will open a dialog box to let the user adjust the grid line spacing, colors, and whether liens or dots are shown. |
java.util.Collection |
getContents(java.util.Collection c)
Get the figs that make up this layer. |
void |
paintContents(java.awt.Graphics g)
Paint the grid lines or dots by repeatedly bitblting a precomputed 'stamp' onto the given Graphics |
protected void |
paintDots(java.awt.Graphics g,
boolean paintBackground)
Paint dots on the given Graphics. |
org.tigris.gef.presentation.Fig |
presentationFor(java.lang.Object obj)
Given an object from the net-level model (e.g., NetNode or NetPort), reply the graphical depiction of that object in this layer, if there is one. |
Methods inherited from class org.tigris.gef.base.Layer |
add, addEditor, bringForward, bringInFrontOf, bringToFront, calcDrawingArea, clone, damageAll, deleted, elements, elementsIn, getContents, getContentsEdgesOnly, getContentsNoEdges, getEditors, getGrayed, getHidden, getLocked, getName, getOnMenu, getPerspectiveType, getScale, hit, isAlwaysOnTop, nodesIn, paint, paint, paintContents, paintGrayContents, postLoad, postSave, preSave, print, refreshEditors, remove, removeAll, removeEditor, reorder, sendBackward, sendToBack, 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 java.awt.Color _color
protected java.awt.Color _bgColor
protected boolean _paintBackground
protected int _dotSize
Constructor Detail |
public LayerGrid()
public LayerGrid(java.awt.Color fore, java.awt.Color back, int spacing, boolean lines)
Method Detail |
public java.util.Collection getContents(java.util.Collection c)
Layer
getContents
in class Layer
c
- the collection in which to place the edges or null
if a new collection should be created
public org.tigris.gef.presentation.Fig presentationFor(java.lang.Object obj)
Layer
presentationFor
in class Layer
public void paintContents(java.awt.Graphics g)
paintContents
in class Layer
protected void paintDots(java.awt.Graphics g, boolean paintBackground)
public void adjust()
adjust
in class Layer
LayerGrid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |