JComponentPack 1.5.0

com.zfqjava.chart
Class AxisNode

java.lang.Object
  extended by com.zfqjava.chart.AbstractNode
      extended by com.zfqjava.chart.AbstractLink
          extended by com.zfqjava.chart.AxisNode
All Implemented Interfaces:
Link, Node, Cloneable

public class AxisNode
extends AbstractLink

AxisNode provides a axis ndoe. AxisNode is immutable.


Constructor Summary
AxisNode()
          Constructs a axis node.
AxisNode(AxisMode axisMode)
          Constructs a axis node with the specified axis mode.
 
Method Summary
protected  void configureLinkShape(Shape s, int x1, int y1, int x2, int y2)
          Configure the shape when the link's location has been changed.
 boolean contains(int x, int y)
          Determines whether this node contains the specify point.
protected  Shape createPaintShape()
          Creates the paint shape.
 void doLayout()
          Layout the children nodes.
protected  void drawShape(Graphics2D g, Shape s)
           
 Arrow getArrow()
          Returns the arrow for this AxisNode.
 AxisMode getAxisMode()
          Returns the axis mode.
 NumberFormat getFormat()
          Returns the format for label string.
 ListModel getLabelModel()
          Returns the label model.
 int getMajorTickCount()
          Returns the major tick count.
 int getMajorTickSpacing()
          Returns the major tick spacing.
 int getMinorTickCount()
          Returns the minor tick count.
 int getMinorTickSpacing()
          Returns the minor tick spacing.
 int getOriginX()
          Returns the origin x coordinate.
 int getOriginY()
          Returns the origin y coordinate.
 Dimension getPreferredSize()
          Returns the preferred size of this node.
 TickMode getTickMode()
          Returns the tick mode for this axis node.
 int getTinyTickCount()
          Returns the tiny tick count.
 int getTinyTickSpacing()
          Returns the tiny tick spacing.
 boolean isLabelPainted()
          Returns the major label painted.
 boolean isMajorTickPainted()
          Returns the major tick painted.
 boolean isMinorTickPainted()
          Returns the minor tick painted.
 boolean isTinyTickPainted()
          Returns the tiny tick painted.
 void setArrow(Arrow arrow)
          Sets the arrow for this AxisNode.
 void setFormat(NumberFormat format)
          Sets the format for label string.
 void setLabelModel(ListModel labelModel)
          Sets the label model.
 void setLabelPainted(boolean labelPainted)
          Sets the major label painted.
 void setMajorTickCount(int majorTickCount)
          Sets the major tick count.
 void setMajorTickPainted(boolean majorTickPainted)
          Sets the major tick painted.
 void setMajorTickSpacing(int majorTickSpacing)
          Sets the major tick spacing.
 void setMinorTickCount(int minorTickCount)
          Sets the minor tick count.
 void setMinorTickPainted(boolean minorTickPainted)
          Sets the minor tick painted.
 void setMinorTickSpacing(int minorTickSpacing)
          Sets the minor tick spacing.
 void setOriginX(int x)
          Sets the origin x coordinate.
 void setOriginY(int y)
          Sets the origin y coordinate.
 void setTickMode(TickMode tickMode)
          Sets the tick mode for this axis node.
 void setTinyTickCount(int tinyTickCount)
          Sets the tiny tick count.
 void setTinyTickPainted(boolean tinyTickPainted)
          Sets the tiny tick painted.
 void setTinyTickSpacing(int tinyTickSpacing)
          Sets the tiny tick spacing.
 
Methods inherited from class com.zfqjava.chart.AbstractLink
addArrow, addPoint, configureLinkShape, configureLinkShape, createHandles, getArrowCount, getArrowList, getEndArrow, getEndNode, getEndX, getEndY, getMaxPointCount, getMinPointCount, getPointCount, getPointX, getPointY, getStartArrow, getStartNode, getStartX, getStartY, removeArrow, removePoint, reset, setEndArrow, setEndLocation, setEndNode, setLocation, setStartArrow, setStartLocation, setStartNode, toString
 
Methods inherited from class com.zfqjava.chart.AbstractNode
addHandle, addHandle, addLink, addNode, addNode, addNode, addNode, clone, configureShape, configureShape, contains, contains, fillShape, findNodeAt, getBounds, getCellBounds, getCenterX, getCenterY, getChart, getCursor, getDrawComposite, getDrawPaint, getFillComposite, getFillPaint, getFont, getHandleCount, getHandleList, getHeight, getLayout, getLinkCount, getLinkList, getLock, getMargin, getName, getNode, getNodeCount, getNodeList, getPaintBounds, getPaintShape, getShadowComposite, getShadowPaint, getShadowTransform, getStroke, getToolTipText, getToolTipText, getTransform, getUserObject, getWidth, getX, getY, indexOfNode, intersects, intersects, isAdjustable, isCellable, isDrawable, isEditable, isEmpty, isFillable, isGroupable, isLinkable, isMovable, isPreferredSizeSet, isResizable, isRotatable, isSelectable, isShadowable, isVisible, paint, paintNodes, paramString, removeAllNode, removeHandle, removeHandle, removeLink, removeNode, removeNode, removeNode, repaint, repaint, repaint, revalidate, setAdjustable, setBounds, setBounds, setCellable, setCenterLocation, setChart, setCursor, setDrawable, setDrawComposite, setDrawPaint, setEditable, setFillable, setFillComposite, setFillPaint, setFont, setGroupable, setLayout, setLinkable, setLocation, setMargin, setMovable, setName, setPaintShape, setPreferredSize, setResizable, setRotatable, setSelectable, setShadowable, setShadowComposite, setShadowPaint, setShadowTransform, setSize, setStroke, setToolTipText, setTransform, setUserObject, setVisible
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.zfqjava.chart.Node
addHandle, addHandle, addLink, addNode, addNode, addNode, addNode, contains, contains, findNodeAt, getBounds, getCellBounds, getCenterX, getCenterY, getChart, getCursor, getDrawComposite, getDrawPaint, getFillComposite, getFillPaint, getFont, getHandleCount, getHandleList, getHeight, getLayout, getLinkCount, getLinkList, getLock, getMargin, getName, getNode, getNodeCount, getNodeList, getPaintBounds, getShadowComposite, getShadowPaint, getShadowTransform, getStroke, getToolTipText, getToolTipText, getTransform, getUserObject, getWidth, getX, getY, indexOfNode, intersects, intersects, isAdjustable, isCellable, isDrawable, isEditable, isEmpty, isFillable, isGroupable, isLinkable, isMovable, isPreferredSizeSet, isResizable, isRotatable, isSelectable, isShadowable, isVisible, paint, removeAllNode, removeHandle, removeHandle, removeLink, removeNode, removeNode, removeNode, repaint, repaint, repaint, revalidate, setAdjustable, setBounds, setBounds, setCellable, setCenterLocation, setChart, setCursor, setDrawable, setDrawComposite, setDrawPaint, setEditable, setFillable, setFillComposite, setFillPaint, setFont, setGroupable, setLayout, setLinkable, setLocation, setMargin, setMovable, setName, setPreferredSize, setResizable, setRotatable, setSelectable, setShadowable, setShadowComposite, setShadowPaint, setShadowTransform, setSize, setStroke, setToolTipText, setTransform, setUserObject, setVisible
 

Constructor Detail

AxisNode

public AxisNode()
Constructs a axis node. The default axis mode is x axis.


AxisNode

public AxisNode(AxisMode axisMode)
Constructs a axis node with the specified axis mode.

Method Detail

contains

public boolean contains(int x,
                        int y)
Description copied from interface: Node
Determines whether this node contains the specify point.

Specified by:
contains in interface Node
Overrides:
contains in class AbstractNode
Parameters:
x - the x coordinate of the point
y - the y coordinate of the point
Returns:
true if this node contains the specify point, otherwise return false

createPaintShape

protected Shape createPaintShape()
Description copied from class: AbstractNode
Creates the paint shape.

Overrides:
createPaintShape in class AbstractNode
Returns:
the paint shape

configureLinkShape

protected void configureLinkShape(Shape s,
                                  int x1,
                                  int y1,
                                  int x2,
                                  int y2)
Description copied from class: AbstractLink
Configure the shape when the link's location has been changed.

Overrides:
configureLinkShape in class AbstractLink
Parameters:
s - the paint shape of this link.
x1 - the start x location
y1 - the start y location
x2 - the end x location
y2 - the end y location

getAxisMode

public AxisMode getAxisMode()
Returns the axis mode.

Returns:
the axis mode

setOriginX

public void setOriginX(int x)
Sets the origin x coordinate.

Parameters:
x - the the origin x coordinate

setOriginY

public void setOriginY(int y)
Sets the origin y coordinate.

Parameters:
y - the the origin y coordinate

getOriginX

public int getOriginX()
Returns the origin x coordinate.

Returns:
the origin x coordinate

getOriginY

public int getOriginY()
Returns the origin y coordinate.

Returns:
the origin y coordinate

setTickMode

public void setTickMode(TickMode tickMode)
Sets the tick mode for this axis node.

Parameters:
tickMode - the tick mode
See Also:
getTickMode()

getTickMode

public TickMode getTickMode()
Returns the tick mode for this axis node.

Returns:
the tick mode

setArrow

public void setArrow(Arrow arrow)
Sets the arrow for this AxisNode.

Parameters:
arrow - the arrow
See Also:
getArrow()

getArrow

public Arrow getArrow()
Returns the arrow for this AxisNode.

Returns:
the arrow

setMajorTickSpacing

public void setMajorTickSpacing(int majorTickSpacing)
Sets the major tick spacing.

Parameters:
majorTickSpacing - the spacing
See Also:
getMajorTickSpacing()

getMajorTickSpacing

public int getMajorTickSpacing()
Returns the major tick spacing.

Returns:
the spacing
See Also:
setMajorTickSpacing(int)

setMinorTickSpacing

public void setMinorTickSpacing(int minorTickSpacing)
Sets the minor tick spacing.

Parameters:
minorTickSpacing - the spacing
See Also:
getMinorTickSpacing()

getMinorTickSpacing

public int getMinorTickSpacing()
Returns the minor tick spacing.

Returns:
the spacing
See Also:
setMinorTickSpacing(int)

setTinyTickSpacing

public void setTinyTickSpacing(int tinyTickSpacing)
Sets the tiny tick spacing.

Parameters:
tinyTickSpacing - the spacing
See Also:
getTinyTickSpacing()

getTinyTickSpacing

public int getTinyTickSpacing()
Returns the tiny tick spacing.

Returns:
the spacing
See Also:
setTinyTickSpacing(int)

setMajorTickPainted

public void setMajorTickPainted(boolean majorTickPainted)
Sets the major tick painted.

Parameters:
majorTickPainted - the painted
See Also:
isMajorTickPainted()

isMajorTickPainted

public boolean isMajorTickPainted()
Returns the major tick painted.

Returns:
the painted
See Also:
setMajorTickPainted(boolean)

setMinorTickPainted

public void setMinorTickPainted(boolean minorTickPainted)
Sets the minor tick painted.

Parameters:
minorTickPainted - the painted
See Also:
isMinorTickPainted()

isMinorTickPainted

public boolean isMinorTickPainted()
Returns the minor tick painted.

Returns:
the painted
See Also:
setMinorTickPainted(boolean)

setTinyTickPainted

public void setTinyTickPainted(boolean tinyTickPainted)
Sets the tiny tick painted.

Parameters:
tinyTickPainted - the painted
See Also:
isTinyTickPainted()

isTinyTickPainted

public boolean isTinyTickPainted()
Returns the tiny tick painted.

Returns:
the painted
See Also:
setTinyTickPainted(boolean)

setLabelPainted

public void setLabelPainted(boolean labelPainted)
Sets the major label painted.

Parameters:
labelPainted - the painted
See Also:
isLabelPainted()

isLabelPainted

public boolean isLabelPainted()
Returns the major label painted.

Returns:
the painted
See Also:
setLabelPainted(boolean)

getPreferredSize

public Dimension getPreferredSize()
Description copied from interface: Node
Returns the preferred size of this node.

Specified by:
getPreferredSize in interface Node
Overrides:
getPreferredSize in class AbstractNode
Returns:
the node preferred size

drawShape

protected void drawShape(Graphics2D g,
                         Shape s)
Overrides:
drawShape in class AbstractLink

doLayout

public void doLayout()
Description copied from interface: Node
Layout the children nodes.

Specified by:
doLayout in interface Node
Overrides:
doLayout in class AbstractLink

setLabelModel

public void setLabelModel(ListModel labelModel)
Sets the label model.

Parameters:
labelModel - the label model
See Also:
getLabelModel()

getLabelModel

public ListModel getLabelModel()
Returns the label model.

Returns:
the label model
See Also:
setLabelModel(javax.swing.ListModel)

setFormat

public void setFormat(NumberFormat format)
Sets the format for label string.

Parameters:
format - the format for label string
See Also:
getFormat()

getFormat

public NumberFormat getFormat()
Returns the format for label string.

Returns:
the format
See Also:
setFormat(java.text.NumberFormat)

getMajorTickCount

public int getMajorTickCount()
Returns the major tick count.

Returns:
the major tick count
Since:
JDataGrid 2.0
See Also:
setMajorTickCount(int)

setMajorTickCount

public void setMajorTickCount(int majorTickCount)
Sets the major tick count.

Parameters:
majorTickCount - the major tick count
Since:
JDataGrid 2.0
See Also:
getMajorTickCount()

getMinorTickCount

public int getMinorTickCount()
Returns the minor tick count.

Returns:
the minor tick count
Since:
JDataGrid 2.0
See Also:
setMinorTickCount(int)

setMinorTickCount

public void setMinorTickCount(int minorTickCount)
Sets the minor tick count.

Parameters:
minorTickCount - the minor tick count
Since:
JDataGrid 2.0
See Also:
getMinorTickCount()

getTinyTickCount

public int getTinyTickCount()
Returns the tiny tick count.

Returns:
the tiny tick count
Since:
JDataGrid 2.0
See Also:
setTinyTickCount(int)

setTinyTickCount

public void setTinyTickCount(int tinyTickCount)
Sets the tiny tick count.

Parameters:
tinyTickCount - the tiny tick count
Since:
JDataGrid 2.0
See Also:
getTinyTickCount()

JComponentPack 1.5.0

Send your Feedback
JComponentPack 1.5.0
Copyright © 2001-2007 Extreme Component, Inc. All rights reserved.