Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD

cytoscape.visual.ui.icon
Class VisualPropertyIcon

java.lang.Object
  extended by javax.swing.ImageIcon
      extended by cytoscape.visual.ui.icon.VisualPropertyIcon
All Implemented Interfaces:
Serializable, Accessible, Icon
Direct Known Subclasses:
ArrowIcon, LineTypeIcon, NodeIcon

public abstract class VisualPropertyIcon
extends ImageIcon

Icon created from Shape object passed from rendering engine.
This icon is scalable (vector image). Actual paint method is defined in child classes.

Since:
Cytoscape 2.5
Version:
0.5
Author:
kono
See Also:
Serialized Form

Field Summary
static Color DEFAULT_ICON_COLOR
          Default icon color.
static int DEFAULT_ICON_SIZE
           
 
Constructor Summary
VisualPropertyIcon(Shape shape, int width, int height, String name)
          Constructor without Color parameter.
VisualPropertyIcon(Shape shape, int width, int height, String name, Color color)
          Constructor with full parameter set.
VisualPropertyIcon(String name, Color color)
          Creates a new VisualPropertyIcon object.
 
Method Summary
 Color getColor()
          Get color of icon
 int getIconHeight()
          Get height of icon.
 int getIconWidth()
          Get width of icon.
 String getName()
          Get human-readable name of this icon.
 Shape getShape()
          DOCUMENT ME!
 void setBottomPadding(int pad)
          DOCUMENT ME!
 void setColor(Color color)
          Set icon color.
 void setIconHeight(int height)
          Set height.
 void setIconWidth(int width)
          Set width.
 void setLeftPadding(int pad)
          Insert space on the left.
 void setName(String name)
          Set human-readable name of this icon.
 
Methods inherited from class javax.swing.ImageIcon
getAccessibleContext, getDescription, getImage, getImageLoadStatus, getImageObserver, paintIcon, setDescription, setImage, setImageObserver, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_ICON_COLOR

public static final Color DEFAULT_ICON_COLOR
Default icon color.


DEFAULT_ICON_SIZE

public static final int DEFAULT_ICON_SIZE
See Also:
Constant Field Values
Constructor Detail

VisualPropertyIcon

public VisualPropertyIcon(String name,
                          Color color)
Creates a new VisualPropertyIcon object.

Parameters:
shape - DOCUMENT ME!
name - DOCUMENT ME!

VisualPropertyIcon

public VisualPropertyIcon(Shape shape,
                          int width,
                          int height,
                          String name)
Constructor without Color parameter.

Parameters:
shape -
width -
height -
name -

VisualPropertyIcon

public VisualPropertyIcon(Shape shape,
                          int width,
                          int height,
                          String name,
                          Color color)
Constructor with full parameter set.

Parameters:
shape -
width -
height -
name -
color -
Method Detail

getShape

public Shape getShape()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getIconHeight

public int getIconHeight()
Get height of icon. This implements Icon interface.

Specified by:
getIconHeight in interface Icon
Overrides:
getIconHeight in class ImageIcon

getIconWidth

public int getIconWidth()
Get width of icon. This implements Icon interface.

Specified by:
getIconWidth in interface Icon
Overrides:
getIconWidth in class ImageIcon

setIconWidth

public void setIconWidth(int width)
Set width.

Parameters:
width - Width of icon

setIconHeight

public void setIconHeight(int height)
Set height.

Parameters:
height - Height of icon

getName

public String getName()
Get human-readable name of this icon.

Returns:

setName

public void setName(String name)
Set human-readable name of this icon.

Parameters:
name -

getColor

public Color getColor()
Get color of icon

Returns:
Icon color.

setColor

public void setColor(Color color)
Set icon color.

Parameters:
color - Icon color.

setLeftPadding

public void setLeftPadding(int pad)
Insert space on the left.

Parameters:
pad - DOCUMENT ME!

setBottomPadding

public void setBottomPadding(int pad)
DOCUMENT ME!

Parameters:
pad - DOCUMENT ME!

www.cytoscape.org