JComponentPack 1.3.0

com.zfqjava.chart
Interface Node

All Known Subinterfaces:
Arrow, Handle, Link, Path, Tool
All Known Implementing Classes:
AbstractLink, AbstractNode, ArcNode, AxisNode, BarChart, BasicChart, BasicTool, Chart, ComponentNode, ConeNode, CubeNode, CurveLink, CurveNode, CylinderNode, DiamondNode, ElbowLink, ElbowNode, EllipseNode, GridNode, GroupNode, HexagonNode, ImageNode, LegendNode, LineChart, LineLink, LineNode, NoteNode, ParallelogramNode, PathLink, PieChart, PolygonLink, PolygonNode, PolylineLink, PyramidNode, RectangleNode, RoundRectangleNode, ShapeArrow, ShapeLink, ShapeNode, SphereNode, StarNode, TextNode, TrapeziumNode, TrapezoidNode, TriangleNode, WallNode, XYChart

public interface Node

Node provides a node on chart container.


Method Summary
 void addHandle(Handle handle)
          Adds the handle to this node.
 void addHandle(Handle handle, int index)
          Adds the handle to this node.
 void addLink(Link link)
          Adds the link to this node.
 void addNode(List nodes)
          Adds the nodes to this chart
 void addNode(List nodes, int index)
          Adds the nodes to this chart at the specified index
 void addNode(Node node)
          Adds a node to this node.
 void addNode(Node node, int index)
          Adds a node to this node at the specify index.
 boolean contains(int x, int y)
          Determines whether this node contains the specify point.
 boolean contains(int x, int y, int width, int height)
          Determines whether this node contains the specify bound.
 boolean contains(Rectangle bound)
          Determines whether this node contains the specify bound.
 void doLayout()
          Layout the children nodes.
 Node findNodeAt(int x, int y)
          Finds the node contains the point x, y.
 Rectangle getBounds(Rectangle rect)
          Returns the node bounds.
 Rectangle getCellBounds(Rectangle rect)
          Returns the node cell bounds.
 int getCenterX()
          Returns the x center coordinate.
 int getCenterY()
          Returns the y center coordinate.
 Chart getChart()
          Returns the chart container
 Cursor getCursor()
          Returns the cursor for current node.
 Composite getDrawComposite()
          Returns the draw composite for current node.
 Paint getDrawPaint()
          Returns the draw paint for current node.
 Composite getFillComposite()
          Returns the fill composite for current node.
 Paint getFillPaint()
          Returns the fill paint for current node.
 Font getFont()
          Returns the font for current node.
 int getHandleCount()
          Returns the number of the handle added to this node.
 List getHandleList()
          Returns a read-only handle list.
 int getHeight()
          Returns the height.
 Layout getLayout()
          Returns the layout for this node.
 int getLinkCount()
          Returns the number of the link added to this node.
 List getLinkList()
          Returns a read-only link list.
 Object getLock()
          Returns the lock for this node.
 Insets getMargin()
          Returns the margin between the node cell bounds and its contents.
 String getName()
          Returns the node name.
 Node getNode(int index)
          Returns the node at the specified index.
 int getNodeCount()
          Returns the number of the nodes in this node.
 List getNodeList()
          Returns a read-only node list that add into this node.
 Rectangle getPaintBounds(Rectangle rect)
          Returns the node paint bounds.
 Dimension getPreferredSize()
          Returns the preferred size of this node.
 Composite getShadowComposite()
          Returns the shadow composite for current node.
 Paint getShadowPaint()
          Returns the shadow paint.
 AffineTransform getShadowTransform()
          Returns the shadow transform for current node.
 Stroke getStroke()
          Returns the stroke for current node.
 String getToolTipText()
          Returns the tool tip text for this node.
 String getToolTipText(int x, int y)
          Returns the tool tip text for the specified point.
 AffineTransform getTransform()
          Returns the transform for current node.
 Object getUserObject()
          Returns the user object for this node.
 int getWidth()
          Returns the width.
 int getX()
          Returns the x location.
 int getY()
          Returns the y location.
 int indexOfNode(Node node)
          Returns the index for the specified node.
 boolean intersects(int x, int y, int width, int height)
          Tests this node whether intersects the specified bound.
 boolean intersects(Rectangle bound)
          Tests this node whether intersects the specified bound.
 boolean isAdjustable()
          Returns the adjustable property.
 boolean isCellable()
          Returns the cellable property.
 boolean isDrawable()
          Returns the drawable property.
 boolean isEditable()
          Returns the editable property.
 boolean isEmpty()
          Determines whether this node is empty.
 boolean isFillable()
          Returns the fillable property.
 boolean isGroupable()
          Returns the groupable property.
 boolean isLinkable()
          Returns the linkable property.
 boolean isMovable()
          Returns the movable property.
 boolean isPreferredSizeSet()
           
 boolean isResizable()
          Returns the resizable property.
 boolean isRotatable()
          Returns the rotatable property.
 boolean isSelectable()
          Returns the selectable property.
 boolean isShadowable()
          Returns the shadowable property.
 boolean isVisible()
          Returns the visible property.
 void paint(Graphics2D g)
          Paints itself.
 void removeAllNode()
          Removes all nodes from this node.
 void removeHandle(Handle handle)
          Removes the handle from this node.
 void removeHandle(int index)
          Removes the handle from this node.
 void removeLink(Link link)
          Removes the link from this node.
 void removeNode(int index)
          Removes the node at the specified index from this node.
 void removeNode(List nodes)
          Removes the specified nodes.
 void removeNode(Node node)
          Removes the node from this node.
 void repaint()
          Repaints itself.
 void repaint(int x, int y, int width, int height)
          Repaints the specified area.
 void repaint(Rectangle bounds)
          Repaints the specified area.
 void revalidate()
          Revalidates itself.
 void setAdjustable(boolean b)
          Sets the adjustable property.
 void setBounds(int x, int y, int width, int height)
          Sets the node bounds.
 void setBounds(Rectangle bounds)
          Sets the node bounds.
 void setCellable(boolean b)
          Sets the cellable property.
 void setCenterLocation(int x, int y)
          Sets the center location.
 void setChart(Chart chart)
          Sets the chart container.
 void setCursor(Cursor c)
          Sets the cursor for current node.
 void setDrawable(boolean b)
          Sets the drawable property.
 void setDrawComposite(Composite c)
          Sets the draw composite for current node.
 void setDrawPaint(Paint p)
          Sets the draw paint for current node.
 void setEditable(boolean b)
          Sets the editable property.
 void setFillable(boolean b)
          Sets the fillable property.
 void setFillComposite(Composite c)
          Sets the fill composite for current node.
 void setFillPaint(Paint p)
          Sets the fill paint for current node.
 void setFont(Font f)
          Sets the font for current node.
 void setGroupable(boolean b)
          Sets the groupable property.
 void setLayout(Layout layout)
          Sets the layout.
 void setLinkable(boolean b)
          Sets the linkable property.
 void setLocation(int x, int y)
          Sets the location.
 void setMargin(Insets m)
          Sets the margin between the node cell bounds and its contents.
 void setMovable(boolean b)
          Sets the movable property.
 void setName(String name)
          Sets the node name.
 void setPreferredSize(Dimension d)
          Sets the preferred size of this node.
 void setResizable(boolean b)
          Sets the resizable property.
 void setRotatable(boolean b)
          Sets the rotatable property.
 void setSelectable(boolean b)
          Sets the selectable property.
 void setShadowable(boolean b)
          Sets the shadowable property.
 void setShadowComposite(Composite c)
          Sets the shadow composite for current node.
 void setShadowPaint(Paint p)
          Sets the shadow paint.
 void setShadowTransform(AffineTransform at)
          Sets the shadow transform for current node.
 void setSize(int width, int height)
          Sets the size.
 void setStroke(Stroke s)
          Sets the stroke for current node.
 void setToolTipText(String toolTipText)
          Sets the tool tip text for this node.
 void setTransform(AffineTransform at)
          Sets the transform for current node.
 void setUserObject(Object userObject)
          Sets the user object for this node.
 void setVisible(boolean b)
          Sets the visible property.
 

Method Detail

getLock

Object getLock()
Returns the lock for this node.


setName

void setName(String name)
Sets the node name.

Parameters:
name - the node name
See Also:
getName()

getName

String getName()
Returns the node name.

Returns:
the node name
See Also:
setName(java.lang.String)

addLink

void addLink(Link link)
Adds the link to this node.

Parameters:
link - the link to add
See Also:
removeLink(com.zfqjava.chart.Link)

removeLink

void removeLink(Link link)
Removes the link from this node.

Parameters:
link - the link to remove
See Also:
addLink(com.zfqjava.chart.Link)

getLinkCount

int getLinkCount()
Returns the number of the link added to this node.

Returns:
the number of the link

getLinkList

List getLinkList()
Returns a read-only link list.

Returns:
a read-only link list

addHandle

void addHandle(Handle handle)
Adds the handle to this node.

Parameters:
handle - the handle to add
See Also:
removeHandle(com.zfqjava.chart.Handle)

addHandle

void addHandle(Handle handle,
               int index)
Adds the handle to this node.

Parameters:
handle - the handle to add
index - the handle idex
See Also:
removeHandle(com.zfqjava.chart.Handle)

removeHandle

void removeHandle(Handle handle)
Removes the handle from this node.

Parameters:
handle - the handle to remove
See Also:
addHandle(com.zfqjava.chart.Handle)

removeHandle

void removeHandle(int index)
Removes the handle from this node.

Parameters:
index - the handle at the specified index to remove
See Also:
addHandle(com.zfqjava.chart.Handle)

getHandleCount

int getHandleCount()
Returns the number of the handle added to this node.

Returns:
the number of the handle

getHandleList

List getHandleList()
Returns a read-only handle list.

Returns:
a read-only handle list

addNode

void addNode(Node node)
Adds a node to this node.

Parameters:
node - a node to add

addNode

void addNode(Node node,
             int index)
Adds a node to this node at the specify index.

Parameters:
node - the node to add
index - the node index
Throws:
IndexOutOfBoundsException - if the index out of bounds

addNode

void addNode(List nodes)
Adds the nodes to this chart

Parameters:
nodes - the nodes

addNode

void addNode(List nodes,
             int index)
Adds the nodes to this chart at the specified index

Parameters:
nodes - the nodes
index - the index

removeNode

void removeNode(Node node)
Removes the node from this node.

Parameters:
node - a node to remove

removeNode

void removeNode(int index)
Removes the node at the specified index from this node.

Parameters:
index - the node at the specified index

removeNode

void removeNode(List nodes)
Removes the specified nodes.

Parameters:
nodes - the nodes to remove

removeAllNode

void removeAllNode()
Removes all nodes from this node.


getNodeCount

int getNodeCount()
Returns the number of the nodes in this node.

Returns:
the number of the nodes in this node

getNode

Node getNode(int index)
Returns the node at the specified index.

Returns:
the node at the specified index

getNodeList

List getNodeList()
Returns a read-only node list that add into this node.

Returns:
a read-only node list that add into this node

indexOfNode

int indexOfNode(Node node)
Returns the index for the specified node.

Returns:
the index for the specified node, return -1 if the node have not added into this node

getX

int getX()
Returns the x location.

Returns:
the x location

getY

int getY()
Returns the y location.

Returns:
the y location

getWidth

int getWidth()
Returns the width.

Returns:
the width

getHeight

int getHeight()
Returns the height.

Returns:
the height

getCenterX

int getCenterX()
Returns the x center coordinate.

Returns:
the x center coordinate

getCenterY

int getCenterY()
Returns the y center coordinate.

Returns:
the y center coordinate

setLocation

void setLocation(int x,
                 int y)
Sets the location.

Parameters:
x - the x location
y - the y location

setCenterLocation

void setCenterLocation(int x,
                       int y)
Sets the center location.

Parameters:
x - the x location
y - the y location

setSize

void setSize(int width,
             int height)
Sets the size.

Parameters:
width - the width
height - the height

setBounds

void setBounds(int x,
               int y,
               int width,
               int height)
Sets the node bounds.

Parameters:
x - the x location
y - the y location
width - the width
height - the height

setBounds

void setBounds(Rectangle bounds)
Sets the node bounds.

Parameters:
bounds - the bounds

getBounds

Rectangle getBounds(Rectangle rect)
Returns the node bounds.

Parameters:
rect - the Rectangle to store node bounds
Returns:
the node bounds

getPaintBounds

Rectangle getPaintBounds(Rectangle rect)
Returns the node paint bounds.

Parameters:
rect - the Rectangle to store node paint bounds
Returns:
the node paint bounds

getCellBounds

Rectangle getCellBounds(Rectangle rect)
Returns the node cell bounds.

Parameters:
rect - the Rectangle to store node cell bounds
Returns:
the node cell bounds

setMargin

void setMargin(Insets m)
Sets the margin between the node cell bounds and its contents.

Parameters:
m - an Insets object that defines the space between node cell bounds and its contents
See Also:
getMargin()

getMargin

Insets getMargin()
Returns the margin between the node cell bounds and its contents.

Returns:
an Insets object containing the margin values
See Also:
setMargin(java.awt.Insets)

setPreferredSize

void setPreferredSize(Dimension d)
Sets the preferred size of this node.

Parameters:
d - the preferred size of this node

getPreferredSize

Dimension getPreferredSize()
Returns the preferred size of this node.

Returns:
the node preferred size

isPreferredSizeSet

boolean isPreferredSizeSet()

doLayout

void doLayout()
Layout the children nodes.


setLayout

void setLayout(Layout layout)
Sets the layout.

Parameters:
layout - the layout
See Also:
getLayout()

getLayout

Layout getLayout()
Returns the layout for this node.

Returns:
the layout for this node
See Also:
setLayout(com.zfqjava.chart.Layout)

findNodeAt

Node findNodeAt(int x,
                int y)
Finds the node contains the point x, y.

Parameters:
x - the x location
y - the y location
Returns:
the node contians the point x, y

contains

boolean contains(int x,
                 int y)
Determines whether this node contains the specify point.

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

contains

boolean contains(int x,
                 int y,
                 int width,
                 int height)
Determines whether this node contains the specify bound.

Parameters:
x - the x coordinate of the bound
y - the y coordinate of the bound
width - the width of the bound
height - the height of the bound
Returns:
true if this node contains the specify point, otherwise return false

contains

boolean contains(Rectangle bound)
Determines whether this node contains the specify bound.

Parameters:
bound - the bound
Returns:
true if this node contains the specify point, otherwise return false

intersects

boolean intersects(int x,
                   int y,
                   int width,
                   int height)
Tests this node whether intersects the specified bound.

Parameters:
x - the x coordinate of the bound
y - the y coordinate of the bound
width - the width of the bound
height - the height of the bound

intersects

boolean intersects(Rectangle bound)
Tests this node whether intersects the specified bound.

Parameters:
bound - the rectangle to determines

isEmpty

boolean isEmpty()
Determines whether this node is empty.

Returns:
true if this node is emtpy.

getToolTipText

String getToolTipText(int x,
                      int y)
Returns the tool tip text for the specified point.

Parameters:
x - the x coordinate of the point
y - the y coordinate of the point
Returns:
the tool tip text

setToolTipText

void setToolTipText(String toolTipText)
Sets the tool tip text for this node.

Parameters:
toolTipText - the tool tip text
See Also:
getToolTipText(int, int)

getToolTipText

String getToolTipText()
Returns the tool tip text for this node.

Returns:
the tool tip text
See Also:
setToolTipText(java.lang.String)

setCursor

void setCursor(Cursor c)
Sets the cursor for current node.

Parameters:
c - the cursor
See Also:
getCursor()

getCursor

Cursor getCursor()
Returns the cursor for current node.

Returns:
the cursor
See Also:
setCursor(java.awt.Cursor)

setUserObject

void setUserObject(Object userObject)
Sets the user object for this node.

Parameters:
userObject - the user object
See Also:
getUserObject()

getUserObject

Object getUserObject()
Returns the user object for this node.

Returns:
the user object
See Also:
setUserObject(java.lang.Object)

setChart

void setChart(Chart chart)
Sets the chart container.

Parameters:
chart - the chart container
See Also:
getChart()

getChart

Chart getChart()
Returns the chart container

Returns:
the chart container
See Also:
setChart(com.zfqjava.chart.Chart)

revalidate

void revalidate()
Revalidates itself.


paint

void paint(Graphics2D g)
Paints itself.

Parameters:
g - the node Graphics object

repaint

void repaint()
Repaints itself.


repaint

void repaint(Rectangle bounds)
Repaints the specified area.


repaint

void repaint(int x,
             int y,
             int width,
             int height)
Repaints the specified area.


isResizable

boolean isResizable()
Returns the resizable property.

Returns:
the resizable property
See Also:
setResizable(boolean)

setResizable

void setResizable(boolean b)
Sets the resizable property.

Parameters:
b - the resizable property
See Also:
isResizable()

isMovable

boolean isMovable()
Returns the movable property.

Returns:
the movable property
See Also:
setMovable(boolean)

setMovable

void setMovable(boolean b)
Sets the movable property.

Parameters:
b - the movable property
See Also:
isMovable()

isRotatable

boolean isRotatable()
Returns the rotatable property.

Returns:
the rotatable property
See Also:
setRotatable(boolean)

setRotatable

void setRotatable(boolean b)
Sets the rotatable property.

Parameters:
b - the rotatable property
See Also:
isRotatable()

isAdjustable

boolean isAdjustable()
Returns the adjustable property.

Returns:
the adjustable property
See Also:
setAdjustable(boolean)

setAdjustable

void setAdjustable(boolean b)
Sets the adjustable property.

Parameters:
b - the adjustable property
See Also:
isAdjustable()

isSelectable

boolean isSelectable()
Returns the selectable property.

Returns:
the selectable property
See Also:
setSelectable(boolean)

setSelectable

void setSelectable(boolean b)
Sets the selectable property.

Parameters:
b - the selectable property
See Also:
isSelectable()

isGroupable

boolean isGroupable()
Returns the groupable property.

Returns:
the groupable property
See Also:
setGroupable(boolean)

setGroupable

void setGroupable(boolean b)
Sets the groupable property.

Parameters:
b - the groupable property
See Also:
isGroupable()

isLinkable

boolean isLinkable()
Returns the linkable property.

Returns:
the linkable property
See Also:
setLinkable(boolean)

setLinkable

void setLinkable(boolean b)
Sets the linkable property.

Parameters:
b - the linkable property
See Also:
isLinkable()

isEditable

boolean isEditable()
Returns the editable property.

Returns:
the editable property
See Also:
setEditable(boolean)

setEditable

void setEditable(boolean b)
Sets the editable property.

Parameters:
b - the editable property
See Also:
isEditable()

isVisible

boolean isVisible()
Returns the visible property.

Returns:
the visible property
See Also:
setVisible(boolean)

setVisible

void setVisible(boolean b)
Sets the visible property.

Parameters:
b - the visible property
See Also:
isVisible()

isCellable

boolean isCellable()
Returns the cellable property.

Returns:
the cellable property
See Also:
setCellable(boolean)

setCellable

void setCellable(boolean b)
Sets the cellable property.

Parameters:
b - the cellable property
See Also:
isCellable()

isShadowable

boolean isShadowable()
Returns the shadowable property.

Returns:
the shadowable property
See Also:
setShadowable(boolean)

setShadowable

void setShadowable(boolean b)
Sets the shadowable property.

Parameters:
b - the shadowable property
See Also:
isShadowable()

isDrawable

boolean isDrawable()
Returns the drawable property.

Returns:
the drawable property
See Also:
setDrawable(boolean)

setDrawable

void setDrawable(boolean b)
Sets the drawable property.

Parameters:
b - the drawable property
See Also:
isDrawable()

isFillable

boolean isFillable()
Returns the fillable property.

Returns:
the fillable property
See Also:
setFillable(boolean)

setFillable

void setFillable(boolean b)
Sets the fillable property.

Parameters:
b - the fillable property
See Also:
isFillable()

getShadowPaint

Paint getShadowPaint()
Returns the shadow paint.

Returns:
the shadow paint
See Also:
setShadowPaint(java.awt.Paint)

setShadowPaint

void setShadowPaint(Paint p)
Sets the shadow paint.

Parameters:
p - the shadow paint
See Also:
getShadowPaint()

getShadowComposite

Composite getShadowComposite()
Returns the shadow composite for current node.

Returns:
the shadow composite
See Also:
setShadowComposite(java.awt.Composite)

setShadowComposite

void setShadowComposite(Composite c)
Sets the shadow composite for current node.

Parameters:
c - the shadow composite
See Also:
getShadowComposite()

setShadowTransform

void setShadowTransform(AffineTransform at)
Sets the shadow transform for current node.

Parameters:
at - the shadow transform
See Also:
getShadowTransform()

getShadowTransform

AffineTransform getShadowTransform()
Returns the shadow transform for current node.

Returns:
the shadow transform
See Also:
setShadowTransform(java.awt.geom.AffineTransform)

setDrawPaint

void setDrawPaint(Paint p)
Sets the draw paint for current node.

Parameters:
p - the draw paint
See Also:
getDrawPaint()

getDrawPaint

Paint getDrawPaint()
Returns the draw paint for current node.

Returns:
the draw paint
See Also:
setDrawPaint(java.awt.Paint)

setFillPaint

void setFillPaint(Paint p)
Sets the fill paint for current node.

Parameters:
p - the fill paint
See Also:
getFillPaint()

getFillPaint

Paint getFillPaint()
Returns the fill paint for current node.

Returns:
the fill paint
See Also:
setFillPaint(java.awt.Paint)

setDrawComposite

void setDrawComposite(Composite c)
Sets the draw composite for current node.

Parameters:
c - the draw composite
See Also:
getDrawComposite()

getDrawComposite

Composite getDrawComposite()
Returns the draw composite for current node.

Returns:
the draw composite
See Also:
setDrawComposite(java.awt.Composite)

setFillComposite

void setFillComposite(Composite c)
Sets the fill composite for current node.

Parameters:
c - the fill composite
See Also:
getFillComposite()

getFillComposite

Composite getFillComposite()
Returns the fill composite for current node.

Returns:
the fill composite
See Also:
setFillComposite(java.awt.Composite)

setTransform

void setTransform(AffineTransform at)
Sets the transform for current node.

Parameters:
at - the transform
See Also:
getTransform()

getTransform

AffineTransform getTransform()
Returns the transform for current node.

Returns:
the transform
See Also:
setTransform(java.awt.geom.AffineTransform)

setStroke

void setStroke(Stroke s)
Sets the stroke for current node.

Parameters:
s - the stroke
See Also:
getStroke()

getStroke

Stroke getStroke()
Returns the stroke for current node.

Returns:
the stroke
See Also:
setStroke(java.awt.Stroke)

setFont

void setFont(Font f)
Sets the font for current node.

Parameters:
f - the font
See Also:
getFont()

getFont

Font getFont()
Returns the font for current node.

Returns:
the font
See Also:
setFont(java.awt.Font)

JComponentPack 1.3.0

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