Cytoscape 2.8.0 API

cytoscape.visual.customgraphic.impl
Class AbstractDCustomGraphics

java.lang.Object
  extended by cytoscape.visual.customgraphic.impl.AbstractDCustomGraphics
All Implemented Interfaces:
CyCustomGraphics, Taggable
Direct Known Subclasses:
GradientLayerCustomGraphics, NullCustomGraphics, URLImageCustomGraphics

public abstract class AbstractDCustomGraphics
extends Object
implements CyCustomGraphics, Taggable


Field Summary
protected static String DELIMITER
           
protected  String displayName
           
protected  float fitRatio
           
protected  int height
           
protected  Long id
           
protected  List<Layer> layers
           
static String LIST_DELIMITER
           
protected  CyCustomGraphicsParser parser
           
protected  ObjectPosition position
           
protected  SortedSet<String> tags
           
protected  int width
           
 
Constructor Summary
AbstractDCustomGraphics(Long id, String displayName)
          Create new object for a given ID.
AbstractDCustomGraphics(String displayName)
           
 
Method Summary
 String getDisplayName()
          Display name is a simple description of this image object.
 float getFitRatio()
           
 int getHeight()
          Returns height of current object.
 Long getIdentifier()
          Immutable session-unique identifier of image generated in constructor.
 List<Layer> getLayers()
          Get layers belongs to this object.
 ObjectPosition getPosition()
          Current position
 Image getRenderedImage()
          From layers of graphics objects, render scaled Image object.
 Collection<String> getTags()
           
 int getWidth()
          Returns width of current object.
 void setDisplayName(String displayName)
          Set human readable display name.
 void setFitRatio(float fitRatio)
           
 void setHeight(int height)
          Set height of Custom Graphics.
 void setPosition(ObjectPosition position)
          Set posiiton of this graphics.
 void setWidth(int width)
          Set width of Custom Graphics.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DELIMITER

protected static final String DELIMITER
See Also:
Constant Field Values

LIST_DELIMITER

public static final String LIST_DELIMITER
See Also:
Constant Field Values

fitRatio

protected float fitRatio

id

protected final Long id

layers

protected List<Layer> layers

displayName

protected String displayName

width

protected int width

height

protected int height

parser

protected CyCustomGraphicsParser parser

position

protected ObjectPosition position

tags

protected final SortedSet<String> tags
Constructor Detail

AbstractDCustomGraphics

public AbstractDCustomGraphics(String displayName)

AbstractDCustomGraphics

public AbstractDCustomGraphics(Long id,
                               String displayName)
Create new object for a given ID. Used when restoring session.

Parameters:
id -
displayName -
Method Detail

getIdentifier

public Long getIdentifier()
Description copied from interface: CyCustomGraphics
Immutable session-unique identifier of image generated in constructor. NOT globally unique. Uniqueness is guaranteed in a session.

Specified by:
getIdentifier in interface CyCustomGraphics
Returns:
Immutable ID as Long.

setWidth

public void setWidth(int width)
Description copied from interface: CyCustomGraphics
Set width of Custom Graphics.

Specified by:
setWidth in interface CyCustomGraphics

setHeight

public void setHeight(int height)
Description copied from interface: CyCustomGraphics
Set height of Custom Graphics.

Specified by:
setHeight in interface CyCustomGraphics

getWidth

public int getWidth()
Description copied from interface: CyCustomGraphics
Returns width of current object.

Specified by:
getWidth in interface CyCustomGraphics
Returns:

getHeight

public int getHeight()
Description copied from interface: CyCustomGraphics
Returns height of current object.

Specified by:
getHeight in interface CyCustomGraphics
Returns:

getLayers

public List<Layer> getLayers()
Description copied from interface: CyCustomGraphics
Get layers belongs to this object. In current Implementation, ti's always Ding's CustomGraphic object. Ordered by Z-Order value.

Specified by:
getLayers in interface CyCustomGraphics
Returns:
Collection of layer objects (in this version, it's CustomGraphics in Ding)

getDisplayName

public String getDisplayName()
Description copied from interface: CyCustomGraphics
Display name is a simple description of this image object. May not be unique and mutable.

Specified by:
getDisplayName in interface CyCustomGraphics
Returns:
display name as String.

setDisplayName

public void setDisplayName(String displayName)
Description copied from interface: CyCustomGraphics
Set human readable display name.

Specified by:
setDisplayName in interface CyCustomGraphics

getRenderedImage

public Image getRenderedImage()
Description copied from interface: CyCustomGraphics
From layers of graphics objects, render scaled Image object. Usually done by Java2D low level code. Usually, the image returned by this method is used in GUI components (as icons).

Specified by:
getRenderedImage in interface CyCustomGraphics
Returns:
rendered image object.

getTags

public Collection<String> getTags()
Specified by:
getTags in interface Taggable

getPosition

public ObjectPosition getPosition()
Description copied from interface: CyCustomGraphics
Current position

Specified by:
getPosition in interface CyCustomGraphics
Returns:
position of graphics as ObjectPosition.

setPosition

public void setPosition(ObjectPosition position)
Description copied from interface: CyCustomGraphics
Set posiiton of this graphics.

Specified by:
setPosition in interface CyCustomGraphics

toString

public String toString()
Overrides:
toString in class Object

setFitRatio

public void setFitRatio(float fitRatio)
Specified by:
setFitRatio in interface CyCustomGraphics

getFitRatio

public float getFitRatio()
Specified by:
getFitRatio in interface CyCustomGraphics

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.