|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--NodeSettings
The class provides an object that refers to the settings of a node in a Tree.
Many static variables are available for use as defaults and different settings. Additionally,
a static method getScheme becomes very useful in acquiring the object with a
given color scheme.
The class implements cloneable, making copies of the object possible. The copies are shallow copies
which means changes to the specific elements could be dangerous when numerous instances refer
to the same elements. For example, modifying the rule of the given AlphaComposite, modifies the rule
for all NodeSettings that refer to that AlphaComposite. Therefore, it is suggested
that no modifications to the specific elements be made. Instead, simply use a different element.
| Field Summary | |
static java.lang.String |
ANIMATION_SCHEME_1
Default Animating color scheme for the animator. |
static java.lang.String |
ANIMATION_SCHEME_2
Animating color scheme 2. |
static java.lang.String |
ANIMATION_SCHEME_3
Animating color scheme 3. |
static java.lang.String |
ANIMATION_SCHEME_4
Animating color scheme 4. |
static java.lang.String |
ANIMATION_SCHEME_5
Animating color scheme 5. |
static java.lang.String |
ANIMATOR_SCHEME_1
Animator color scheme 1. |
static java.lang.String |
ANIMATOR_SCHEME_2
Animator color scheme 2. |
static java.lang.String |
ANIMATOR_SCHEME_3
Animator color scheme 3. |
static java.lang.String |
ANIMATOR_SCHEME_4
Animator color scheme 4. |
static java.lang.String |
ANIMATOR_SCHEME_5
Animator color scheme 5. |
static java.lang.String |
BLACK_SCHEME
Black color scheme. |
static java.lang.String |
CHRISTMAS_SCHEME
Christmas color scheme. |
static java.lang.String |
DEFAULT_SCHEME
Default color scheme. |
static java.lang.String |
DEFAULT_SCHEME_2
Old Default color scheme. |
static java.lang.String |
ERASE
Erasing color scheme. |
static java.lang.String |
GHOST_SCHEME
Ghost color scheme. |
static java.lang.String |
HALLOWEEN_SCHEME
Halloween color scheme. |
static float |
linkAlphaAnimateDefault
Default AlphaComposite alpha for link animating (0.6). |
static float |
linkAlphaDefault
Default AlphaComposite alpha for link drawing (0.8). |
static java.awt.AlphaComposite |
linkCompositeAnimateDefault
Default Composite for link animating (AlphaComposite(linkRuleDefault, linkAlphaAnimateDefault)). |
static java.awt.AlphaComposite |
linkCompositeDefault
Default Composite for link drawing (AlphaComposite(linkRuleDefault, linkAlphaDefault)). |
static java.awt.Color |
linkDefaultColor
Default Paint for link drawing (PaintSettings.lightWhite) |
static java.awt.BasicStroke |
linkDefaultStroke
Default Stroke for link drawing (BasicStroke(1)). |
static int |
linkRuleDefault
Default AlphaComposite rule for link drawing (SRC_IN). |
static float |
nodeAlphaAnimateDefault
Default AlphaComposite alpha for node animating (0.8). |
static float |
nodeAlphaDefault
Default AlphaComposite alpha for node drawing (1.0). |
static java.awt.AlphaComposite |
nodeCompositeAnimateDefault
Default Composite for node animating (AlphaComposite(nodeRuleDefault, nodeAlphaAnimateDefault)). |
static java.awt.AlphaComposite |
nodeCompositeDefault
Default Composite for node drawing (AlphaComposite(nodeRuleDefault, nodeAlphaDefault)). |
static java.awt.Color |
nodeDefaultFillColor
Default Paint for node drawing (PaintSettings.darkBlue) |
static NodeShape |
nodeDefaultShape
Default NodeShape for node drawing (Ellipse2DNode) |
static java.awt.Color |
nodeOutlineDefaultColor
Default Paint for node outline drawing (PaintSettings.darkBlue) |
static java.awt.BasicStroke |
nodeOutlineDefaultStroke
Default Stroke for node drawing (BasicStroke(1.5)). |
static int |
nodeRuleDefault
Default AlphaComposite rule for node drawing (SRC_OVER). |
static java.lang.String |
original
String used in getSettingName to define an undefined settings. |
static java.lang.String |
PRINCETON_SCHEME
Princeton color scheme. |
static java.lang.String |
ROTATION_SCHEME_1
Rotation Scheme 1. |
static java.lang.String |
ROTATION_SCHEME_2
Rotation Scheme 2. |
static java.lang.String |
ROTATION_SCHEME_3
Rotation Scheme 3. |
static java.lang.String |
ROTATION_SCHEME_4
Rotation Scheme 4. |
static java.lang.String |
TREE_SCHEME
Tree color scheme. |
static java.lang.String |
WHITE_SCHEME
White color scheme. |
| Constructor Summary | |
NodeSettings()
Constructor, contructs a default defined NodeSettings. |
|
NodeSettings(java.lang.String scheme)
Constructor, contructs a defined NodeSettings with the given scheme. |
|
| Method Summary | |
java.lang.Object |
clone()
Returns a copy of this NodeSettings object. |
java.awt.Composite |
getLeftLinkComposite()
Gets the left link composite. |
java.awt.Paint |
getLeftLinkPaint()
Gets the left link paint. |
java.awt.Stroke |
getLeftLinkStroke()
Gets the left link stroke. |
float |
getLeftLinkStrokeWidth()
Gets the left link stroke width. |
static java.lang.String[] |
getList()
Gets an array of String elements representing every NodeSettings choice available. |
java.awt.Composite |
getNodeComposite()
Gets the node composite. |
java.awt.Paint |
getNodeFillPaint()
Gets the node fill paint. |
java.awt.Paint |
getNodeOutlinePaint()
Gets the node outline paint. |
java.awt.Stroke |
getNodeOutlineStroke()
Gets the outline stroke of the node. |
float |
getNodeOutlineStrokeWidth()
Gets the outline stroke width of the node. |
NodeShape |
getNodeShape()
Gets the NodeShape of the settings. |
java.awt.Composite |
getRightLinkComposite()
Gets the right link composite. |
java.awt.Paint |
getRightLinkPaint()
Gets the right link paint. |
java.awt.Stroke |
getRightLinkStroke()
Gets the right link stroke. |
float |
getRightLinkStrokeWidth()
Gets the right link stroke width. |
static NodeSettings |
getScheme(java.lang.String s)
Gets a NodeSettings that defines the given int scheme. |
static NodeSettings |
getScheme(java.lang.String s,
java.awt.Color background)
Gets a NodeSettings that defines the given int scheme. |
java.lang.String |
getSettingName()
Gets the string name for the current settings. |
void |
setAllSettings(NodeSettings s)
Sets the settings of just the node of the NodeSettings, using the NodeSettings passed. |
void |
setLeftLinkComposite(java.awt.Composite c)
Sets the left composite. |
void |
setLeftLinkPaint(java.awt.Paint p)
Sets the left link paint. |
void |
setLeftLinkStroke(java.awt.BasicStroke s)
Sets the left link stroke. |
void |
setLeftLinkStroke(java.awt.Stroke s,
float w)
Sets the left link stroke. |
void |
setLeftSettings(NodeSettings s)
Sets the left settings of the NodeSettings, using the NodeSettings passed. |
void |
setNodeComposite(java.awt.Composite c)
Sets the node composite. |
void |
setNodeFillPaint(java.awt.Paint p)
Sets the paint for filling the node. |
void |
setNodeOutlinePaint(java.awt.Paint p)
Sets the paint for the outline of the node. |
void |
setNodeOutlineStroke(java.awt.BasicStroke s)
Sets the node stroke. |
void |
setNodeOutlineStroke(java.awt.Stroke s,
float w)
Sets the stroke for the node. |
void |
setNodeSettings(NodeSettings s)
Sets the settings of just the node of the NodeSettings, using the NodeSettings passed. |
void |
setNodeShape(NodeShape s)
Sets the NodeShape for the settings. |
void |
setRightLinkComposite(java.awt.Composite c)
Sets the right composite. |
void |
setRightLinkPaint(java.awt.Paint p)
Sets the right link paint. |
void |
setRightLinkStroke(java.awt.BasicStroke s)
Sets the right link stroke. |
void |
setRightLinkStroke(java.awt.Stroke s,
float w)
Sets the right link stroke. |
void |
setRightSettings(NodeSettings s)
Sets the right settings of the NodeSettings, using the NodeSettings passed. |
void |
setScheme(java.lang.String s)
Sets the scheme of the settings, using Color.white as the default background color, if the background color is indeed needed. |
void |
setScheme(java.lang.String s,
java.awt.Color background)
Sets the scheme of the settings, using the background color if needed. |
void |
setSettingName(java.lang.String settingName)
Sets the string name for the current settings. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int nodeRuleDefault
AlphaComposite rule for node drawing (SRC_OVER).
public static final int linkRuleDefault
AlphaComposite rule for link drawing (SRC_IN).
public static final float nodeAlphaDefault
AlphaComposite alpha for node drawing (1.0).
public static final float nodeAlphaAnimateDefault
AlphaComposite alpha for node animating (0.8).
public static final float linkAlphaDefault
AlphaComposite alpha for link drawing (0.8).
public static final float linkAlphaAnimateDefault
AlphaComposite alpha for link animating (0.6).
public static final java.awt.BasicStroke linkDefaultStroke
Stroke for link drawing (BasicStroke(1)).
public static final java.awt.Color linkDefaultColor
Paint for link drawing (PaintSettings.lightWhite)
public static final NodeShape nodeDefaultShape
NodeShape for node drawing (Ellipse2DNode)
public static final java.awt.Color nodeDefaultFillColor
Paint for node drawing (PaintSettings.darkBlue)
public static final java.awt.BasicStroke nodeOutlineDefaultStroke
Stroke for node drawing (BasicStroke(1.5)).
public static final java.awt.Color nodeOutlineDefaultColor
Paint for node outline drawing (PaintSettings.darkBlue)
public static final java.awt.AlphaComposite nodeCompositeDefault
Composite for node drawing (AlphaComposite(nodeRuleDefault, nodeAlphaDefault)).
public static final java.awt.AlphaComposite nodeCompositeAnimateDefault
Composite for node animating (AlphaComposite(nodeRuleDefault, nodeAlphaAnimateDefault)).
public static final java.awt.AlphaComposite linkCompositeDefault
Composite for link drawing (AlphaComposite(linkRuleDefault, linkAlphaDefault)).
public static final java.awt.AlphaComposite linkCompositeAnimateDefault
Composite for link animating (AlphaComposite(linkRuleDefault, linkAlphaAnimateDefault)).
public static final java.lang.String DEFAULT_SCHEME
public static final java.lang.String DEFAULT_SCHEME_2
public static final java.lang.String ERASE
public static final java.lang.String PRINCETON_SCHEME
public static final java.lang.String BLACK_SCHEME
public static final java.lang.String GHOST_SCHEME
public static final java.lang.String WHITE_SCHEME
public static final java.lang.String CHRISTMAS_SCHEME
public static final java.lang.String TREE_SCHEME
public static final java.lang.String HALLOWEEN_SCHEME
public static final java.lang.String ANIMATION_SCHEME_1
public static final java.lang.String ANIMATION_SCHEME_2
public static final java.lang.String ANIMATION_SCHEME_3
public static final java.lang.String ANIMATION_SCHEME_4
public static final java.lang.String ANIMATION_SCHEME_5
public static final java.lang.String ANIMATOR_SCHEME_1
public static final java.lang.String ANIMATOR_SCHEME_2
public static final java.lang.String ANIMATOR_SCHEME_3
public static final java.lang.String ANIMATOR_SCHEME_4
public static final java.lang.String ANIMATOR_SCHEME_5
public static final java.lang.String ROTATION_SCHEME_1
public static final java.lang.String ROTATION_SCHEME_2
public static final java.lang.String ROTATION_SCHEME_3
public static final java.lang.String ROTATION_SCHEME_4
public static final java.lang.String original
getSettingName to define an undefined settings.
| Constructor Detail |
public NodeSettings()
NodeSettings.
public NodeSettings(java.lang.String scheme)
NodeSettings with the given scheme.
| Method Detail |
public static NodeSettings getScheme(java.lang.String s)
NodeSettings that defines the given int scheme. The scheme must be one
defined within the class, otherwise the default scheme is returned.
s - defined color scheme within the class.
NodeSettings that defines the given color scheme or default if no
color scheme exists.
public static NodeSettings getScheme(java.lang.String s,
java.awt.Color background)
NodeSettings that defines the given int scheme. The scheme must be one
defined within the class, otherwise the default scheme is returned.
s - defined color scheme within the class.background - background color if needed.
NodeSettings that defines the given color scheme or default if no
color scheme exists.public static java.lang.String[] getList()
public java.lang.String getSettingName()
public void setSettingName(java.lang.String settingName)
settingName - String defining the settings name.public void setScheme(java.lang.String s)
s - defined color scheme within the class.
public void setScheme(java.lang.String s,
java.awt.Color background)
s - defined color scheme within the class.background - background color if needed.public void setLeftSettings(NodeSettings s)
s - NodeSettings to which the left settings are set, using the left settings.public void setRightSettings(NodeSettings s)
s - NodeSettings to which the right settings are set, using the right settings.public void setNodeSettings(NodeSettings s)
s - NodeSettings to which the node settings are set.public void setAllSettings(NodeSettings s)
s - NodeSettings to which the node settings are set.public java.lang.Object clone()
NodeSettings object.
clone in class java.lang.ObjectObject that is a copy of this
NodeSettings object.
public void setRightLinkStroke(java.awt.Stroke s,
float w)
s - Stroke that sets the right link.w - Width of the Stroke for drawing corrections.public void setRightLinkStroke(java.awt.BasicStroke s)
getLineWidth method.
s - BasicStroke that sets the right link.public void setRightLinkPaint(java.awt.Paint p)
p - Paint for the right link.public void setRightLinkComposite(java.awt.Composite c)
c - Composite for drawing the right link.
public void setLeftLinkStroke(java.awt.Stroke s,
float w)
s - Stroke that sets the left link.w - Width of the Stroke for drawing corrections.public void setLeftLinkStroke(java.awt.BasicStroke s)
getLineWidth method.
s - BasicStroke that sets the left link.public void setLeftLinkPaint(java.awt.Paint p)
p - Paint for the left link.public void setLeftLinkComposite(java.awt.Composite c)
c - Composite for drawing the left link.public void setNodeShape(NodeShape s)
NodeShape for the settings.
s - NodeShape for drawing the node.public void setNodeFillPaint(java.awt.Paint p)
p - Paint for filling the node.
public void setNodeOutlineStroke(java.awt.Stroke s,
float w)
s - Stroke that sets the node stroke.w - Width of the Stroke for drawing corrections.public void setNodeOutlineStroke(java.awt.BasicStroke s)
getLineWidth method.
s - BasicStroke for drawing the key.public void setNodeOutlinePaint(java.awt.Paint p)
p - Paint for drawing the outline of the node.public void setNodeComposite(java.awt.Composite c)
c - Composite for drawing the node.public java.awt.Stroke getLeftLinkStroke()
Stroke of the left link.public float getLeftLinkStrokeWidth()
public java.awt.Paint getLeftLinkPaint()
Paint of the left link.public java.awt.Composite getLeftLinkComposite()
Composite of the left link.public java.awt.Stroke getRightLinkStroke()
Stroke of the right link.public float getRightLinkStrokeWidth()
public java.awt.Paint getRightLinkPaint()
Paint of the right link.public java.awt.Composite getRightLinkComposite()
Composite of the right link.public NodeShape getNodeShape()
NodeShape of the settings.
NodeShape for the node.public java.awt.Paint getNodeFillPaint()
Paint of the node.public java.awt.Stroke getNodeOutlineStroke()
Stroke outline of the node.public float getNodeOutlineStrokeWidth()
public java.awt.Paint getNodeOutlinePaint()
Paint of the node.public java.awt.Composite getNodeComposite()
Composite of the node.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||