giny.view
Interface NodeView


public interface NodeView

Any and all questions should be directed to me.

Author:
Rowan Christmas

Field Summary
static int DIAMOND
           
static int ELLIPSE
           
static int HEXAGON
           
static int OCTAGON
           
static int PARALELLOGRAM
           
static int RECTANGLE
           
static int ROUNDED_RECTANGLE
           
static int TRIANGLE
           
 
Method Summary
 java.awt.Stroke getBorder()
           
 java.awt.Paint getBorderPaint()
           
 float getBorderWidth()
           
 int getDegree()
           
 java.util.List getEdgeViewsList(NodeView otherNode)
           
 int getGraphPerspectiveIndex()
           
 GraphView getGraphView()
           
 double getHeight()
          TODO: Reconcile with Border Methods
 Label getLabel()
           
 Node getNode()
           
 java.awt.geom.Point2D getOffset()
           
 int getRootGraphIndex()
           
 java.awt.Paint getSelectedPaint()
           
 int getShape()
          Shape is currently defined via predefined variables in the NodeView interface.
 float getTransparency()
           
 java.awt.Paint getUnselectedPaint()
           
 double getWidth()
          TODO: Reconcile with Border Methods
 double getXPosition()
           
 double getYPosition()
           
 boolean isSelected()
           
 void select()
          This draws us as selected
 void setBorder(java.awt.Stroke stroke)
           
 void setBorderPaint(java.awt.Paint b_paint)
           
 void setBorderWidth(float border_width)
           
 boolean setHeight(double height)
          TODO: Reconcile with Border Methods
 void setNodePosition(boolean animate)
          moves this node to its stored x and y locations.
 void setOffset(double x, double y)
           
 boolean setSelected(boolean selected)
           
 void setSelectedPaint(java.awt.Paint paint)
          This sets the Paint that will be used by this node when it is painted as selected.
 void setShape(int shape)
          Set a new shape for the Node, based on one of the pre-defined shapes Note: calling setPathTo( Shape ), allows one to define their own java.awt.Shape ( i.e.
 void setToolTip(java.lang.String tip)
          Sets what the tooltip will be for this NodeView
 void setTransparency(float trans)
           
 void setUnselectedPaint(java.awt.Paint paint)
          Set the deafult paint of this node
 boolean setWidth(double width)
          TODO: Reconcile with Border Methods
 void setXPosition(double new_x_position)
           
 void setXPosition(double new_x_position, boolean update)
          Set udpdate to false in order to do a layout, and then call updateNode on all the nodes..
 void setYPosition(double new_y_position)
           
 void setYPosition(double new_y_position, boolean update)
          Set udpdate to false in order to do a layout, and then call updateNode on all the nodes..
 void unselect()
          This draws us as unselected
 

Field Detail

TRIANGLE

public static final int TRIANGLE
See Also:
Constant Field Values

DIAMOND

public static final int DIAMOND
See Also:
Constant Field Values

ELLIPSE

public static final int ELLIPSE
See Also:
Constant Field Values

HEXAGON

public static final int HEXAGON
See Also:
Constant Field Values

OCTAGON

public static final int OCTAGON
See Also:
Constant Field Values

PARALELLOGRAM

public static final int PARALELLOGRAM
See Also:
Constant Field Values

RECTANGLE

public static final int RECTANGLE
See Also:
Constant Field Values

ROUNDED_RECTANGLE

public static final int ROUNDED_RECTANGLE
See Also:
Constant Field Values
Method Detail

getGraphView

public GraphView getGraphView()
Returns:
the view we are in

getNode

public Node getNode()
Returns:
The Node we are a view on

getGraphPerspectiveIndex

public int getGraphPerspectiveIndex()
Returns:
the index of this node in the perspective to which we are in a view on.

getRootGraphIndex

public int getRootGraphIndex()
Returns:
the index of this node in the root graph to which we are in a view on.

getEdgeViewsList

public java.util.List getEdgeViewsList(NodeView otherNode)
Returns:
The list of EdgeViews connecting these two nodes. Possibly null.

getShape

public int getShape()
Shape is currently defined via predefined variables in the NodeView interface. To get the actual java.awt.Shape use getPathReference()

Returns:
the current int-tpye shape

setSelectedPaint

public void setSelectedPaint(java.awt.Paint paint)
This sets the Paint that will be used by this node when it is painted as selected.

Parameters:
paint - The Paint to be used

getSelectedPaint

public java.awt.Paint getSelectedPaint()
Returns:
the currently set selection Paint

setUnselectedPaint

public void setUnselectedPaint(java.awt.Paint paint)
Set the deafult paint of this node

Parameters:
paint - the default Paint of this node

getUnselectedPaint

public java.awt.Paint getUnselectedPaint()
Returns:
the currently set paint

setBorderPaint

public void setBorderPaint(java.awt.Paint b_paint)
Parameters:
b_paint - the paint the border will use

getBorderPaint

public java.awt.Paint getBorderPaint()
Returns:
the currently set BOrder Paint

setBorderWidth

public void setBorderWidth(float border_width)
Parameters:
border_width - The width of the border.

getBorderWidth

public float getBorderWidth()
Returns:
the currently set Border width

setBorder

public void setBorder(java.awt.Stroke stroke)
Parameters:
stroke - the new stroke for the border

getBorder

public java.awt.Stroke getBorder()
Returns:
the current border

setTransparency

public void setTransparency(float trans)
Parameters:
trans - new value for the transparency

getTransparency

public float getTransparency()
Returns:
the value for the transparency for this node

setWidth

public boolean setWidth(double width)
TODO: Reconcile with Border Methods

Parameters:
width - the currently set width of this node

getWidth

public double getWidth()
TODO: Reconcile with Border Methods

Returns:
the currently set width of this node

setHeight

public boolean setHeight(double height)
TODO: Reconcile with Border Methods

Parameters:
height - the currently set height of this node

getHeight

public double getHeight()
TODO: Reconcile with Border Methods

Returns:
the currently set height of this node

getLabel

public Label getLabel()
Returns:
The Value of the label

getDegree

public int getDegree()
Returns:
the degree of the Node in the GraphPerspective.

setOffset

public void setOffset(double x,
                      double y)

getOffset

public java.awt.geom.Point2D getOffset()

setXPosition

public void setXPosition(double new_x_position)

setXPosition

public void setXPosition(double new_x_position,
                         boolean update)
Set udpdate to false in order to do a layout, and then call updateNode on all the nodes.. // TODO -- HACKY

Parameters:
new_x_position - for this node
update - if this is true, the node will move immediatly.

getXPosition

public double getXPosition()
Returns:
the current x position of this node
See Also:
note that unless updateNode() has been called, this may not be the "real" location of this node

setYPosition

public void setYPosition(double new_y_position)

setYPosition

public void setYPosition(double new_y_position,
                         boolean update)
Set udpdate to false in order to do a layout, and then call updateNode on all the nodes.. // TODO -- HACKY

Parameters:
new_y_position - for this node
update - if this is true, the node will move immediatly.

getYPosition

public double getYPosition()
Returns:
the current y position of this node
See Also:
note that unless updateNode() has been called, this may not be the "real" location of this node

setNodePosition

public void setNodePosition(boolean animate)
moves this node to its stored x and y locations.


select

public void select()
This draws us as selected


unselect

public void unselect()
This draws us as unselected


isSelected

public boolean isSelected()

setSelected

public boolean setSelected(boolean selected)

setShape

public void setShape(int shape)
Set a new shape for the Node, based on one of the pre-defined shapes Note: calling setPathTo( Shape ), allows one to define their own java.awt.Shape ( i.e. A picture of Johnny Cash )


setToolTip

public void setToolTip(java.lang.String tip)
Sets what the tooltip will be for this NodeView