Cytoscape 2.8.0 API

cytoscape.visual.customgraphic.impl.vector
Class GradientLayerCustomGraphics

java.lang.Object
  extended by cytoscape.visual.customgraphic.impl.AbstractDCustomGraphics
      extended by cytoscape.visual.customgraphic.impl.vector.GradientLayerCustomGraphics
All Implemented Interfaces:
CyCustomGraphics, VectorCustomGraphics, Taggable
Direct Known Subclasses:
GradientOvalLayer, GradientRoundRectangleLayer

public abstract class GradientLayerCustomGraphics
extends AbstractDCustomGraphics
implements VectorCustomGraphics

Proof of concept code to generate Custom Graphics dynamically as vector graphics.

Author:
kono

Field Summary
protected  Shape bound
           
protected  CustomGraphicsProperty<Color> c1
           
protected  CustomGraphicsProperty<Color> c2
           
protected static String COLOR1
           
protected static String COLOR2
           
protected  PaintFactory paintFactory
           
protected  Map<String,CustomGraphicsProperty<?>> props
           
protected  BufferedImage rendered
           
 
Fields inherited from class cytoscape.visual.customgraphic.impl.AbstractDCustomGraphics
DELIMITER, displayName, fitRatio, height, id, layers, LIST_DELIMITER, parser, position, tags, width
 
Constructor Summary
GradientLayerCustomGraphics(Long id, String name)
           
 
Method Summary
 Map<String,CustomGraphicsProperty<?>> getGraphicsProps()
           
 Image getRenderedImage()
          From layers of graphics objects, render scaled Image object.
protected  void renderImage(Graphics graphics)
           
 
Methods inherited from class cytoscape.visual.customgraphic.impl.AbstractDCustomGraphics
getDisplayName, getFitRatio, getHeight, getIdentifier, getLayers, getPosition, getTags, getWidth, setDisplayName, setFitRatio, setHeight, setPosition, setWidth, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

paintFactory

protected PaintFactory paintFactory

bound

protected Shape bound

COLOR1

protected static final String COLOR1
See Also:
Constant Field Values

COLOR2

protected static final String COLOR2
See Also:
Constant Field Values

c1

protected final CustomGraphicsProperty<Color> c1

c2

protected final CustomGraphicsProperty<Color> c2

rendered

protected BufferedImage rendered

props

protected final Map<String,CustomGraphicsProperty<?>> props
Constructor Detail

GradientLayerCustomGraphics

public GradientLayerCustomGraphics(Long id,
                                   String name)
Method Detail

getGraphicsProps

public Map<String,CustomGraphicsProperty<?>> getGraphicsProps()
Specified by:
getGraphicsProps in interface VectorCustomGraphics

renderImage

protected void renderImage(Graphics graphics)

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
Overrides:
getRenderedImage in class AbstractDCustomGraphics
Returns:
rendered image object.

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.