JMSLTM Numerical Library 6.1

com.imsl.chart
Class ChartNode

java.lang.Object
  extended by com.imsl.chart.AbstractChartNode
      extended by com.imsl.chart.ChartNode
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
Axis, Axis1D, AxisLabel, AxisLine, AxisR, AxisRLabel, AxisRLine, AxisRMajorTick, AxisTheta, AxisTitle, AxisUnit, BarSet, Chart, ContourLevel, Data, Grid, GridPolar, MajorTick, MinorTick, ToolTip

public abstract class ChartNode
extends AbstractChartNode

The base class of all of the nodes in the 2D chart tree.

It may be desirable to enable anti-aliasing on a particular ChartNode. This can be accomplished in the following way:

 AxisXY axis = new AxisXY(chart);

 RenderingHints hints = new RenderingHints(RenderingHints.KEY_ANTIALIASING,
      RenderingHints.VALUE_ANTIALIAS_ON);
 axis.setAttribute("RenderingHints", hints);
 

See Also:
Serialized Form

Field Summary
static int AXIS_X_TOP
          Flag to indicate x-axis placed on top of the chart.
static int AXIS_Y_RIGHT
          Flag to indicate y-axis placed to the right of the chart.
static int BAR_TYPE_HORIZONTAL
          Flag to indicate a horizontal bar chart.
static int BAR_TYPE_VERTICAL
          Flag to indicate a vertical bar chart.
static double[] DASH_PATTERN_DASH
          Flag to draw a dashed line.
static double[] DASH_PATTERN_DASH_DOT
          Flag to draw a dash-dot pattern line.
static double[] DASH_PATTERN_DOT
          Flag to draw a dotted line.
static double[] DASH_PATTERN_SOLID
          Flag to draw solid line.
static int DATA_TYPE_FILL
          Value for attribute "DataType" indicating that the area between the lines connecting the data points and the horizontal reference line (y = attribute "Reference") should be filled.
static int DATA_TYPE_LINE
          Value for attribute "DataType" indicating that the data points should be connected with line segments.
static int DATA_TYPE_MARKER
          Value for attribute "DataType" indicating that a marker should be drawn at each data point.
static int DATA_TYPE_PICTURE
          Value for attribute "DataType" indicating that an image (attribute "Image") should be drawn at each data point.
static int DATA_TYPE_TUBE
          Value for attribute "DataType" indicating that an a tube connecting the data points should be drawn.
static int DENDROGRAM_TYPE_HORIZONTAL
          Flag to indicate a horizontal dendrogram.
static int DENDROGRAM_TYPE_VERTICAL
          Flag to indicate a vertical dendrogram.
static int FILL_TYPE_GRADIENT
          Value for attribute "FillType" indicating that the region is to be drawn in a color gradient as specified by the attribute Gradient.
static int FILL_TYPE_NONE
          Value for attribute "FillType" and "FillOutlineType" indicating that the region is not to be drawn.
static int FILL_TYPE_PAINT
          Value for attribute "FillType" indicating that the region is to be drawn using the texture specified by the attribute FillPaint.
static int FILL_TYPE_SOLID
          Value for attribute "FillType" and "FillOutlineType" indicating that the region is to be drawn using the solid color specified by the attribute FillColor or FillOutlineColor.
static int LABEL_TYPE_PERCENT
          Flag used to indicate that a pie slice is to be labeled with a percentage value.
static int MARKER_TYPE_ASTERISK
          Flag for a asterisk data marker.
static int MARKER_TYPE_CIRCLE_CIRCLE
          Flag for a circle in a circle data marker.
static int MARKER_TYPE_CIRCLE_PLUS
          Flag for a plus in a circle data marker.
static int MARKER_TYPE_CIRCLE_X
          Flag for an x in a circle data marker.
static int MARKER_TYPE_DIAMOND_PLUS
          Flag for a plus in a diamond data marker.
static int MARKER_TYPE_FILLED_CIRCLE
          Flag for a filled circle data marker.
static int MARKER_TYPE_FILLED_DIAMOND
          Flag for a filled diamond data marker.
static int MARKER_TYPE_FILLED_SQUARE
          Flag for a filled square data marker.
static int MARKER_TYPE_FILLED_TRIANGLE
          Flag for a filled triangle data marker.
static int MARKER_TYPE_HOLLOW_CIRCLE
          Flag for a hollow circle data marker.
static int MARKER_TYPE_HOLLOW_DIAMOND
          Flag for a hollow diamond data marker.
static int MARKER_TYPE_HOLLOW_SQUARE
          Flag for a hollow square data marker.
static int MARKER_TYPE_HOLLOW_TRIANGLE
          Flag for hollow triangle data marker.
static int MARKER_TYPE_OCTAGON_PLUS
          Flag for a plus in an octagon data marker.
static int MARKER_TYPE_OCTAGON_X
          Flag for a x in an octagon data marker.
static int MARKER_TYPE_PLUS
          Flag for a plus-shaped data marker.
static int MARKER_TYPE_SQUARE_PLUS
          Flag for a plus in a square data marker.
static int MARKER_TYPE_SQUARE_X
          Flag for an x in a square data marker.
static int MARKER_TYPE_X
          Flag for a x-shaped data marker.
static int TEXT_X_CENTER
          Value for attribute "TextAlignment" indicating that the text should be centered.
static int TEXT_X_LEFT
          Value for attribute "TextAlignment" indicating that the text should be left adjusted.
static int TEXT_X_RIGHT
          Value for attribute "TextAlignment" indicating that the text should be right adjusted.
static int TEXT_Y_BOTTOM
          Value for attribute "TextAlignment" indicating that the text should be drawn on the baseline.
static int TEXT_Y_CENTER
          Value for attribute "TextAlignment" indicating that the text should be vertically centered.
static int TEXT_Y_TOP
          Value for attribute "TextAlignment" indicating that the text should be drawn with the top of the letters touching the top of the drawing region.
 
Fields inherited from class com.imsl.chart.AbstractChartNode
AUTOSCALE_DATA, AUTOSCALE_DENSITY, AUTOSCALE_NUMBER, AUTOSCALE_OFF, AUTOSCALE_WINDOW, AXIS_X, AXIS_Y, AXIS_Z, LABEL_TYPE_NONE, LABEL_TYPE_TITLE, LABEL_TYPE_X, LABEL_TYPE_Y, LABEL_TYPE_Z, TRANSFORM_CUSTOM, TRANSFORM_LINEAR, TRANSFORM_LOG
 
Constructor Summary
ChartNode(ChartNode parent)
          Construct a ChartNode object.
 
Method Summary
 void addPickListener(PickListener pickListener)
          Adds a PickListener to this node.
 void firePickListeners(MouseEvent event)
          Fires the pick listeners defined at this node and at all of its ancestors, if the event "hits" the node.
 String getALT()
          Returns the value of the "ALT" attribute.
 Axis getAxis()
          Returns the value of the "Axis" attribute.
 Background getBackground()
          Returns the value of the "Background" attribute.
 double getBarGap()
          Returns the value of the "BarGap" attribute.
 int getBarType()
          Returns the value of the "BarType" attribute.
 double getBarWidth()
          Returns the value of the "BarWidth" attribute.
 Chart getChart()
          Returns the value of the "Chart" attribute.
 ChartTitle getChartTitle()
          Returns the value of the "ChartTitle" attribute.
 ChartNode[] getChildren()
          Returns an array of the children of this node.
 boolean getClipData()
          Returns the value of the "ClipData" attribute.
 Component getComponent()
          Returns the value of the "Component" attribute.
 double[] getConcatenatedViewport()
          Returns the value of the "Viewport" attribute concatenated with the "Viewport" attributes set in its ancestor nodes.
 int getDataType()
          Returns the value of the "DataType" attribute.
 boolean getDoubleBuffering()
          Returns the value of the "DoubleBuffering" attribute.
 double getExplode()
          Returns the value of the "Explode" attribute.
 Color getFillOutlineColor()
          Returns the value of the "FillOutlineColor" attribute.
 int getFillOutlineType()
          Returns the value of the "FillOutlineType" attribute.
 Paint getFillPaint()
          Returns the value of the "FillPaint" attribute.
 int getFillType()
          Returns the value of the "FillType" attribute.
 Color[] getGradient()
          Returns the value of the "Gradient" attribute.
 String getHREF()
          Returns the value of the "HREF" attribute.
 Legend getLegend()
          Returns the value of the "Legend" attribute.
 double[] getLineDashPattern()
          Returns the value of the "LineDashPattern" attribute.
 double[] getMarkerDashPattern()
          Returns the value of the "MarkerPattern" attribute.
 double getMarkerThickness()
          Returns the value of the "MarkerThickness" attribute.
 int getMarkerType()
          Returns the value of the "MarkerType" attribute.
 ChartNode getParent()
          Returns the parent of this node.
 double getReference()
          Returns the value of the "Reference" attribute.
 AxisXY getScreenAxis()
          Returns the value of the "ScreenAxis" attribute.
 Dimension getScreenSize()
          Returns the value of the "ScreenSize" attribute.
 int[] getScreenViewport()
          Returns the value of the "Viewport" attribute scaled by the screen size.
 Dimension getSize()
          Returns the value of the "Size" attribute.
 boolean getSkipWeekends()
          Returns the value of the "SkipWeekends" attribute.
 int getTextAngle()
          Returns the value of the "TextAngle" attribute.
 Color getTextColor()
          Returns the value of the "TextColor" attribute.
 Text getTitle()
          Returns the value of the "Title" attribute.
 String getToolTip()
          Returns the value of the "ToolTip" attribute.
 double[] getViewport()
          Returns the value of the "Viewport" attribute.
static boolean isBitSet(int flag, int mask)
          Returns true if the bit set in flag is set in mask.
abstract  void paint(Draw draw)
          Paints this node and all of its children.
 void prePaint()
          The prePaint method is called in all nodes in a chart just before the chart is painted.
 void removePickListener(PickListener pickListener)
          Removes a PickListener from this node.
 void setALT(String value)
          Sets the value of the "ALT" attribute.
 void setBarGap(double value)
          Sets the value of the "BarGap" attribute.
 void setBarType(int value)
          Sets the value of the "BarType" attribute.
 void setBarWidth(double value)
          Sets the value of the "BarWidth" attribute.
 void setChartTitle(ChartTitle value)
          Sets the value of the "ChartTitle" attribute.
 void setClipData(boolean value)
          Sets the value of the "ClipData" attribute.
 void setCustomTransform(Transform value)
          Sets the value of the "CustomTransform" attribute.
 void setDataType(int value)
          Sets the value of the "DataType" attribute.
 void setDoubleBuffering(boolean value)
          Sets the value of the "DoubleBuffering" attribute.
 void setExplode(double value)
          Sets the value of the "Explode" attribute.
 void setFillOutlineColor(Color color)
          Sets the value of the "FillOutlineColor" attribute.
 void setFillOutlineColor(String color)
          Sets the value of the "FillOutlineColor" attribute to a color specified by name.
 void setFillOutlineType(int value)
          Sets the value of the "FillOutlineType" attribute.
 void setFillPaint(ImageIcon imageIcon)
          Sets the value of the "FillPaint" attribute.
 void setFillPaint(Paint value)
          Sets the value of the "FillPaint" attribute.
 void setFillPaint(URL urlImage)
          Sets the value of the "FillPaint" attribute.
 void setFillType(int value)
          Sets the value of the "FillType" attribute.
 void setGradient(Color[] colorGradient)
          Sets the value of the "Gradient" attribute.
 void setGradient(Color colorLL, Color colorLR, Color colorUR, Color colorUL)
          Sets the value of the "Gradient" attribute.
 void setGradient(String colorLL, String colorLR, String colorUR, String colorUL)
          Sets the value of the "Gradient" attribute using named colors.
 void setHREF(String value)
          Sets the value of the "HREF" attribute.
 void setImage(Image value)
          Sets the value of the "Image" attribute.
 void setLineDashPattern(double[] value)
          Sets the value of the "LineDashPattern" attribute.
 void setMarkerDashPattern(double[] value)
          Sets the value of the "MarkerDashPattern" attribute.
 void setMarkerThickness(double width)
          Sets the value of the "MarkerThickness" attribute.
 void setMarkerType(int type)
          Sets the value of the "MarkerType" attribute.
 void setReference(double value)
          Sets the value of the "Reference" attribute.
 void setScreenSize(Dimension value)
          Sets the value of the "ScreenSize" attribute.
 void setSize(Dimension value)
          Sets the value of the "Size" attribute.
 void setSkipWeekends(boolean skipWeekends)
          Sets the value of the "SkipWeekends" attribute.
 void setTextAngle(int value)
          Sets the value of the "TextAngle" 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 setTitle(String value)
          Sets the value of the "Title" attribute.
 void setTitle(Text value)
          Sets the value of the "Title" attribute.
 void setToolTip(String value)
          Sets the value of the "ToolTip" attribute.
 void setViewport(double[] value)
          Sets the value of the "Viewport" attribute.
 void setViewport(double xmin, double xmax, double ymin, double ymax)
          Sets the value of the "Viewport" attribute.
 
Methods inherited from class com.imsl.chart.AbstractChartNode
clone, clone, clone, clone, getAbstractParent, getAttribute, getAutoscaleInput, getAutoscaleMinimumTimeInterval, getAutoscaleOutput, getBooleanAttribute, getChildList, getColorAttribute, getCustomTransform, getDensity, getDoubleAttribute, getFillColor, getFont, getFontName, getFontSize, getFontStyle, getImage, getIntegerAttribute, getLabelType, getLightColor, getLineColor, getLineWidth, getLocale, getMarkerColor, getMarkerSize, getName, getNumber, getPaint, getStringAttribute, getTextFormat, getTickLength, getTransform, getX, getY, isAncestorOf, isAttributeSet, isAttributeSetAtThisNode, parseColor, remove, setAttribute, setAutoscaleInput, setAutoscaleMinimumTimeInterval, setAutoscaleOutput, setDensity, setFillColor, setFillColor, setFont, setFontName, setFontSize, setFontStyle, setImage, setLabelType, setLightColor, setLightColor, setLineColor, setLineColor, setLineWidth, setLocale, setMarkerColor, setMarkerColor, setMarkerSize, setName, setNumber, setPaint, setTextFormat, setTextFormat, setTickLength, setTransform, setX, setY, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AXIS_X_TOP

public static final int AXIS_X_TOP
Flag to indicate x-axis placed on top of the chart.

See Also:
Constant Field Values

AXIS_Y_RIGHT

public static final int AXIS_Y_RIGHT
Flag to indicate y-axis placed to the right of the chart.

See Also:
Constant Field Values

BAR_TYPE_HORIZONTAL

public static final int BAR_TYPE_HORIZONTAL
Flag to indicate a horizontal bar chart.

See Also:
setBarType(int), getBarType(), Constant Field Values

BAR_TYPE_VERTICAL

public static final int BAR_TYPE_VERTICAL
Flag to indicate a vertical bar chart.

See Also:
setBarType(int), getBarType(), Constant Field Values

DASH_PATTERN_DASH

public static final double[] DASH_PATTERN_DASH
Flag to draw a dashed line.

See Also:
setLineDashPattern(double[])

DASH_PATTERN_DASH_DOT

public static final double[] DASH_PATTERN_DASH_DOT
Flag to draw a dash-dot pattern line.

See Also:
setLineDashPattern(double[])

DASH_PATTERN_DOT

public static final double[] DASH_PATTERN_DOT
Flag to draw a dotted line.

See Also:
setLineDashPattern(double[])

DASH_PATTERN_SOLID

public static final double[] DASH_PATTERN_SOLID
Flag to draw solid line.

See Also:
setLineDashPattern(double[])

DATA_TYPE_FILL

public static final int DATA_TYPE_FILL
Value for attribute "DataType" indicating that the area between the lines connecting the data points and the horizontal reference line (y = attribute "Reference") should be filled. This is an area chart.

See Also:
Constant Field Values

DATA_TYPE_LINE

public static final int DATA_TYPE_LINE
Value for attribute "DataType" indicating that the data points should be connected with line segments. This is the default setting.

See Also:
Constant Field Values

DATA_TYPE_MARKER

public static final int DATA_TYPE_MARKER
Value for attribute "DataType" indicating that a marker should be drawn at each data point.

See Also:
Constant Field Values

DATA_TYPE_PICTURE

public static final int DATA_TYPE_PICTURE
Value for attribute "DataType" indicating that an image (attribute "Image") should be drawn at each data point. This can be used to draw fancy markers.

See Also:
Constant Field Values

DATA_TYPE_TUBE

public static final int DATA_TYPE_TUBE
Value for attribute "DataType" indicating that an a tube connecting the data points should be drawn. Tubes are similar to lines, but tubes are shaded. The diameter of the tube is controlled by the attribute "LineWidth". Tube color is controlled by the attribute "LineColor".

See Also:
Constant Field Values

DENDROGRAM_TYPE_HORIZONTAL

public static final int DENDROGRAM_TYPE_HORIZONTAL
Flag to indicate a horizontal dendrogram.

See Also:
Constant Field Values

DENDROGRAM_TYPE_VERTICAL

public static final int DENDROGRAM_TYPE_VERTICAL
Flag to indicate a vertical dendrogram.

See Also:
Constant Field Values

FILL_TYPE_GRADIENT

public static final int FILL_TYPE_GRADIENT
Value for attribute "FillType" indicating that the region is to be drawn in a color gradient as specified by the attribute Gradient.

See Also:
Constant Field Values

FILL_TYPE_NONE

public static final int FILL_TYPE_NONE
Value for attribute "FillType" and "FillOutlineType" indicating that the region is not to be drawn.

See Also:
Constant Field Values

FILL_TYPE_PAINT

public static final int FILL_TYPE_PAINT
Value for attribute "FillType" indicating that the region is to be drawn using the texture specified by the attribute FillPaint.

See Also:
Constant Field Values

FILL_TYPE_SOLID

public static final int FILL_TYPE_SOLID
Value for attribute "FillType" and "FillOutlineType" indicating that the region is to be drawn using the solid color specified by the attribute FillColor or FillOutlineColor.

See Also:
Constant Field Values

LABEL_TYPE_PERCENT

public static final int LABEL_TYPE_PERCENT
Flag used to indicate that a pie slice is to be labeled with a percentage value. This attribute only applies to pie charts.

See Also:
AbstractChartNode.setLabelType(int), Constant Field Values

MARKER_TYPE_ASTERISK

public static final int MARKER_TYPE_ASTERISK
Flag for a asterisk data marker.

See Also:
Constant Field Values

MARKER_TYPE_CIRCLE_CIRCLE

public static final int MARKER_TYPE_CIRCLE_CIRCLE
Flag for a circle in a circle data marker.

See Also:
Constant Field Values

MARKER_TYPE_CIRCLE_PLUS

public static final int MARKER_TYPE_CIRCLE_PLUS
Flag for a plus in a circle data marker.

See Also:
Constant Field Values

MARKER_TYPE_CIRCLE_X

public static final int MARKER_TYPE_CIRCLE_X
Flag for an x in a circle data marker.

See Also:
Constant Field Values

MARKER_TYPE_DIAMOND_PLUS

public static final int MARKER_TYPE_DIAMOND_PLUS
Flag for a plus in a diamond data marker.

See Also:
Constant Field Values

MARKER_TYPE_FILLED_CIRCLE

public static final int MARKER_TYPE_FILLED_CIRCLE
Flag for a filled circle data marker.

See Also:
Constant Field Values

MARKER_TYPE_FILLED_DIAMOND

public static final int MARKER_TYPE_FILLED_DIAMOND
Flag for a filled diamond data marker.

See Also:
Constant Field Values

MARKER_TYPE_FILLED_SQUARE

public static final int MARKER_TYPE_FILLED_SQUARE
Flag for a filled square data marker.

See Also:
Constant Field Values

MARKER_TYPE_FILLED_TRIANGLE

public static final int MARKER_TYPE_FILLED_TRIANGLE
Flag for a filled triangle data marker.

See Also:
Constant Field Values

MARKER_TYPE_HOLLOW_CIRCLE

public static final int MARKER_TYPE_HOLLOW_CIRCLE
Flag for a hollow circle data marker.

See Also:
Constant Field Values

MARKER_TYPE_HOLLOW_DIAMOND

public static final int MARKER_TYPE_HOLLOW_DIAMOND
Flag for a hollow diamond data marker.

See Also:
Constant Field Values

MARKER_TYPE_HOLLOW_SQUARE

public static final int MARKER_TYPE_HOLLOW_SQUARE
Flag for a hollow square data marker.

See Also:
Constant Field Values

MARKER_TYPE_HOLLOW_TRIANGLE

public static final int MARKER_TYPE_HOLLOW_TRIANGLE
Flag for hollow triangle data marker.

See Also:
Constant Field Values

MARKER_TYPE_OCTAGON_PLUS

public static final int MARKER_TYPE_OCTAGON_PLUS
Flag for a plus in an octagon data marker.

See Also:
Constant Field Values

MARKER_TYPE_OCTAGON_X

public static final int MARKER_TYPE_OCTAGON_X
Flag for a x in an octagon data marker.

See Also:
Constant Field Values

MARKER_TYPE_PLUS

public static final int MARKER_TYPE_PLUS
Flag for a plus-shaped data marker.

See Also:
Constant Field Values

MARKER_TYPE_SQUARE_PLUS

public static final int MARKER_TYPE_SQUARE_PLUS
Flag for a plus in a square data marker.

See Also:
Constant Field Values

MARKER_TYPE_SQUARE_X

public static final int MARKER_TYPE_SQUARE_X
Flag for an x in a square data marker.

See Also:
Constant Field Values

MARKER_TYPE_X

public static final int MARKER_TYPE_X
Flag for a x-shaped data marker.

See Also:
Constant Field Values

TEXT_X_CENTER

public static final int TEXT_X_CENTER
Value for attribute "TextAlignment" indicating that the text should be centered.

See Also:
Constant Field Values

TEXT_X_LEFT

public static final int TEXT_X_LEFT
Value for attribute "TextAlignment" indicating that the text should be left adjusted. This is the default setting.

See Also:
Constant Field Values

TEXT_X_RIGHT

public static final int TEXT_X_RIGHT
Value for attribute "TextAlignment" indicating that the text should be right adjusted.

See Also:
Constant Field Values

TEXT_Y_BOTTOM

public static final int TEXT_Y_BOTTOM
Value for attribute "TextAlignment" indicating that the text should be drawn on the baseline. This is the default setting.

See Also:
Constant Field Values

TEXT_Y_CENTER

public static final int TEXT_Y_CENTER
Value for attribute "TextAlignment" indicating that the text should be vertically centered.

See Also:
Constant Field Values

TEXT_Y_TOP

public static final int TEXT_Y_TOP
Value for attribute "TextAlignment" indicating that the text should be drawn with the top of the letters touching the top of the drawing region.

See Also:
Constant Field Values
Constructor Detail

ChartNode

public ChartNode(ChartNode parent)
Construct a ChartNode object.

Parameters:
parent - the ChartNode parent of this object
Method Detail

addPickListener

public void addPickListener(PickListener pickListener)
Adds a PickListener to this node. Unlike simple attributes, the pickListener is added to a list of existing PickListeners defined at this node. The existing listeners remain defined at this node. If this pickListener is already registered in this node, it will not be added again.

Parameters:
pickListener - the PickListener to be added to this node

firePickListeners

public void firePickListeners(MouseEvent event)
Fires the pick listeners defined at this node and at all of its ancestors, if the event "hits" the node.

Parameters:
event - MouseEvent which determines which nodes have been selected

getALT

public String getALT()
Returns the value of the "ALT" attribute.

Returns:
The value of the "ALT" attribute.

getAxis

public Axis getAxis()
Returns the value of the "Axis" attribute.

Returns:
the Axis value of the "Axis" attribute

getBackground

public Background getBackground()
Returns the value of the "Background" attribute. This is the node used to draw the chart's background.

Returns:
The Background value of the "Background" attribute, if defined. Otherwise, null is returned.

getBarGap

public double getBarGap()
Returns the value of the "BarGap" attribute.

Returns:
the double value of the "BarGap" attribute, if defined. Otherwise, 0.0 is returned.

getBarType

public int getBarType()
Returns the value of the "BarType" attribute.

Returns:
an int which specifies BarType
See Also:
BAR_TYPE_VERTICAL, BAR_TYPE_HORIZONTAL

getBarWidth

public double getBarWidth()
Returns the value of the "BarWidth" attribute.

Returns:
the double value of the "BarWidth" attribute, if defined. Otherwise, 0.5 is returned.

getChart

public Chart getChart()
Returns the value of the "Chart" attribute. This is the root node of the chart tree.

Returns:
The Chart value of the attribute, if defined. Otherwise, null is returned.

getChartTitle

public ChartTitle getChartTitle()
Returns the value of the "ChartTitle" attribute.

Returns:
the ChartTitle value of the attribute.

getChildren

public final ChartNode[] getChildren()
Returns an array of the children of this node. If there are no children, a 0-length array is returned.

Returns:
a ChartNode array which contains the children of this node

getClipData

public boolean getClipData()
Returns the value of the "ClipData" attribute.

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

getComponent

public Component getComponent()
Returns the value of the "Component" attribute. This is the AWT object into which the chart is rendered.

Returns:
The Component value of the attribute, if defined. Otherwise, null is returned.

getConcatenatedViewport

public double[] getConcatenatedViewport()
Returns the value of the "Viewport" attribute concatenated with the "Viewport" attributes set in its ancestor nodes.

Returns:
a double[4] array containing xmin, xmax, ymin, ymax

getDataType

public int getDataType()
Returns the value of the "DataType" attribute.

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

getDoubleBuffering

public boolean getDoubleBuffering()
Returns the value of the "DoubleBuffering" attribute.

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

getExplode

public double getExplode()
Returns the value of the "Explode" attribute.

Returns:
The double value of the "Explode" attribute, if defined. Otherwise, a default value of zero is returned. (The pie slice begins at the center.)

getFillOutlineColor

public Color getFillOutlineColor()
Returns the value of the "FillOutlineColor" attribute.

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

getFillOutlineType

public int getFillOutlineType()
Returns the value of the "FillOutlineType" attribute.

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

getFillPaint

public Paint getFillPaint()
Returns the value of the "FillPaint" attribute.

Returns:
The value of the "FillPaint" attribute, if defined. Otherwise, null is returned.

getFillType

public int getFillType()
Returns the value of the "FillType" attribute.

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

getGradient

public Color[] getGradient()
Returns the value of the "Gradient" attribute.

Returns:
a Color array which contains the color value of the "Gradient" attribute, if defined. Otherwise, null is returned. The array is of length four, containing {colorLL, colorLR, colorUR, colorUL}.

getHREF

public String getHREF()
Returns the value of the "HREF" attribute.

Returns:
The value of the "HREF" attribute.

getLegend

public Legend getLegend()
Returns the value of the "Legend" attribute.

Returns:
the Legend value of the "Legend" attribute

getLineDashPattern

public double[] getLineDashPattern()
Returns the value of the "LineDashPattern" attribute.

Returns:
double array containing the value of the "LineDashPattern" attribute, if defined. Otherwise, null is returned.

getMarkerDashPattern

public double[] getMarkerDashPattern()
Returns the value of the "MarkerPattern" attribute.

Returns:
The double array which contains the value of the "MarkerPattern" attribute, if defined. Otherwise, null is returned.

getMarkerThickness

public double getMarkerThickness()
Returns the value of the "MarkerThickness" attribute.

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

getMarkerType

public int getMarkerType()
Returns the value of the "MarkerType" attribute.

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

getParent

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

Returns:
A ChartNode 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.

getReference

public double getReference()
Returns the value of the "Reference" attribute.

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

getScreenAxis

public AxisXY getScreenAxis()
Returns the value of the "ScreenAxis" attribute. This provides a default mapping from the user coordinates [0,1] by [0,1] to the screen. This is set by the root Chart node, so there is no setScreenAxis function.

Returns:
The AxisXY value of the "ScreenAxis" attribute
See Also:
Chart

getScreenSize

public Dimension getScreenSize()
Returns the value of the "ScreenSize" attribute.

Returns:
The Dimension value of the "ScreenSize" attribute, if defined. Otherwise, the size of the "Component" attribute is returned. If neither the "ScreenSize" nor the "Component" attributes are defined then null is returned.

getScreenViewport

public int[] getScreenViewport()
Returns the value of the "Viewport" attribute scaled by the screen size.

Returns:
the int[4] value of the "Viewport" attribute scaled by the screen size containing the pixel coordinates for xmin, xmax, ymin, ymax

getSize

public Dimension getSize()
Returns the value of the "Size" attribute.

Returns:
the Dimension value of the "Size" attribute

getSkipWeekends

public boolean getSkipWeekends()
Returns the value of the "SkipWeekends" attribute. If true then autoscaling will not select an interval of less than a day.

Returns:
the value of the "SkipWeekend" attribute..

getTextAngle

public int getTextAngle()
Returns the value of the "TextAngle" attribute.

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

getTextColor

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

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

getTitle

public Text getTitle()
Returns the value of the "Title" attribute.

Returns:
the Text value of the "Title" attribute

getToolTip

public String getToolTip()
Returns the value of the "ToolTip" attribute.

Returns:
the String value of the "ToolTip" attribute

getViewport

public double[] getViewport()
Returns the value of the "Viewport" attribute.

Returns:
a double[4] array containing xmin, xmax, ymin, ymax

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

paint

public abstract void paint(Draw draw)
Paints this node and all of its children.

Parameters:
draw - the Draw object to be painted

prePaint

public void prePaint()
The prePaint method is called in all nodes in a chart just before the chart is painted. The default implementation does nothing. Override this method to do computations just before painting in a chart node.


removePickListener

public void removePickListener(PickListener pickListener)
Removes a PickListener from this node.

Parameters:
pickListener - the PickListener to be removed from this node

setALT

public void setALT(String value)
Sets the value of the "ALT" attribute. The "ALT" attribute is used when client-side image maps are generated. A client-side image map has an entry for each node in which the chart attribute HREF is defined. Some browsers use the alt tag value as tooltip text. *

Parameters:
value - "ALT" value.

setBarGap

public void setBarGap(double value)
Sets the value of the "BarGap" attribute. This is the gap between bars in a group. A gap of 1.0 means that space between bars is the same as the width of an individual bar in the group.

Parameters:
value - the double "BarGap" value

setBarType

public void setBarType(int value)
Sets the value of the "BarType" attribute.

Parameters:
value - an int which specifies BarType. Legal values are BAR_TYPE_VERTICAL or BAR_TYPE_HORIZONTAL.
See Also:
BAR_TYPE_VERTICAL, BAR_TYPE_HORIZONTAL

setBarWidth

public void setBarWidth(double value)
Sets the value of the "BarWidth" attribute. This is the width of all of the groups of bars at each index.

Parameters:
value - the double "BarWidth" value.

setChartTitle

public void setChartTitle(ChartTitle value)
Sets the value of the "ChartTitle" attribute. This is effective only in the Chart node, where it replaces the existing ChartTitle node. The Chart node constructor creates a ChartTitle node and uses it to define its "ChartTitle" attribute, so there is generally no need to call this routine.

Parameters:
value - ChartTitle node

setClipData

public void setClipData(boolean value)
Sets the value of the "ClipData" attribute. This indicates that the data elements are to be clipped to the current window.

Parameters:
value - "ClipData" value

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.

Overrides:
setCustomTransform in class AbstractChartNode
Parameters:
value - an object implementing the Transform interface.
See Also:
AbstractChartNode.TRANSFORM_CUSTOM

setDataType

public void setDataType(int value)
Sets the value of the "DataType" attribute.

Parameters:
value - "DataType" value. This should be some xor-ed combination of DATA_TYPE_LINE, DATA_TYPE_MARKER.

setDoubleBuffering

public void setDoubleBuffering(boolean value)
Sets the value of the "DoubleBuffering" attribute. Double buffering reduces flicker when the screen is updated. This attribute only has an effect if it is set at the root node of the chart tree.

Parameters:
value - boolean "DoubleBuffering" value

setExplode

public void setExplode(double value)
Sets the value of the "Explode" attribute. This attribute controls how far from the center pie slices are drawn. The scale is proportional to the pie chart's radius.

Parameters:
value - a double "Explode" value. This attribute controls how far from the center pie slices are drawn. The scale is proportional to the pie chart's radius.

setFillOutlineColor

public void setFillOutlineColor(Color color)
Sets the value of the "FillOutlineColor" attribute.

Parameters:
color - a Color "FillOutlineColor" value.

setFillOutlineColor

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

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

setFillOutlineType

public void setFillOutlineType(int value)
Sets the value of the "FillOutlineType" attribute.

Parameters:
value - "FillOutlineType" value. This value should be FILL_TYPE_NONE or FILL_TYPE_SOLID.

setFillPaint

public void setFillPaint(ImageIcon imageIcon)
Sets the value of the "FillPaint" attribute.

Parameters:
imageIcon - is used to create a Paint object that is used as the value of the "FillPaint" attribute.
See Also:
Paint

setFillPaint

public void setFillPaint(Paint value)
Sets the value of the "FillPaint" attribute.

Parameters:
value - "FillPaint" value.

setFillPaint

public void setFillPaint(URL urlImage)
Sets the value of the "FillPaint" attribute.

Parameters:
urlImage - is the URL of an image used to set the FillPaint attribute.
See Also:
setFillPaint(javax.swing.ImageIcon)

setFillType

public void setFillType(int value)
Sets the value of the "FillType" attribute.

Parameters:
value - "FillType" value. This value should be FILL_TYPE_NONE, FILL_TYPE_SOLID, FILL_TYPE_GRADIENT or FILL_TYPE_PAINT.
See Also:
FILL_TYPE_NONE, FILL_TYPE_SOLID, FILL_TYPE_GRADIENT, FILL_TYPE_PAINT

setGradient

public void setGradient(Color[] colorGradient)
Sets the value of the "Gradient" attribute.

Parameters:
colorGradient - is a Color array of length four, containing the colors at the lower left, lower right, upper right and upper left corners of the bounding box of the regions being filled. See setGradient(java.awt.Color,java.awt.Color,java.awt.Color,java.awt.Color) for details on the interpretation of these colors.

setGradient

public void setGradient(Color colorLL,
                        Color colorLR,
                        Color colorUR,
                        Color colorUL)
Sets the value of the "Gradient" attribute.

Parameters:
colorLL - Color value which specifies the color of the lower left corner.
colorLR - Color value which specifies the color of the lower right corner.
colorUR - Color value which specifies the color of the upper right corner.
colorUL - Color value which specifies the color of the upper left corner.

This attribute defines a color gradient used to fill regions. Only two of the four colors given are actually used.

If colorLL==colorLR and colorUL==colorUR then a vertical gradient is drawn.
If colorLL==colorUL and colorLR==colorUR then a horizontal gradient is drawn.
If colorLR==null and colorUL==null then a diagonal gradient is used.
If colorLL==null and colorUR==null then a diagonal gradient is used.
If none of these conditions is met then no gradient is drawn.

See Also:
AbstractChartNode.setFillColor(java.awt.Color), setFillPaint(java.awt.Paint)

setGradient

public void setGradient(String colorLL,
                        String colorLR,
                        String colorUR,
                        String colorUL)
Sets the value of the "Gradient" attribute using named colors.

Parameters:
colorLL - String value which specifies the color of the lower left corner.
colorLR - String value which specifies the color of the lower right corner.
colorUR - String value which specifies the color of the upper right corner.
colorUL - String value which specifies the color of the upper left corner. This attribute defines a color gradient used to fill regions. Only two of the four colors given are actually used.
If colorLL==colorLR and colorUL==colorUR then a vertical gradient is drawn.
If colorLL==colorUL and colorLR==colorUR then a horizontal gradient is drawn.
If colorLR==null and colorUL==null then a diagonal gradient is used.
If colorLL==null and colorUR==null then a diagonal gradient is used.
If none of these conditions is met then no gradient is drawn.
See Also:
AbstractChartNode.parseColor(java.lang.String), AbstractChartNode.setFillColor(java.awt.Color), setFillPaint(java.awt.Paint)

setHREF

public void setHREF(String value)
Sets the value of the "HREF" attribute. The "HREF" attribute is used when client-side image maps are generated. A client-side image map has an entry for each node in which the chart attribute HREF is defined. The values of HREF attributes are URLs. Such regions treated by the browser as hyperlinks.

Parameters:
value - "HREF" value.

setImage

public void setImage(Image value)
Sets the value of the "Image" attribute. This function also loads the image, if necessary, using the java.awt.MediaTracker class. The component associated with this chart is redrawn after the image is loaded by MediaTracker.

Note that Image objects are not serializable and their presence in the chart tree will make the entire chart non-serializable. javax.swing.ImageIcon objects are serializable.

Parameters:
value - Image value.
See Also:
AbstractChartNode.setImage(javax.swing.ImageIcon value)

setLineDashPattern

public void setLineDashPattern(double[] value)
Sets the value of the "LineDashPattern" attribute.

Parameters:
value - double "LineDashPattern" value.

setMarkerDashPattern

public void setMarkerDashPattern(double[] value)
Sets the value of the "MarkerDashPattern" attribute.

Parameters:
value - double array which contains the "MarkerDashPattern" value.

setMarkerThickness

public void setMarkerThickness(double width)
Sets the value of the "MarkerThickness" attribute. This determines the line thickness used to draw the markers. The default marker width is 1.0. If "MarkerThickness" is 2.0 then markers are drawn twice as thick as normal.

Parameters:
width - the double "MarkerThickness" value.

setMarkerType

public void setMarkerType(int type)
Sets the value of the "MarkerType" attribute. This indicates which marker is to be drawn.

Parameters:
type - the int "MarkerType" value.
See Also:
MARKER_TYPE_PLUS, MARKER_TYPE_ASTERISK, MARKER_TYPE_X, MARKER_TYPE_HOLLOW_SQUARE, MARKER_TYPE_HOLLOW_TRIANGLE, MARKER_TYPE_HOLLOW_DIAMOND, MARKER_TYPE_DIAMOND_PLUS, MARKER_TYPE_SQUARE_X, MARKER_TYPE_SQUARE_PLUS, MARKER_TYPE_OCTAGON_X, MARKER_TYPE_OCTAGON_PLUS, MARKER_TYPE_HOLLOW_CIRCLE, MARKER_TYPE_CIRCLE_X, MARKER_TYPE_CIRCLE_PLUS, MARKER_TYPE_CIRCLE_CIRCLE, MARKER_TYPE_FILLED_SQUARE, MARKER_TYPE_FILLED_TRIANGLE, MARKER_TYPE_FILLED_DIAMOND, MARKER_TYPE_FILLED_CIRCLE

setReference

public void setReference(double value)
Sets the value of the "Reference" attribute. This is used as the baseline in drawing area charts. It is also used as the angle (in degrees) of the first slice in a pie chart.

Parameters:
value - the double "Reference" value

setScreenSize

public void setScreenSize(Dimension value)
Sets the value of the "ScreenSize" attribute.

Parameters:
value - the Dimension "ScreenSize" value.

setSize

public void setSize(Dimension value)
Sets the value of the "Size" attribute.

Parameters:
value - the Dimension "Size" value

setSkipWeekends

public void setSkipWeekends(boolean skipWeekends)
Sets the value of the "SkipWeekends" attribute. If this attribute is true and weekends are skipped on date axes. (A date axis is an Axis1D whose AxisLabel has a TextFormat value that extends java.text.DateFormat.)

If this attribute is set to true, the attribute "AutoscaleMinimumTimeInterval" should also be set to value of a day or longer.

Parameters:
skipWeekends - the boolean value.
See Also:
AbstractChartNode.setAutoscaleMinimumTimeInterval(int)

setTextAngle

public void setTextAngle(int value)
Sets the value of the "TextAngle" attribute. This indicates the angle, in degrees, at which text is to be drawn. Only multiples of 90 are allowed at this time.

Parameters:
value - an int "TextAngle" value

setTextColor

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

Overrides:
setTextColor in class AbstractChartNode
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.

Overrides:
setTextColor in class AbstractChartNode
Parameters:
color - String name of a color.
See Also:
AbstractChartNode.parseColor(java.lang.String)

setTitle

public void setTitle(String value)
Sets the value of the "Title" attribute.

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

setTitle

public void setTitle(Text value)
Sets the value of the "Title" attribute.

Parameters:
value - a Text which contains the "Title" value

setToolTip

public void setToolTip(String value)
Sets the value of the "ToolTip" attribute.

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

setViewport

public void setViewport(double[] value)
Sets the value of the "Viewport" attribute. The viewport is the subregion of the drawing surface where the plot is to be drawn. "Viewport" coordinates are [0,1] by [0,1] with (0,0) in the upper left corner. This attribute affects only Axis nodes, since they contain the mappings to device space.

Parameters:
value - A double array of length 4 which contains the "Viewport" values for xmin, xmax, ymin, ymax. The value saved is a copy of the input array.
See Also:
Axis

setViewport

public void setViewport(double xmin,
                        double xmax,
                        double ymin,
                        double ymax)
Sets the value of the "Viewport" attribute.

Parameters:
xmin - a double, the left side of the viewport
xmax - a double, the right side of the viewport
ymin - a double, the bottom side of the viewport
ymax - a double, the top side of the viewport

JMSLTM Numerical Library 6.1

Copyright © 1970-2010 Visual Numerics, Inc.
Built July 30 2010.