|
||||||||||
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
Graphic element
Field Summary | |
private Color[] |
colors
Colors |
private GraphPanel |
graph
The graph |
private Dimension2D |
padding
Padding |
private boolean |
selected
State of the Element |
private String |
title
Title of the Element (text displayed) |
Constructor Summary | |
Element(Element e)
A copy builder |
|
Element(String title)
Init the Element |
Method Summary | |
abstract Object |
clone()
Clone the element |
abstract boolean |
contains(Point2D p)
Test if the Element contains the point |
abstract void |
draw(Graphics2D g2d)
Draw the element |
Color |
getBackgroundColor()
Get the background color |
Color |
getForegroundColor()
Get the foreground color |
GraphPanel |
getGraph()
Get the graph |
Dimension2D |
getPadding()
Get the padding |
String |
getTitle()
Get the title |
boolean |
isSelected()
Get the state of the Element |
void |
select(boolean value)
Set the state of the Element |
void |
setBackgroundColor(Color c)
Set the background color |
void |
setForegroundColor(Color c)
Set the foreground color |
void |
setPadding(Dimension2D padding)
Set padding (internal margin) |
void |
setSelectedBackgroundColor(Color c)
Set the background color when selected |
void |
setSelectedForegroundColor(Color c)
Set the foreground color when selected |
void |
setTitle(String title)
Set the title |
void |
showDialog(GraphPanel graph)
Display a dialog box for this node |
void |
update()
Update the values |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private boolean selected
private String title
private Color[] colors
private Dimension2D padding
private GraphPanel graph
Constructor Detail |
public Element(String title)
title
- the title of the element (the text displayed)public Element(Element e)
e
- the element to copyMethod Detail |
public abstract Object clone()
public String getTitle()
public void setTitle(String title)
title
- the new titlepublic void select(boolean value)
value
- the statepublic boolean isSelected()
public void setForegroundColor(Color c)
c
- colorpublic void setBackgroundColor(Color c)
c
- colorpublic void setSelectedForegroundColor(Color c)
c
- colorpublic void setSelectedBackgroundColor(Color c)
c
- colorpublic Color getForegroundColor()
public Color getBackgroundColor()
public void setPadding(Dimension2D padding)
padding
- the paddingpublic Dimension2D getPadding()
public abstract void draw(Graphics2D g2d)
g2d
- Graphic contextpublic abstract boolean contains(Point2D p)
p
- the point
public void showDialog(GraphPanel graph)
graph
- the graphpublic GraphPanel getGraph()
public void update()
|
||||||||||
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