public abstract class GraphUnitLayout
extends javax.swing.SpringLayout
GraphUnitLayout extends SpringLayout to provide support for
components that are positioned in graph coordinate space.
Use the putGraphicConstraint method to add components in graph space.
Note that the putConstraint method may still be used to position
components using pixel coordinates.
GraphUnitLayout is an abstract class.| Constructor and Description |
|---|
GraphUnitLayout() |
| Modifier and Type | Method and Description |
|---|---|
void |
doSuperLayoutContainer(java.awt.Container c)
This method does nothing and needs to be overridden.
|
java.util.LinkedHashMap<java.awt.Component,GraphicConstraint> |
getComponentMap()
Returns the
LinkedHashMap of Components to be laid out
using graph coordinates. |
java.util.ArrayList<java.awt.Dimension> |
getDimensions()
Returns an ArrayList of the preferredSize of each component in the
componentMap.
|
void |
putGraphicConstraint(java.awt.Component c,
double x,
double y,
int alignX,
int alignY)
Registers the specified component to be laid out using graph units.
|
protected void |
revalidateComponent(java.awt.Component c,
GJAbstractGraphContainer container,
GJGraphInterface gr,
boolean translateCoordinates) |
void |
setComponentMap(java.util.LinkedHashMap<java.awt.Component,GraphicConstraint> map)
Adds the input to the existing component map.
|
void |
setDimensions(java.util.ArrayList<java.awt.Dimension> dim)
Sets the dimensions of components in the componentMap.
|
addLayoutComponent, addLayoutComponent, getConstraint, getConstraints, getLayoutAlignmentX, getLayoutAlignmentY, invalidateLayout, layoutContainer, maximumLayoutSize, minimumLayoutSize, preferredLayoutSize, putConstraint, putConstraint, removeLayoutComponentpublic void putGraphicConstraint(java.awt.Component c,
double x,
double y,
int alignX,
int alignY)
c - the Componentx - x-position in graph unitsy - y-position in graph unitsalignX - relative X alignment specified using a
SwingConstants value.alignY - relative Y alignment specified using a
SwingConstants value.public java.util.LinkedHashMap<java.awt.Component,GraphicConstraint> getComponentMap()
LinkedHashMap of Components to be laid out
using graph coordinates.LinkedHashMap of Componentspublic void setComponentMap(java.util.LinkedHashMap<java.awt.Component,GraphicConstraint> map)
map - public java.util.ArrayList<java.awt.Dimension> getDimensions()
public void setDimensions(java.util.ArrayList<java.awt.Dimension> dim)
dim - ArrayList of Dimensionsprotected final void revalidateComponent(java.awt.Component c,
GJAbstractGraphContainer container,
GJGraphInterface gr,
boolean translateCoordinates)
public void doSuperLayoutContainer(java.awt.Container c)
c -