public class TrianaToolLayout
extends java.lang.Object
implements java.awt.LayoutManager
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ADD_INPUT |
static java.lang.String |
ADD_OUTPUT |
static int |
ATTACHMENT_BORDER
the border size for top/bottom attachments
|
static java.lang.String |
BOTTOM |
static double |
DEFAULT_NODE_SPACE
the default node space at zoom 1
|
static java.lang.String |
INPUT_NODE |
static java.lang.String |
MAIN |
static double |
MAIN_SIDE_BORDER_FACTOR
the default distance above/below the main component relative to the node space
|
static double |
MAIN_TOP_BORDER_FACTOR
the default distance above/below the main component relative to the node space
|
static double |
NODE_BORDER_FACTOR
the default distance above/below nodes relative to the node space
|
static java.lang.String |
OUTPUT_NODE |
static java.lang.String |
REMOVE_INPUT |
static java.lang.String |
REMOVE_OUTPUT |
static java.lang.String |
TOP |
Constructor and Description |
---|
TrianaToolLayout()
Construct a new triana tool layout
|
TrianaToolLayout(double nodespace)
Construct a new triana tool layout
|
TrianaToolLayout(double nodespace,
double nodeborder,
double maintopborder,
double mainsideborder)
Construct a new triana tool layout
|
Modifier and Type | Method and Description |
---|---|
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp)
If the layout manager uses a per-component string, adds the component
comp to the layout,
associating it with the string specified by name . |
void |
layoutContainer(java.awt.Container parent)
Lays out the specified container.
|
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
Calculates the minimum size dimensions for the specified container, given the components it contains.
|
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
Calculates the preferred size dimensions for the specified container, given the components it contains.
|
void |
removeLayoutComponent(java.awt.Component comp)
Removes the specified component from the layout.
|
public static final java.lang.String MAIN
public static final java.lang.String TOP
public static final java.lang.String BOTTOM
public static final java.lang.String INPUT_NODE
public static final java.lang.String OUTPUT_NODE
public static final java.lang.String ADD_INPUT
public static final java.lang.String ADD_OUTPUT
public static final java.lang.String REMOVE_INPUT
public static final java.lang.String REMOVE_OUTPUT
public static double DEFAULT_NODE_SPACE
public static double NODE_BORDER_FACTOR
public static double MAIN_TOP_BORDER_FACTOR
public static double MAIN_SIDE_BORDER_FACTOR
public static int ATTACHMENT_BORDER
public TrianaToolLayout()
public TrianaToolLayout(double nodespace)
public TrianaToolLayout(double nodespace, double nodeborder, double maintopborder, double mainsideborder)
public void addLayoutComponent(java.lang.String name, java.awt.Component comp)
comp
to the layout,
associating it with the string specified by name
.addLayoutComponent
in interface java.awt.LayoutManager
name
- the string to be associated with the componentcomp
- the component to be addedpublic void removeLayoutComponent(java.awt.Component comp)
removeLayoutComponent
in interface java.awt.LayoutManager
comp
- the component to be removedpublic java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize
in interface java.awt.LayoutManager
parent
- the component to be laid outpreferredLayoutSize(java.awt.Container)
public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize
in interface java.awt.LayoutManager
parent
- the container to be laid outminimumLayoutSize(java.awt.Container)
public void layoutContainer(java.awt.Container parent)
layoutContainer
in interface java.awt.LayoutManager
parent
- the container to be laid out