|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ding.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 NodeView
public Node getNode()
getNode
in interface NodeView
public int getGraphPerspectiveIndex()
getGraphPerspectiveIndex
in interface NodeView
public int getRootGraphIndex()
getRootGraphIndex
in interface NodeView
public List getEdgeViewsList(NodeView otherNodeView)
getEdgeViewsList
in interface NodeView
otherNodeView
- DOCUMENT ME!
public int getShape()
getShape
in interface NodeView
public void setSelectedPaint(Paint paint)
setSelectedPaint
in interface NodeView
paint
- DOCUMENT ME!public Paint getSelectedPaint()
getSelectedPaint
in interface NodeView
public void setUnselectedPaint(Paint paint)
setUnselectedPaint
in interface NodeView
paint
- DOCUMENT ME!public Paint getUnselectedPaint()
getUnselectedPaint
in interface NodeView
public void setBorderPaint(Paint paint)
setBorderPaint
in interface NodeView
paint
- DOCUMENT ME!public Paint getBorderPaint()
getBorderPaint
in interface NodeView
public void setBorderWidth(float width)
setBorderWidth
in interface NodeView
width
- DOCUMENT ME!public float getBorderWidth()
getBorderWidth
in interface NodeView
public void setBorder(Stroke stroke)
setBorder
in interface NodeView
stroke
- DOCUMENT ME!public Stroke getBorder()
getBorder
in interface NodeView
public void setTransparency(float trans)
setTransparency
in interface NodeView
trans
- DOCUMENT ME!public float getTransparency()
getTransparency
in interface NodeView
public boolean setWidth(double width)
setWidth
in interface NodeView
width
- DOCUMENT ME!
public double getWidth()
getWidth
in interface NodeView
public boolean setHeight(double height)
setHeight
in interface NodeView
height
- DOCUMENT ME!
public double getHeight()
getHeight
in interface NodeView
public Label getLabel()
getLabel
in interface NodeView
public int getDegree()
getDegree
in interface NodeView
public void setOffset(double x, double y)
setOffset
in interface NodeView
x
- DOCUMENT ME!y
- DOCUMENT ME!public Point2D getOffset()
getOffset
in interface NodeView
public void setXPosition(double xPos)
setXPosition
in interface NodeView
xPos
- DOCUMENT ME!public void setXPosition(double xPos, boolean update)
setXPosition
in interface NodeView
xPos
- DOCUMENT ME!update
- DOCUMENT ME!public double getXPosition()
getXPosition
in interface NodeView
NodeView.setXPosition(double)
public void setYPosition(double yPos)
setYPosition
in interface NodeView
yPos
- DOCUMENT ME!public void setYPosition(double yPos, boolean update)
setYPosition
in interface NodeView
yPos
- DOCUMENT ME!update
- DOCUMENT ME!public double getYPosition()
getYPosition
in interface NodeView
NodeView.setYPosition(double)
public void setNodePosition(boolean animate)
setNodePosition
in interface NodeView
animate
- DOCUMENT ME!public void select()
select
in interface NodeView
public void unselect()
unselect
in interface NodeView
public boolean isSelected()
isSelected
in interface NodeView
public boolean setSelected(boolean selected)
setSelected
in interface NodeView
selected
- DOCUMENT ME!
public final boolean isHidden()
isHidden
in interface NodeView
public void setShape(int shape)
setShape
in interface NodeView
shape
- DOCUMENT ME!public void setToolTip(String tip)
setToolTip
in interface NodeView
tip
- DOCUMENT ME!public String getToolTip()
public void setPositionHint(int position)
position
- DOCUMENT ME!public Paint getTextPaint()
getTextPaint
in interface Label
public void setTextPaint(Paint textPaint)
setTextPaint
in interface Label
textPaint
- DOCUMENT ME!public double getGreekThreshold()
getGreekThreshold
in interface Label
public void setGreekThreshold(double threshold)
setGreekThreshold
in interface Label
threshold
- DOCUMENT ME!public String getText()
getText
in interface Label
public void setText(String text)
setText
in interface Label
text
- DOCUMENT ME!public Font getFont()
getFont
in interface Label
public void setFont(Font font)
setFont
in interface Label
font
- 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)
,
CustomGraphic
public 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.CustomGraphic
public 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()) { IteratorNOTE: 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.cgIt = dnv.customGraphicIterator(); while (cgIt.hasNext()) { cg = cgIt.next(); // PERFORM your operations here. } }
@Deprecated public void setTextAnchor(int position)
setTextAnchor
in interface Label
position
- DOCUMENT ME!@Deprecated public int getTextAnchor()
getTextAnchor
in interface Label
@Deprecated public void setJustify(int justify)
setJustify
in interface Label
justify
- DOCUMENT ME!@Deprecated public int getJustify()
getJustify
in interface Label
@Deprecated public void setLabelOffsetX(double x)
setLabelOffsetX
in interface NodeView
x
- DOCUMENT ME!@Deprecated public double getLabelOffsetX()
getLabelOffsetX
in interface NodeView
@Deprecated public void setLabelOffsetY(double y)
setLabelOffsetY
in interface NodeView
y
- DOCUMENT ME!@Deprecated public double getLabelOffsetY()
getLabelOffsetY
in interface NodeView
@Deprecated public void setNodeLabelAnchor(int position)
setNodeLabelAnchor
in interface NodeView
position
- DOCUMENT ME!@Deprecated public int getNodeLabelAnchor()
getNodeLabelAnchor
in interface NodeView
public double getLabelWidth()
getLabelWidth
in interface NodeView
public void setLabelWidth(double width)
setLabelWidth
in interface NodeView
public void setNestedNetworkView(DGraphView nestedNetworkView)
public boolean nestedNetworkIsVisible()
nestedNetworkIsVisible
in interface NodeView
public void showNestedNetwork(boolean makeVisible)
showNestedNetwork
in interface NodeView
makeVisible
- 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 Label
public 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 NodeView
public 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 |