Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD

giny.view
Interface NodeView

All Known Subinterfaces:
CyNodeView
All Known Implementing Classes:
DNodeView

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
 Stroke getBorder()
           
 Paint getBorderPaint()
           
 float getBorderWidth()
           
 int getDegree()
           
 List getEdgeViewsList(NodeView otherNode)
           
 int getGraphPerspectiveIndex()
           
 GraphView getGraphView()
           
 double getHeight()
          TODO: Reconcile with Border Methods
 Label getLabel()
           
 double getLabelOffsetX()
           
 double getLabelOffsetY()
           
 Node getNode()
           
 int getNodeLabelAnchor()
           
 Point2D getOffset()
           
 int getRootGraphIndex()
           
 Paint getSelectedPaint()
           
 int getShape()
          Shape is currently defined via predefined variables in the NodeView interface.
 float getTransparency()
           
 Paint getUnselectedPaint()
           
 double getWidth()
          TODO: Reconcile with Border Methods
 double getXPosition()
          note that unless updateNode() has been called, this may not be the "real" location of this node
 double getYPosition()
          note that unless updateNode() has been called, this may not be the "real" location of this node
 boolean isSelected()
           
 void select()
          This draws us as selected
 void setBorder(Stroke stroke)
           
 void setBorderPaint(Paint b_paint)
           
 void setBorderWidth(float border_width)
           
 boolean setHeight(double height)
          TODO: Reconcile with Border Methods
 void setLabelOffsetX(double x)
           
 void setLabelOffsetY(double y)
           
 void setNodeLabelAnchor(int position)
           
 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(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(String tip)
          Sets what the tooltip will be for this NodeView
 void setTransparency(float trans)
           
 void setUnselectedPaint(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.. // TODO -- HACKY
 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.. // TODO -- HACKY
 void unselect()
          This draws us as unselected
 

Field Detail

TRIANGLE

static final int TRIANGLE
See Also:
Constant Field Values

DIAMOND

static final int DIAMOND
See Also:
Constant Field Values

ELLIPSE

static final int ELLIPSE
See Also:
Constant Field Values

HEXAGON

static final int HEXAGON
See Also:
Constant Field Values

OCTAGON

static final int OCTAGON
See Also:
Constant Field Values

PARALELLOGRAM

static final int PARALELLOGRAM
See Also:
Constant Field Values

RECTANGLE

static final int RECTANGLE
See Also:
Constant Field Values

ROUNDED_RECTANGLE

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

getGraphView

GraphView getGraphView()
Returns:
the view we are in

getNode

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

getGraphPerspectiveIndex

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

getRootGraphIndex

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

getEdgeViewsList

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

getShape

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

void setSelectedPaint(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

Paint getSelectedPaint()
Returns:
the currently set selection Paint

setUnselectedPaint

void setUnselectedPaint(Paint paint)
Set the deafult paint of this node

Parameters:
paint - the default Paint of this node

getUnselectedPaint

Paint getUnselectedPaint()
Returns:
the currently set paint

setBorderPaint

void setBorderPaint(Paint b_paint)
Parameters:
b_paint - the paint the border will use

getBorderPaint

Paint getBorderPaint()
Returns:
the currently set BOrder Paint

setBorderWidth

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

getBorderWidth

float getBorderWidth()
Returns:
the currently set Border width

setBorder

void setBorder(Stroke stroke)
Parameters:
stroke - the new stroke for the border

getBorder

Stroke getBorder()
Returns:
the current border

setTransparency

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

getTransparency

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

setWidth

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

Parameters:
width - the currently set width of this node

getWidth

double getWidth()
TODO: Reconcile with Border Methods

Returns:
the currently set width of this node

setHeight

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

Parameters:
height - the currently set height of this node

getHeight

double getHeight()
TODO: Reconcile with Border Methods

Returns:
the currently set height of this node

getLabel

Label getLabel()
Returns:
The Value of the label

getDegree

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

setOffset

void setOffset(double x,
               double y)

getOffset

Point2D getOffset()

setXPosition

void setXPosition(double new_x_position)
Parameters:
new_x_position - the new X position for this node

setXPosition

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

double getXPosition()
note that unless updateNode() has been called, this may not be the "real" location of this node

Returns:
the current x position of this node
See Also:
setXPosition(double)

setYPosition

void setYPosition(double new_y_position)
Parameters:
new_y_position - the new Y position for this node

setYPosition

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

double getYPosition()
note that unless updateNode() has been called, this may not be the "real" location of this node

Returns:
the current y position of this node
See Also:
setYPosition(double)

setNodePosition

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


select

void select()
This draws us as selected


unselect

void unselect()
This draws us as unselected


isSelected

boolean isSelected()

setSelected

boolean setSelected(boolean selected)

setShape

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

void setToolTip(String tip)
Sets what the tooltip will be for this NodeView


setLabelOffsetX

void setLabelOffsetX(double x)

setLabelOffsetY

void setLabelOffsetY(double y)

setNodeLabelAnchor

void setNodeLabelAnchor(int position)

getLabelOffsetX

double getLabelOffsetX()

getLabelOffsetY

double getLabelOffsetY()

getNodeLabelAnchor

int getNodeLabelAnchor()

www.cytoscape.org