|
||||||||||
| 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.LayerPolar
public class LayerPolar
This class is an example of the power of the Layer-based approach. This is a kind of background drawing guide (like LayerGrid) that emphasizes polar coordinates (instead of rectangular coordinates).
| Field Summary | |
|---|---|
protected java.awt.Color |
_bgColor
The color of the space between the lines. |
protected java.awt.Color |
_lineColor
The color of the grid lines |
| Fields inherited from class org.tigris.gef.base.Layer |
|---|
_editors, _onMenu |
| Constructor Summary | |
|---|---|
LayerPolar()
Construct a new LayerPolar and name it "Grid". |
|
LayerPolar(int x,
int y,
int s)
Make a new LayerPolar with the given origin and spacing |
|
| Method Summary | |
|---|---|
void |
adjust()
Change the appearance of this layer: vary the spacing and origin. |
java.awt.Color |
bgColor()
|
void |
bgColor(java.awt.Color c)
|
int |
dist(int x,
int y)
return the integer distance between a given point and the origin |
java.util.Collection |
getContents(java.util.Collection c)
Get the figs that make up this layer. |
java.awt.Color |
lineColor()
|
void |
lineColor(java.awt.Color c)
|
void |
origin(int x,
int y)
Set the origin |
void |
paintContents(java.awt.Graphics g)
Paint concentric circles around the origin with each circle a certain spacing from the previous one |
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. |
void |
spacing(int s)
Set the spacing between lines |
| 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 _lineColor
protected java.awt.Color _bgColor
Needs-More-Work: null should mean the space between the lines is transparent. But that does not work with image stamps.
| Constructor Detail |
|---|
public LayerPolar()
public LayerPolar(int x,
int y,
int s)
| Method Detail |
|---|
public void origin(int x,
int y)
public void spacing(int s)
public int dist(int x,
int y)
public void lineColor(java.awt.Color c)
public java.awt.Color lineColor()
public void bgColor(java.awt.Color c)
public java.awt.Color bgColor()
public java.util.Collection getContents(java.util.Collection c)
Layer
getContents in class Layerc - the collection in which to place the edges or null
if a new collection should be created
public Fig presentationFor(java.lang.Object obj)
Layer
presentationFor in class Layerpublic void paintContents(java.awt.Graphics g)
paintContents in class Layerpublic void adjust()
adjust in class LayerLayerGrid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||