JMSLTM Numerical Library 5.0.1

com.imsl.chart
Class AbstractChartNode

java.lang.Object
  extended by com.imsl.chart.AbstractChartNode
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
ChartNode, ChartNode3D

public abstract class AbstractChartNode
extends Object
implements Serializable, Cloneable

The base class of all of the nodes in both the 2D and 3D chart trees.

See Also:
Serialized Form

Field Summary
static int AUTOSCALE_DATA
          Flag used to indicate that autoscaling is to be done by scanning the data nodes.
static int AUTOSCALE_DENSITY
          Flag used to indicate that autoscaling is to adjust the "Density" attribute.
static int AUTOSCALE_NUMBER
          Flag used to indicate that autoscaling is to adjust the "Number" attribute.
static int AUTOSCALE_OFF
          Flag used to indicate that autoscaling is turned off.
static int AUTOSCALE_WINDOW
          Flag used to indicate that autoscaling is to be done by using the "Window" attribute.
static int AXIS_X
          Flag to indicate x-axis.
static int AXIS_Y
          Flag to indicate y-axis.
static int AXIS_Z
          Flag to indicate z-axis.
static int LABEL_TYPE_NONE
          Flag used to indicate the an element is not to be labeled.
static int LABEL_TYPE_TITLE
          Flag used to indicate that an element is to be labeled with the value of its title attribute.
static int LABEL_TYPE_X
          Flag used to indicate that an element is to be labeled with the value of its x-coordinate.
static int LABEL_TYPE_Y
          Flag used to indicate that an element is to be labeled with the value of its y-coordinate.
static int LABEL_TYPE_Z
          Flag used to indicate that an element is to be labeled with the value of its y-coordinate.
static long serialVersionUID
           
static int TRANSFORM_CUSTOM
          Flag used to indicate that the axis using a custom transformation.
static int TRANSFORM_LINEAR
          Flag used to indicate that the axis uses linear scaling.
static int TRANSFORM_LOG
          Flag used to indicate that the axis uses logarithmic scaling.
 
Constructor Summary
AbstractChartNode(AbstractChartNode parent)
           
 
Method Summary
protected  List clone(List in, Map hashClonedNode)
          Returns a deep copy of a vector of ChartNode's.
protected  Object clone(Map hashClonedNode)
          Returns a deep-copy clone of this node.
protected  Map clone(Map hashIn, Map hashClonedNode)
          Returns a deep copy of a Hashtable.
protected  Object clone(Object value, Map hashClonedNode)
          Returns a deep copy of an Object.
 AbstractChartNode getAbstractParent()
          Returns the parent of this node.
 Object getAttribute(String name)
          Gets an attribute.
 int getAutoscaleInput()
          Returns the value of the "AutoscaleInput" attribute.
 int getAutoscaleMinimumTimeInterval()
          Returns the value of the "AutoscaleMinimumTimeInterval" attribute.
 int getAutoscaleOutput()
          Returns the value of the "AutoscaleOutput" attribute.
 boolean getBooleanAttribute(String name, boolean defaultValue)
          Convenience routine to get a Boolean-valued attribute.
protected  List getChildList()
          Returns the children of this node.
 Color getColorAttribute(String name)
          Convenience routine to get a Color-valued attribute.
 Transform getCustomTransform()
          Returns the value of the "CustomTransform" attribute.
 int getDensity()
          Returns the value of the "Density" attribute.
 double getDoubleAttribute(String name, double defaultValue)
          Convenience routine to get a Double-valued attribute.
 Color getFillColor()
          Returns the value of the "FillColor" attribute.
 Font getFont()
          Convenience routine which gets a Font object based on the "FontName", "FontStyle" and "FontSize" attributes.
 String getFontName()
          Returns the value of the "FontName" attribute.
 int getFontSize()
          Returns the value of the "FontSize" attribute.
 int getFontStyle()
          Returns the value of the "FontStyle" attribute.
 Image getImage()
          Returns the value of the "Image" attribute.
 int getIntegerAttribute(String name, int defaultValue)
          Convenience routine to get an Integer-valued attribute.
 int getLabelType()
          Returns the value of the "LabelType" attribute.
 Color getLightColor()
          Returns the value of the "LightColor" attribute.
 Color getLineColor()
          Returns the value of the "LineColor" attribute.
 double getLineWidth()
          Returns the value of the "LineWidth" attribute.
 Locale getLocale()
          Returns the value of the "Locale" attribute.
 Color getMarkerColor()
          Returns the value of the "MarkerColor" attribute.
 double getMarkerSize()
          Returns the value of the "MarkerSize" attribute.
 String getName()
          Returns the value of the "Name" attribute.
 int getNumber()
          Returns the value of the "Number" attribute.
 boolean getPaint()
          Returns the value of the "Paint" attribute.
 String getStringAttribute(String name)
          Convenience routine to get a String-valued attribute.
 Color getTextColor()
          Returns the value of the "TextColor" attribute.
 Format getTextFormat()
          Returns the value of the "TextFormat" attribute.
 double getTickLength()
          Returns the value of the "TickLength" attribute.
 int getTransform()
          Returns the value of the "Transform" attribute.
 double[] getX()
          Returns the value of the "X" attribute.
 double[] getY()
          Returns the value of the "Y" attribute.
 boolean isAncestorOf(AbstractChartNode node)
          Returns true if this node is an ancestor of the argument node.
 boolean isAttributeSet(String name)
          Determines if an attribute is defined (may have been inherited).
 boolean isAttributeSetAtThisNode(String name)
          Determines if an attribute is defined in this node (not inherited).
static boolean isBitSet(int flag, int mask)
          Returns true if the bit set in flag is set in mask.
static Color parseColor(String nameColor)
          Returns a color specified by name or a red-green-blue triple.
 void remove()
          Removes the node from its parents list of children.
 void setAttribute(String name, Object value)
          Sets an attribute.
 void setAutoscaleInput(int value)
          Sets the value of the "AutoscaleInput" attribute.
 void setAutoscaleMinimumTimeInterval(int value)
          Sets the value of the "AutoscaleMinimumTimeInterval" attribute.
 void setAutoscaleOutput(int value)
          Sets the value of the "AutoscaleOutput" attribute.
 void setCustomTransform(Transform value)
          Sets the value of the "CustomTransform" attribute.
 void setDensity(int value)
          Sets the value of the "Density" attribute.
 void setFillColor(Color color)
          Sets the value of the "FillColor" attribute.
 void setFillColor(String color)
          Sets the "FillColor" attribute to a color specified by name.
 void setFont(Font font)
          Sets the value of the font attributes.
 void setFontName(String value)
          Sets the value of the "FontName" attribute.
 void setFontSize(int value)
          Sets the value of the "FontSize" attribute.
 void setFontStyle(int value)
          Sets the value of the "FontStyle" attribute.
 void setImage(ImageIcon value)
          Sets the value of the "Image" attribute.
 void setLabelType(int type)
          Sets the value of the "LabelType" attribute.
 void setLightColor(Color color)
          Sets the value of the "LightColor" attribute.
 void setLightColor(String color)
          Sets the value of the "LightColor" attribute to a color specified by name.
 void setLineColor(Color color)
          Sets the value of the "LineColor" attribute.
 void setLineColor(String color)
          Sets the value of the "LineColor" attribute.
 void setLineWidth(double value)
          Sets the value of the "LineWidth" attribute.
 void setLocale(Locale value)
          Sets the value of the "Locale" attribute.
 void setMarkerColor(Color color)
          Sets the value of the "MarkerColor" attribute.
 void setMarkerColor(String color)
          Sets the value of the "MarkerColor" attribute to a color specified by name.
 void setMarkerSize(double size)
          Sets the value of the "MarkerSize" attribute.
 void setName(String value)
          Sets the value of the "Name" attribute.
 void setNumber(int value)
          Sets the value of the "Number" attribute.
 void setPaint(boolean value)
          Sets the value of the "Paint" attribute.
 void setTextColor(Color color)
          Sets the value of the "TextColor" attribute.
 void setTextColor(String color)
          Sets the value of the "TextColor" attribute to a color specified by name.
 void setTextFormat(Format value)
          Sets the value of the "TextFormat" attribute.
 void setTextFormat(String value)
          Sets the value of the "TextFormat" attribute.
 void setTickLength(double tickLength)
          Sets the value of the "TickLength" attribute.
 void setTransform(int value)
          Sets the value of the "Transform" attribute.
 void setX(Object value)
          Sets the value of the "X" attribute.
 void setY(Object value)
          Sets the value of the "Y" attribute.
 String toString()
          Returns the name of this ChartNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AUTOSCALE_DATA

public static final int AUTOSCALE_DATA
Flag used to indicate that autoscaling is to be done by scanning the data nodes.

See Also:
setAutoscaleInput(int), Constant Field Values

AUTOSCALE_DENSITY

public static final int AUTOSCALE_DENSITY
Flag used to indicate that autoscaling is to adjust the "Density" attribute. This applies only to time axes.

See Also:
setAutoscaleOutput(int), Constant Field Values

AUTOSCALE_NUMBER

public static final int AUTOSCALE_NUMBER
Flag used to indicate that autoscaling is to adjust the "Number" attribute.

See Also:
setAutoscaleOutput(int), Constant Field Values

AUTOSCALE_OFF

public static final int AUTOSCALE_OFF
Flag used to indicate that autoscaling is turned off.

See Also:
setAutoscaleInput(int), setAutoscaleOutput(int), Constant Field Values

AUTOSCALE_WINDOW

public static final int AUTOSCALE_WINDOW
Flag used to indicate that autoscaling is to be done by using the "Window" attribute.

See Also:
setAutoscaleInput(int), setAutoscaleOutput(int), Constant Field Values

AXIS_X

public static final int AXIS_X
Flag to indicate x-axis.

See Also:
Constant Field Values

AXIS_Y

public static final int AXIS_Y
Flag to indicate y-axis.

See Also:
Constant Field Values

AXIS_Z

public static final int AXIS_Z
Flag to indicate z-axis.

See Also:
Constant Field Values

LABEL_TYPE_NONE

public static final int LABEL_TYPE_NONE
Flag used to indicate the an element is not to be labeled.

See Also:
setLabelType(int), Constant Field Values

LABEL_TYPE_TITLE

public static final int LABEL_TYPE_TITLE
Flag used to indicate that an element is to be labeled with the value of its title attribute.

See Also:
setLabelType(int), Constant Field Values

LABEL_TYPE_X

public static final int LABEL_TYPE_X
Flag used to indicate that an element is to be labeled with the value of its x-coordinate.

See Also:
setLabelType(int), Constant Field Values

LABEL_TYPE_Y

public static final int LABEL_TYPE_Y
Flag used to indicate that an element is to be labeled with the value of its y-coordinate.

See Also:
setLabelType(int), Constant Field Values

LABEL_TYPE_Z

public static final int LABEL_TYPE_Z
Flag used to indicate that an element is to be labeled with the value of its y-coordinate.

See Also:
setLabelType(int), Constant Field Values

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

TRANSFORM_CUSTOM

public static final int TRANSFORM_CUSTOM
Flag used to indicate that the axis using a custom transformation.

See Also:
setTransform(int), Constant Field Values

TRANSFORM_LINEAR

public static final int TRANSFORM_LINEAR
Flag used to indicate that the axis uses linear scaling.

See Also:
setTransform(int), Constant Field Values

TRANSFORM_LOG

public static final int TRANSFORM_LOG
Flag used to indicate that the axis uses logarithmic scaling.

See Also:
setTransform(int), Constant Field Values
Constructor Detail

AbstractChartNode

public AbstractChartNode(AbstractChartNode parent)
Method Detail

clone

protected final List clone(List in,
                           Map hashClonedNode)
Returns a deep copy of a vector of ChartNode's.


clone

protected Object clone(Map hashClonedNode)
Returns a deep-copy clone of this node. Each class derived from this class should override this function IF the derived class contains ChartNode objects or double[] arrays as member data. The overriden function should call this function and then clone each of its ChartNode data members. For example, in AxisXY we have
        protected Object clone(Hashtable hashClonedNode)
        {
            AxisXY t = (AxisXY)super.clone(hashClonedNode);
            t.axisX = (Axis1D)axisX.clone(hashClonedNode);
            t.axisY = (Axis1D)axisY.clone(hashClonedNode);
            return t;
        }
        

Parameters:
hashClonedNode - Hashtable of nodes that have already been cloned. We need to clone each ChartNode exactly once even if multiple references to it exist in the graphics tree. In this hashtable keys are existing ChartNode objects and values are their clones.

clone

protected final Map clone(Map hashIn,
                          Map hashClonedNode)
Returns a deep copy of a Hashtable. We assume the keys are immutable (e.g. Strings) and so do not have to be cloned. We cannot just use Hashtable.clone() because we want to specially handle cloning of ChartNodes that may occur in the hashtable. (Need to clone each ChartNode exactly once even if multiple references to it exist in the graphics tree.)


clone

protected Object clone(Object value,
                       Map hashClonedNode)
Returns a deep copy of an Object. Handles non-immutable object types ChartNode, Hashtable, Vector, double[], String[], and int[]. (Immutable objects can just be reused, they do not have to be cloned.)

If other non-immutable object types are used in the tree then the nodes where they are defined should override this function to handle the cloning. The new function calls super.clone(value, hashClonedNode) for values handled here.


getAbstractParent

public AbstractChartNode getAbstractParent()
Returns the parent of this node. Note that this is not an attribute setting. Note that there is no setParent function.

Returns:
A AbstractChartNode object which contains this node's parent. This is null in the case of the root node of the chart tree, since that node has no parent.

getAttribute

public Object getAttribute(String name)
Gets an attribute.

Parameters:
name - a String which contains the name of the attribute

getAutoscaleInput

public int getAutoscaleInput()
Returns the value of the "AutoscaleInput" attribute.

Returns:
the int value of the "AutoscaleInput" attribute.

getAutoscaleMinimumTimeInterval

public int getAutoscaleMinimumTimeInterval()
Returns the value of the "AutoscaleMinimumTimeInterval" attribute.

Returns:
The int value of the "AutoscaleMinimumTimeInterval" attribute.

getAutoscaleOutput

public int getAutoscaleOutput()
Returns the value of the "AutoscaleOutput" attribute.

Returns:
The int value of the "AutoscaleOutput" attribute.

getBooleanAttribute

public boolean getBooleanAttribute(String name,
                                   boolean defaultValue)
Convenience routine to get a Boolean-valued attribute.

Parameters:
name - a String which contains the name of the attribute
defaultValue - the boolean default value of the attribute
Returns:
the boolean value of the attribute, if defined and if its value is of type Boolean. Otherwise defaultValue is returned.

getChildList

protected final List getChildList()
Returns the children of this node.

Returns:
a List array which contains the children of this node. It may be null.

getColorAttribute

public Color getColorAttribute(String name)
Convenience routine to get a Color-valued attribute.

Parameters:
name - a String which contains the name of the attribute.
Returns:
the Color value of the attribute, if defined and if its value is of type Color. Otherwise, a default color value is returned.

getCustomTransform

public Transform getCustomTransform()
Returns the value of the "CustomTransform" attribute.

Returns:
an Transform which contains the value of the "Transform" attribute

getDensity

public int getDensity()
Returns the value of the "Density" attribute.

Returns:
The int value of the "Density" attribute, if defined. Otherwise, a default value of zero is returned.

getDoubleAttribute

public double getDoubleAttribute(String name,
                                 double defaultValue)
Convenience routine to get a Double-valued attribute.

Parameters:
name - a String which contains the name of the attribute
defaultValue - the double default value of the attribute.
Returns:
the double value of the attribute, if defined and if its value is of type Double. Otherwise defaultValue is returned.

getFillColor

public Color getFillColor()
Returns the value of the "FillColor" attribute.

Returns:
The Color value of the "FillColor" attribute, if defined. Otherwise, a default color value is returned.

getFont

public Font getFont()
Convenience routine which gets a Font object based on the "FontName", "FontStyle" and "FontSize" attributes. There is no "Font" attribute.

See Also:
Font

getFontName

public String getFontName()
Returns the value of the "FontName" attribute.

Returns:
The String value of the "FontName" attribute, if defined. Otherwise, the empty string is returned.

getFontSize

public int getFontSize()
Returns the value of the "FontSize" attribute.

Returns:
The int value of the "FontSize" attribute, if defined. Otherwise, 10 is returned.
See Also:
Font

getFontStyle

public int getFontStyle()
Returns the value of the "FontStyle" attribute.

Returns:
The int value of the "FontStyle" attribute, if defined. Otherwise, java.awt.Font.PLAIN is returned.
See Also:
Font

getImage

public Image getImage()
Returns the value of the "Image" attribute.

Returns:
the Image value of the "Image" attribute

getIntegerAttribute

public int getIntegerAttribute(String name,
                               int defaultValue)
Convenience routine to get an Integer-valued attribute.

Parameters:
name - a String which contains the name of the attribute.
defaultValue - the int default value of the attribute
Returns:
the int value of the attribute, if defined and if its value is of type Integer. Otherwise defaultValue is returned.

getLabelType

public int getLabelType()
Returns the value of the "LabelType" attribute. If the attribute has not been set LABEL_TYPE_NONE is returned.

Returns:
The int value of the "LabelType" attribute.

getLightColor

public Color getLightColor()
Returns the value of the "LightColor" attribute.

Returns:
The Color value of the "LightColor" attribute, if defined. Otherwise, a default color value is returned.

getLineColor

public Color getLineColor()
Returns the value of the "LineColor" attribute.

Returns:
The LineColor value of the "LineColor" attribute, if defined. Otherwise, a default color value is returned.

getLineWidth

public double getLineWidth()
Returns the value of the "LineWidth" attribute.

Returns:
The double value of the "LineWidth" attribute, if defined. Otherwise, the default value of one is returned.

getLocale

public Locale getLocale()
Returns the value of the "Locale" attribute.

Returns:
The Locale value of the "Locale" attribute, if defined. Otherwise, a default value is returned.

getMarkerColor

public Color getMarkerColor()
Returns the value of the "MarkerColor" attribute. Otherwise, a default color value is returned.

Returns:
a Color which contains the "MarkerColor" value

getMarkerSize

public double getMarkerSize()
Returns the value of the "MarkerSize" attribute.

Returns:
The double value of the "MarkerSize" attribute, if defined. Otherwise, a default of 1.0 is returned.

getName

public String getName()
Returns the value of the "Name" attribute.

Returns:
The String value of the "Name" attribute, if defined. Otherwise, the empty string is returned.

getNumber

public int getNumber()
Returns the value of the "Number" attribute.

Returns:
The int value of the "Number" attribute, if defined. Otherwise, zero is returned.

getPaint

public boolean getPaint()
Returns the value of the "Paint" attribute.

Returns:
The boolean value of the "Paint" attribute, if defined. Otherwise, true is returned.

getStringAttribute

public String getStringAttribute(String name)
Convenience routine to get a String-valued attribute.

Parameters:
name - a String which contains the name of the attribute.
Returns:
the String value of the attribute, if defined and if its value is of type String.

getTextColor

public Color getTextColor()
Returns the value of the "TextColor" attribute.

Returns:
The Color value of the "TextColor" attribute, if defined. Otherwise, a default color value is returned.

getTextFormat

public Format getTextFormat()
Returns the value of the "TextFormat" attribute.

Returns:
The Format value of the "TextFormat" attribute, if defined. Otherwise, a default format is returned. The default is a NumberFomat that allows exactly two digits after the decimal.

getTickLength

public double getTickLength()
Returns the value of the "TickLength" attribute.

Returns:
The double value of the "TickLength" attribute, if defined. Otherwise, 1.0 is returned.

getTransform

public int getTransform()
Returns the value of the "Transform" attribute.

Returns:
an int which contains the value of the "Transform" attribute

getX

public double[] getX()
Returns the value of the "X" attribute.

Returns:
the double array which contains the value of the "X" attribute

getY

public double[] getY()
Returns the value of the "Y" attribute.

Returns:
the double array which contains the value of the "Y" attribute

isAncestorOf

public boolean isAncestorOf(AbstractChartNode node)
Returns true if this node is an ancestor of the argument node.

Parameters:
node - a AbstractChartNode object
Returns:
a boolean, true if this node is an ancestor of the argument, node

isAttributeSet

public boolean isAttributeSet(String name)
Determines if an attribute is defined (may have been inherited).

Parameters:
name - a String which contains the name of the attribute
Returns:
a boolean, true if the attribute is defined for this node. The definition may have been inherited from its parent node.

isAttributeSetAtThisNode

public boolean isAttributeSetAtThisNode(String name)
Determines if an attribute is defined in this node (not inherited).

Parameters:
name - a String which contains the name of the attribute
Returns:
a boolean, true if the attribute is defined in this node. The definition must have been set directly in this node, not just inherited from its parent node.

isBitSet

public static boolean isBitSet(int flag,
                               int mask)
Returns true if the bit set in flag is set in mask.

Parameters:
flag - the int which contains the bit to be tested against mask
mask - the int which is used as the mask
Returns:
a boolean, true if the bit set in flag is set in mask

parseColor

public static Color parseColor(String nameColor)
Returns a color specified by name or a red-green-blue triple.

Parameters:
nameColor - is the name of a color (this name is not case sensitive) or a comma separated list of red, green, blue values all in the range 0 to 255. For example, "red" or "255,0,0".
Returns:
the named Color.
Throws:
IllegalArgumentException - is thrown if the color name is not known.

remove

public void remove()
Removes the node from its parents list of children.


setAttribute

public void setAttribute(String name,
                         Object value)
Sets an attribute.

Parameters:
name - a String which contains the name of the attribute to be set
value - an Object which contains the value of the attribute

setAutoscaleInput

public void setAutoscaleInput(int value)
Sets the value of the "AutoscaleInput" attribute. This attribute determines what inputs are use for autoscaling.

Parameters:
value - "AutoscaleInput" value. Legal values are
AUTOSCALE_OFF Do not do autoscaling.
AUTOSCALE_DATA Use the data values. This is the default.
AUTOSCALE_WINDOW Use the "Window" attribute value.

setAutoscaleMinimumTimeInterval

public void setAutoscaleMinimumTimeInterval(int value)
Sets the value of the "AutoscaleMinimumTimeInterval" attribute. This attribute determines the minimum tick mark interval for autoscaled time axes.

Parameters:
value - "AutoscaleMinimumTimeInterval" value. Legal values are:
MILLISECOND Millisecond
SECOND Second
MINUTE Minute
HOUR_OF_DAY Hour
DAY_OF_WEEK Day
WEEK_OF_YEAR Week
MONTH Month
YEAR Year
The default is MILLISECOND.
See Also:
GregorianCalendar

setAutoscaleOutput

public void setAutoscaleOutput(int value)
Sets the value of the "AutoscaleOutput" attribute. This attribute determines what attributes to change as a result of autoscaling.

Parameters:
value - "AutoscaleOutput" value. Legal values are bitwise-or combinations of the following:
AUTOSCALE_OFF Do not do autoscaling.
AUTOSCALE_WINDOW Change the "Window" attribute value.
AUTOSCALE_NUMBER Change the "Number" attribute value.
AUTOSCALE_DENSITY Change the "Density" attribute value.
The default is (AUTOSCALE_NUMBER | AUTOSCALE_WINDOW | AUTOSCALE_DENSITY).

setCustomTransform

public void setCustomTransform(Transform value)
Sets the value of the "CustomTransform" attribute. This is used only if the "Transform" attribute is set to TRANSFORM_CUSTOM.

Parameters:
value - an object implementing the Transform interface.
See Also:
TRANSFORM_CUSTOM

setDensity

public void setDensity(int value)
Sets the value of the "Density" attribute. This attribute controls the number of minor tick marks in the interval between major tick marks.

Parameters:
value - int "Density" value which specifies the number of minor tick marks per major tick mark.

setFillColor

public void setFillColor(Color color)
Sets the value of the "FillColor" attribute.

Parameters:
color - Color "FillColor" value

setFillColor

public void setFillColor(String color)
Sets the "FillColor" attribute to a color specified by name.

Parameters:
color - String name of a color.
See Also:
parseColor(java.lang.String)

setFont

public void setFont(Font font)
Sets the value of the font attributes. This function sets the "FontName", "FontStyle" and "FontSize" attributes. There is no "Font" attribute.

Parameters:
font - Font object whose components are used to set three different attributes.
See Also:
Font

setFontName

public void setFontName(String value)
Sets the value of the "FontName" attribute. This is used in the constructor for java.awt.Font.

Parameters:
value - a String which contains the "FontName" value
See Also:
Font

setFontSize

public void setFontSize(int value)
Sets the value of the "FontSize" attribute. This is used in the constructor for java.awt.Font.

Parameters:
value - an int "FontSize" value
See Also:
Font

setFontStyle

public void setFontStyle(int value)
Sets the value of the "FontStyle" attribute. This is used in the constructor for java.awt.Font.

Parameters:
value - an int "FontStyle" value.
See Also:
Font

setImage

public void setImage(ImageIcon value)
Sets the value of the "Image" attribute.

Parameters:
value - ImageIcon value.

setLabelType

public void setLabelType(int type)
Sets the value of the "LabelType" attribute. This indicates how a data point is to be labeled. The default is to not label data points.

Parameters:
type - the int "LabelType" value
See Also:
LABEL_TYPE_NONE, LABEL_TYPE_X, LABEL_TYPE_Y, LABEL_TYPE_TITLE

setLightColor

public void setLightColor(Color color)
Sets the value of the "LightColor" attribute.

Parameters:
color - a Color which contains the "LightColor" value

setLightColor

public void setLightColor(String color)
Sets the value of the "LightColor" attribute to a color specified by name.

Parameters:
color - String name of a color.
See Also:
parseColor(java.lang.String)

setLineColor

public void setLineColor(Color color)
Sets the value of the "LineColor" attribute.

Parameters:
color - the LineColor value

setLineColor

public void setLineColor(String color)
Sets the value of the "LineColor" attribute.

Parameters:
color - the LineColor value

setLineWidth

public void setLineWidth(double value)
Sets the value of the "LineWidth" attribute.

Parameters:
value - the double "LineWidth" value

setLocale

public void setLocale(Locale value)
Sets the value of the "Locale" attribute. This attribute controls how formatting is done.

Parameters:
value - the Locale value

setMarkerColor

public void setMarkerColor(Color color)
Sets the value of the "MarkerColor" attribute.

Parameters:
color - a Color which contains the "MarkerColor" value

setMarkerColor

public void setMarkerColor(String color)
Sets the value of the "MarkerColor" attribute to a color specified by name.

Parameters:
color - String name of a color.
See Also:
parseColor(java.lang.String)

setMarkerSize

public void setMarkerSize(double size)
Sets the value of the "MarkerSize" attribute. The default marker size is 1.0. If "MarkerSize" is 2.0 then markers are drawn twice as large as normal.

Parameters:
size - a double which specifies the "MarkerSize" value

setName

public void setName(String value)
Sets the value of the "Name" attribute. This the user-friendly name of the node.

Parameters:
value - a String which contains the "Name" value
See Also:
Font

setNumber

public void setNumber(int value)
Sets the value of the "Number" attribute. This is the number of tick marks along an axis.

Parameters:
value - the int "Number" value

setPaint

public void setPaint(boolean value)
Sets the value of the "Paint" attribute.

Parameters:
value - the boolean "Paint" value. If false, this node and its children are not drawn.

setTextColor

public void setTextColor(Color color)
Sets the value of the "TextColor" attribute.

Parameters:
color - a Color which contains the "TextColor" value

setTextColor

public void setTextColor(String color)
Sets the value of the "TextColor" attribute to a color specified by name.

Parameters:
color - String name of a color.
See Also:
parseColor(java.lang.String)

setTextFormat

public void setTextFormat(Format value)
Sets the value of the "TextFormat" attribute.

Parameters:
value - a Format which contains the "TextFormat" value

setTextFormat

public void setTextFormat(String value)
Sets the value of the "TextFormat" attribute.

The TextFormat attribute is normally a Format object, but, as a convenience, it can be set as a String. The following special values are defined. In this table, "locale" is the value of the locale attribute.

valueAttribute
"Date(SHORT)"DateFormat.getDateInstance(
DateFormat.SHORT, locale)
"Date(MEDIUM)"DateFormat.getDateInstance(
DateFormat.MEDIUM, locale)
"Date(LONG)"DateFormat.getDateInstance(
DateFormat.LONG, locale)
"Currency"DateFormat.getCurrencyInstance(locale)
"Number"DateFormat.getNumberInstance(locale)
"Percent"DateFormat.getPercentInstance(locale)

If the value does not match one of these special cases then an interpretation as a DecimalFormat object is attempted. If this fails then an interpretation as a SimpleDateFormat object is attempted.

Parameters:
value - a String which contains the "TextFormat" value

setTickLength

public void setTickLength(double tickLength)
Sets the value of the "TickLength" attribute. This scales the length of the tick mark lines. A value of 2.0 makes the tick marks twice as long as normal. A negative value causes the tick marks to be drawn pointing into the plot area.

Parameters:
tickLength - a double which contains the "TickLength" value

setTransform

public void setTransform(int value)
Sets the value of the "Transform" attribute. This sets the axis to be linear, logarithmic or a custom transform.

Parameters:
value - The "Transform" value. Legal values are TRANSFORM_LINEAR (the default), TRANSFORM_LOG and TRANSFORM_CUSTOM.
See Also:
TRANSFORM_LINEAR, TRANSFORM_LOG, TRANSFORM_CUSTOM

setX

public void setX(Object value)
Sets the value of the "X" attribute.

Parameters:
value - an Object which contains the "X" value

setY

public void setY(Object value)
Sets the value of the "Y" attribute.

Parameters:
value - the Object which contains the "Y" value

toString

public String toString()
Returns the name of this ChartNode

Overrides:
toString in class Object
Returns:
a String, the name of this ChartNode

JMSLTM Numerical Library 5.0.1

Copyright © 1970-2008 Visual Numerics, Inc.
Built July 8 2008.