de.aitools.iv.graphdrawing.nativetree
Class NativeTreeVertexDraw

java.lang.Object
  extended by de.aitools.iv.graphdrawing.nativetree.NativeTreeVertexDraw
All Implemented Interfaces:
VertexDraw

public class NativeTreeVertexDraw
extends java.lang.Object
implements VertexDraw

besteht aus 3 Dingen:
1.einer Kante vom Vater zu diesem Draw
2.einem Label, variabler Länge
3.(ausblendbar) einem Icon für ein-/ausblenden der Söhne

Author:
Frank Benteler, bigben@uni-paderborn.de

Constructor Summary
NativeTreeVertexDraw(NativeTreeVisualization view, Vertex vertex)
           
 
Method Summary
 java.awt.geom.Point2D getAnimToPosition()
           
 javax.swing.JComponent getJComponent()
           
 int getLength()
           
 Vertex getVertex()
           
 boolean isExpandable()
           
 boolean isExpanded()
           
 boolean isVisible()
           
 void setAnimToPosition(double x, double y)
          sets the position where the vertex is animated to.
 void setBackground(java.awt.Color back)
          Sets the background color of the label
 void setExpanded(boolean expanded)
           
 void setLabelLength(int length)
          Sets the length of the label (in pixel).
 void setShade(double shade)
          sets shade to a value between 0 and 100
 void update()
          updates size, text and internal positions
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeTreeVertexDraw

public NativeTreeVertexDraw(NativeTreeVisualization view,
                            Vertex vertex)
Method Detail

getVertex

public Vertex getVertex()
Specified by:
getVertex in interface VertexDraw
See Also:
VertexDraw.getVertex()

isExpandable

public boolean isExpandable()
Specified by:
isExpandable in interface VertexDraw
See Also:
VertexDraw.isExpandable()

isExpanded

public boolean isExpanded()
Specified by:
isExpanded in interface VertexDraw
See Also:
VertexDraw.isExpanded()

setExpanded

public void setExpanded(boolean expanded)
Specified by:
setExpanded in interface VertexDraw
See Also:
VertexDraw.setExpanded(boolean)

isVisible

public boolean isVisible()
Specified by:
isVisible in interface VertexDraw
See Also:
VertexDraw.isVisible()

setShade

public void setShade(double shade)
Description copied from interface: VertexDraw
sets shade to a value between 0 and 100

Specified by:
setShade in interface VertexDraw

setAnimToPosition

public void setAnimToPosition(double x,
                              double y)
sets the position where the vertex is animated to.

Parameters:
x - - x-pos of the position
y - - y-pos of the position

getAnimToPosition

public java.awt.geom.Point2D getAnimToPosition()
Returns:
the position where the vertex is animated to.

setLabelLength

public void setLabelLength(int length)
Sets the length of the label (in pixel).
If length is less then zero, then the length of the text will be used.

Parameters:
length - - the length of the label ( less than zero means automatic ).

getLength

public int getLength()
Returns:
the length of the enclosing JPanel

update

public void update()
updates size, text and internal positions


getJComponent

public javax.swing.JComponent getJComponent()
Returns:
the JPanel, that represents this VertexDraw

setBackground

public void setBackground(java.awt.Color back)
Sets the background color of the label

Parameters:
back - - background color for the label