|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cytoscape.render.stateful.CustomGraphic
public class CustomGraphic
Represents all the information needed to define a custom graphic for a given NodeView.
public int graphicCount(int node) public Shape graphicShape(int node, int graphicInx) public Paint graphicPaint(int node, int graphicInx) public byte graphicNodeAnchor(int node, int graphicInx)To keep things completetly backwards compatible and to avoid introducing bugs, the new API methods are completely independent from the the old API methods. Thus, a custom graphic added using the new API will not be accessible from the old API and visa versa.
The reason for the deprecation is:
In order for multiple plugins to use the old API, each must monitor deletions to custom graphics and update their saved indices, since the indices will shift down as graphics are deleted. This management isn't even possible with the old API because there's no event mechanism to inform plugins when the indices change. Also, each plugin must keep a list of all indices for all graphics added, since the indices may not be contiguous.
Using indices forces the need for a locking mechanism to ensure you are guaranteed a unique and correct index independent of any other plugins.
Constructor Summary | |
---|---|
CustomGraphic(Shape shape,
Paint paint,
byte anchor)
Deprecated. |
|
CustomGraphic(Shape shape,
PaintFactory factory)
Constructor |
Method Summary | |
---|---|
byte |
getAnchor()
Deprecated. |
Paint |
getPaint()
Return the Paint that makes up this CustomGraphic. |
Paint |
getPaint(Rectangle2D bound)
|
PaintFactory |
getPaintFactory()
|
Shape |
getShape()
Return the Shape that makes up this CustomGraphic. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CustomGraphic(Shape shape, PaintFactory factory)
shape
- factory
- @Deprecated public CustomGraphic(Shape shape, Paint paint, byte anchor)
shape
- paint
- anchor
- Method Detail |
---|
public Shape getShape()
public Paint getPaint()
public Paint getPaint(Rectangle2D bound)
public PaintFactory getPaintFactory()
@Deprecated public byte getAnchor()
|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |