N - The node class to arrangepublic abstract class AbstractArrangement<N> extends java.lang.Object implements Arrangement<N>
| Constructor and Description |
|---|
AbstractArrangement() |
| Modifier and Type | Method and Description |
|---|---|
int |
getMargin()
Gets the margin around arrangement
|
java.awt.Point |
getNodeLocation(N node)
Get the location of the node, or null if the node has no location
|
java.awt.Dimension |
getSize()
Returns the size of the arranger's working area in the form of a
Dimension object.
|
protected void |
invalidate()
Invalidate this arrangement.
|
void |
setMargin(int newMargin)
sets a uniform margin around arrangement
|
protected void |
setNodeLocation(N node,
java.awt.Point loc)
Set the location for the node in this arrangement.
|
void |
setSize(java.awt.Dimension dim)
sets size of working area
|
void |
setSize(int wide,
int high)
sets size of working area
|
public int getMargin()
public java.awt.Point getNodeLocation(N node)
getNodeLocation in interface Arrangement<N>node - the nodepublic java.awt.Dimension getSize()
getSize in interface Arrangement<N>protected void invalidate()
arrange() to reset the node locationspublic void setMargin(int newMargin)
setMargin in interface Arrangement<N>newMargin - the margin around the arrangementprotected void setNodeLocation(N node, java.awt.Point loc)
node - the nodeloc - the location for the node within this arrangement.public void setSize(java.awt.Dimension dim)
setSize in interface Arrangement<N>dim - the size of the working areapublic void setSize(int wide,
int high)
setSize in interface Arrangement<N>wide - the width of the working areahigh - the height of the working area