|
Cytoscape 2.8.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectding.view.DNodeView
public class DNodeView
Ding implementation of GINY NodeView.
| Field Summary |
|---|
| Fields inherited from interface giny.view.NodeView |
|---|
DIAMOND, ELLIPSE, HEXAGON, OCTAGON, PARALELLOGRAM, RECTANGLE, ROUNDED_RECTANGLE, TRIANGLE, VEE |
| Fields inherited from interface giny.view.Label |
|---|
CENTER, EAST, JUSTIFY_CENTER, JUSTIFY_LEFT, JUSTIFY_RIGHT, NONE, NORTH, NORTHEAST, NORTHWEST, SOURCE_BOUND, SOUTH, SOUTHEAST, SOUTHWEST, TARGET_BOUND, WEST |
| Method Summary | |
|---|---|
boolean |
addCustomGraphic(CustomGraphic cg)
Adds a given CustomGraphic, in draw order, to this DNodeView in a thread-safe way. |
CustomGraphic |
addCustomGraphic(Shape shape,
Paint paint,
byte anchor)
Adds a custom graphic, in draw order, to this DNodeView in a thread-safe way. |
boolean |
containsCustomGraphic(CustomGraphic cg)
A thread-safe way to determine if this DNodeView contains a given custom graphic. |
Iterator<CustomGraphic> |
customGraphicIterator()
Return a non-null, read-only Iterator over all CustomGraphics contained in this DNodeView. |
Object |
customGraphicLock()
Obtain the lock used for reading information about custom graphics. |
Stroke |
getBorder()
DOCUMENT ME! |
Paint |
getBorderPaint()
DOCUMENT ME! |
float |
getBorderWidth()
DOCUMENT ME! |
ObjectPosition |
getCustomGraphicsPosition(CustomGraphic cg)
|
int |
getDegree()
DOCUMENT ME! |
List |
getEdgeViewsList(NodeView otherNodeView)
DOCUMENT ME! |
Font |
getFont()
DOCUMENT ME! |
int |
getGraphPerspectiveIndex()
DOCUMENT ME! |
GraphView |
getGraphView()
DOCUMENT ME! |
double |
getGreekThreshold()
DOCUMENT ME! |
double |
getHeight()
DOCUMENT ME! |
int |
getJustify()
Deprecated. |
Label |
getLabel()
DOCUMENT ME! |
double |
getLabelOffsetX()
Deprecated. |
double |
getLabelOffsetY()
Deprecated. |
ObjectPosition |
getLabelPosition()
Returns current label position as ObjkectPosition object. |
double |
getLabelWidth()
|
Node |
getNode()
DOCUMENT ME! |
int |
getNodeLabelAnchor()
Deprecated. |
int |
getNumCustomGraphics()
A thread-safe method returning the number of custom graphics associated with this DNodeView. |
Point2D |
getOffset()
DOCUMENT ME! |
ObjectPosition |
getPosition()
|
int |
getRootGraphIndex()
DOCUMENT ME! |
Paint |
getSelectedPaint()
DOCUMENT ME! |
int |
getShape()
DOCUMENT ME! |
String |
getText()
DOCUMENT ME! |
int |
getTextAnchor()
Deprecated. |
Paint |
getTextPaint()
DOCUMENT ME! |
String |
getToolTip()
DOCUMENT ME! |
float |
getTransparency()
DOCUMENT ME! |
Paint |
getUnselectedPaint()
DOCUMENT ME! |
double |
getWidth()
DOCUMENT ME! |
double |
getXPosition()
DOCUMENT ME! |
double |
getYPosition()
DOCUMENT ME! |
boolean |
isHidden()
|
boolean |
isSelected()
DOCUMENT ME! |
boolean |
nestedNetworkIsVisible()
Determines whether a nested network should be rendered as part of a node's view or not. |
void |
removeAllCustomGraphics()
|
boolean |
removeCustomGraphic(CustomGraphic cg)
A thread-safe method for removing a given custom graphic from this DNodeView. |
void |
select()
DOCUMENT ME! |
void |
setBorder(Stroke stroke)
DOCUMENT ME! |
void |
setBorderPaint(Paint paint)
DOCUMENT ME! |
void |
setBorderWidth(float width)
DOCUMENT ME! |
CustomGraphic |
setCustomGraphicsPosition(CustomGraphic cg,
ObjectPosition p)
|
void |
setFont(Font font)
DOCUMENT ME! |
void |
setGreekThreshold(double threshold)
DOCUMENT ME! |
boolean |
setHeight(double height)
DOCUMENT ME! |
void |
setJustify(int justify)
Deprecated. |
void |
setLabelOffsetX(double x)
Deprecated. |
void |
setLabelOffsetY(double y)
Deprecated. |
void |
setLabelPosition(ObjectPosition position)
Set current label position. |
void |
setLabelWidth(double width)
|
void |
setNestedNetworkView(DGraphView nestedNetworkView)
|
void |
setNodeLabelAnchor(int position)
Deprecated. |
void |
setNodePosition(boolean animate)
DOCUMENT ME! |
void |
setOffset(double x,
double y)
DOCUMENT ME! |
void |
setPosition(ObjectPosition p)
Set position of label. |
void |
setPositionHint(int position)
DOCUMENT ME! |
boolean |
setSelected(boolean selected)
DOCUMENT ME! |
void |
setSelectedPaint(Paint paint)
DOCUMENT ME! |
void |
setShape(int shape)
DOCUMENT ME! |
void |
setText(String text)
DOCUMENT ME! |
void |
setTextAnchor(int position)
Deprecated. |
void |
setTextPaint(Paint textPaint)
DOCUMENT ME! |
void |
setToolTip(String tip)
DOCUMENT ME! |
void |
setTransparency(float trans)
DOCUMENT ME! |
void |
setUnselectedPaint(Paint paint)
DOCUMENT ME! |
boolean |
setWidth(double width)
DOCUMENT ME! |
void |
setXPosition(double xPos)
DOCUMENT ME! |
void |
setXPosition(double xPos,
boolean update)
DOCUMENT ME! |
void |
setYPosition(double yPos)
DOCUMENT ME! |
void |
setYPosition(double yPos,
boolean update)
DOCUMENT ME! |
void |
showNestedNetwork(boolean makeVisible)
Set the visibility of a node's nested network when rendered. |
void |
unselect()
DOCUMENT ME! |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public GraphView getGraphView()
getGraphView in interface NodeViewpublic Node getNode()
getNode in interface NodeViewpublic int getGraphPerspectiveIndex()
getGraphPerspectiveIndex in interface NodeViewpublic int getRootGraphIndex()
getRootGraphIndex in interface NodeViewpublic List getEdgeViewsList(NodeView otherNodeView)
getEdgeViewsList in interface NodeViewotherNodeView - DOCUMENT ME!
public int getShape()
getShape in interface NodeViewpublic void setSelectedPaint(Paint paint)
setSelectedPaint in interface NodeViewpaint - DOCUMENT ME!public Paint getSelectedPaint()
getSelectedPaint in interface NodeViewpublic void setUnselectedPaint(Paint paint)
setUnselectedPaint in interface NodeViewpaint - DOCUMENT ME!public Paint getUnselectedPaint()
getUnselectedPaint in interface NodeViewpublic void setBorderPaint(Paint paint)
setBorderPaint in interface NodeViewpaint - DOCUMENT ME!public Paint getBorderPaint()
getBorderPaint in interface NodeViewpublic void setBorderWidth(float width)
setBorderWidth in interface NodeViewwidth - DOCUMENT ME!public float getBorderWidth()
getBorderWidth in interface NodeViewpublic void setBorder(Stroke stroke)
setBorder in interface NodeViewstroke - DOCUMENT ME!public Stroke getBorder()
getBorder in interface NodeViewpublic void setTransparency(float trans)
setTransparency in interface NodeViewtrans - DOCUMENT ME!public float getTransparency()
getTransparency in interface NodeViewpublic boolean setWidth(double width)
setWidth in interface NodeViewwidth - DOCUMENT ME!
public double getWidth()
getWidth in interface NodeViewpublic boolean setHeight(double height)
setHeight in interface NodeViewheight - DOCUMENT ME!
public double getHeight()
getHeight in interface NodeViewpublic Label getLabel()
getLabel in interface NodeViewpublic int getDegree()
getDegree in interface NodeView
public void setOffset(double x,
double y)
setOffset in interface NodeViewx - DOCUMENT ME!y - DOCUMENT ME!public Point2D getOffset()
getOffset in interface NodeViewpublic void setXPosition(double xPos)
setXPosition in interface NodeViewxPos - DOCUMENT ME!
public void setXPosition(double xPos,
boolean update)
setXPosition in interface NodeViewxPos - DOCUMENT ME!update - DOCUMENT ME!public double getXPosition()
getXPosition in interface NodeViewNodeView.setXPosition(double)public void setYPosition(double yPos)
setYPosition in interface NodeViewyPos - DOCUMENT ME!
public void setYPosition(double yPos,
boolean update)
setYPosition in interface NodeViewyPos - DOCUMENT ME!update - DOCUMENT ME!public double getYPosition()
getYPosition in interface NodeViewNodeView.setYPosition(double)public void setNodePosition(boolean animate)
setNodePosition in interface NodeViewanimate - DOCUMENT ME!public void select()
select in interface NodeViewpublic void unselect()
unselect in interface NodeViewpublic boolean isSelected()
isSelected in interface NodeViewpublic boolean setSelected(boolean selected)
setSelected in interface NodeViewselected - DOCUMENT ME!
public final boolean isHidden()
isHidden in interface NodeViewpublic void setShape(int shape)
setShape in interface NodeViewshape - DOCUMENT ME!public void setToolTip(String tip)
setToolTip in interface NodeViewtip - DOCUMENT ME!public String getToolTip()
public void setPositionHint(int position)
position - DOCUMENT ME!public Paint getTextPaint()
getTextPaint in interface Labelpublic void setTextPaint(Paint textPaint)
setTextPaint in interface LabeltextPaint - DOCUMENT ME!public double getGreekThreshold()
getGreekThreshold in interface Labelpublic void setGreekThreshold(double threshold)
setGreekThreshold in interface Labelthreshold - DOCUMENT ME!public String getText()
getText in interface Labelpublic void setText(String text)
setText in interface Labeltext - DOCUMENT ME!public Font getFont()
getFont in interface Labelpublic void setFont(Font font)
setFont in interface Labelfont - DOCUMENT ME!
public CustomGraphic addCustomGraphic(Shape shape,
Paint paint,
byte anchor)
addCustomGraphic (new CustomGraphic (shape,paint,anchor))
except the the new CustomGraphic created is returned.
shape - paint - anchor - The byte value from NodeDetails, that defines where the
graphic anchor point lies on this DNodeView's extents
rectangle. A common anchor is NodeDetails.ANCHOR_CENTER.
IllegalArgumentException - if shape or paint are null or anchor is not in the range 0 <=
anchor <= NodeDetails.MAX_ANCHOR_VAL.addCustomGraphic(CustomGraphic),
CustomGraphicpublic boolean addCustomGraphic(CustomGraphic cg)
A CustomGraphic can only be associated with a DNodeView once. If you wish to have a custom graphic, with the same paint and shape information, occur in multiple places in the draw order, simply create a new CustomGraphic and add it.
IllegalArgumentException - if shape or paint are null.CustomGraphicpublic boolean containsCustomGraphic(CustomGraphic cg)
cg - the CustomGraphic for which we are checking containment.public Iterator<CustomGraphic> customGraphicIterator()
UnsupportedOperationException - if an attempt is made to use the Iterator's remove() method.public boolean removeCustomGraphic(CustomGraphic cg)
public void removeAllCustomGraphics()
public int getNumCustomGraphics()
public Object customGraphicLock()
DNodeView dnv = ...;
CustomGraphic cg = null;
synchronized (dnv.customGraphicLock()) {
Iterator cgIt = dnv.customGraphicIterator();
while (cgIt.hasNext()) {
cg = cgIt.next();
// PERFORM your operations here.
}
}
NOTE: A better concurrency approach would be to return the read lock from
a java.util.concurrent.locks.ReentrantReadWriteLock. However, this
requires users to manually lock and unlock blocks of code where many
times try{} finally{} blocks are needed and if any mistake are made, a
DNodeView may be permanently locked. Since concurrency will most likely
be very low, we opt for the simpler approach of having users use
synchronized {} blocks on a standard lock object.
@Deprecated public void setTextAnchor(int position)
setTextAnchor in interface Labelposition - DOCUMENT ME!@Deprecated public int getTextAnchor()
getTextAnchor in interface Label@Deprecated public void setJustify(int justify)
setJustify in interface Labeljustify - DOCUMENT ME!@Deprecated public int getJustify()
getJustify in interface Label@Deprecated public void setLabelOffsetX(double x)
setLabelOffsetX in interface NodeViewx - DOCUMENT ME!@Deprecated public double getLabelOffsetX()
getLabelOffsetX in interface NodeView@Deprecated public void setLabelOffsetY(double y)
setLabelOffsetY in interface NodeViewy - DOCUMENT ME!@Deprecated public double getLabelOffsetY()
getLabelOffsetY in interface NodeView@Deprecated public void setNodeLabelAnchor(int position)
setNodeLabelAnchor in interface NodeViewposition - DOCUMENT ME!@Deprecated public int getNodeLabelAnchor()
getNodeLabelAnchor in interface NodeViewpublic double getLabelWidth()
getLabelWidth in interface NodeViewpublic void setLabelWidth(double width)
setLabelWidth in interface NodeViewpublic void setNestedNetworkView(DGraphView nestedNetworkView)
public boolean nestedNetworkIsVisible()
nestedNetworkIsVisible in interface NodeViewpublic void showNestedNetwork(boolean makeVisible)
showNestedNetwork in interface NodeViewmakeVisible - forces the visibility of a nested network. Please note that
this call has no effect if a node has no associated nested
network!public ObjectPosition getPosition()
getPosition in interface Labelpublic void setPosition(ObjectPosition p)
Label
setPosition in interface Label
public CustomGraphic setCustomGraphicsPosition(CustomGraphic cg,
ObjectPosition p)
public ObjectPosition getCustomGraphicsPosition(CustomGraphic cg)
public ObjectPosition getLabelPosition()
NodeView
getLabelPosition in interface NodeViewpublic void setLabelPosition(ObjectPosition position)
NodeView
setLabelPosition in interface NodeView
|
Cytoscape 2.8.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||