JComponentPack 1.5.0

com.zfqjava.chart
Class TextNode

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

public class TextNode
extends AbstractNode

TextNode provides a node contains a text.


Constructor Summary
TextNode()
          Constructs a text node with the empty text.
TextNode(String text)
          Constructs a text node with the specify text c.
 
Method Summary
 Object clone()
           
 void doLayout()
          Layout the children nodes.
protected  void drawShape(Graphics2D g, Shape s)
           
 Dimension getPreferredSize()
          Returns the preferred size of this node.
 String getText()
          Returns the text for this node.
 void setText(String text)
          Sets the text for this node.
 
Methods inherited from class com.zfqjava.chart.AbstractNode
addHandle, addHandle, addLink, addNode, addNode, addNode, addNode, configureShape, configureShape, contains, contains, contains, createHandles, createPaintShape, 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, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextNode

public TextNode()
Constructs a text node with the empty text.


TextNode

public TextNode(String text)
Constructs a text node with the specify text c.

Parameters:
text - the text for this node
Throws:
NullPointerException - if the text is null
Method Detail

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

doLayout

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

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

getText

public String getText()
Returns the text for this node.

Returns:
the text for this node

setText

public void setText(String text)
Sets the text for this node.

Parameters:
text - the text for this node

drawShape

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

clone

public Object clone()
Overrides:
clone in class AbstractNode

JComponentPack 1.5.0

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