|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.hearc.I04_05s08.GUI.Graph.Element
ch.hearc.I04_05s08.GUI.Graph.Node
Node element
Field Summary | |
private Rectangle2D |
rectangle
Bound of the Node |
Fields inherited from class ch.hearc.I04_05s08.GUI.Graph.Element |
|
Constructor Summary | |
Node(Node n)
A copy builder |
|
Node(String title)
Build the node |
Method Summary | |
void |
calcDimension(Graphics2D g2d)
Calculate the dimension of the node |
boolean |
contains(Point2D p)
Test if the Element contains the point |
void |
draw(Graphics2D g2d)
Draw the Node |
void |
drawTitle(Graphics2D g2d)
Draw the title's Node |
Rectangle2D |
getBounds()
Get the bounds of the Node |
Point2D |
getGravityPoint(Graphics2D g2d)
Return the point in the middle of the Node |
Point2D |
getPoint()
Get the top left corner point |
Point2D |
getProximityPoint(Point2D p,
Graphics2D g2d)
Get the point touching the node between the givent point and the middle of the node |
void |
setPos(Point2D p)
Move the Node |
void |
update()
Update the values |
Methods inherited from class ch.hearc.I04_05s08.GUI.Graph.Element |
clone, getBackgroundColor, getForegroundColor, getGraph, getPadding, getTitle, isSelected, select, setBackgroundColor, setForegroundColor, setPadding, setSelectedBackgroundColor, setSelectedForegroundColor, setTitle, showDialog |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Rectangle2D rectangle
Constructor Detail |
public Node(String title)
title
- the title of the nodepublic Node(Node n)
n
- the node to copyMethod Detail |
public Point2D getPoint()
public Point2D getGravityPoint(Graphics2D g2d)
g2d
- graphic context
public Point2D getProximityPoint(Point2D p, Graphics2D g2d)
p
- distant pointg2d
- graphic context
public Rectangle2D getBounds()
public void setPos(Point2D p)
p
- the pointpublic void calcDimension(Graphics2D g2d)
g2d
- graphic contextpublic boolean contains(Point2D p)
contains
in class Element
p
- the point
public void draw(Graphics2D g2d)
draw
in class Element
g2d
- Graphic contextpublic void drawTitle(Graphics2D g2d)
g2d
- Graphic contextpublic void update()
update
in class Element
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A project by Blanc, Yoan – supervised by Dr. Ghorbel, Hatem.
2004 © Blanc, Yoan - HE-ARC