Cytoscape 2.8.0 API

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

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.ImageIcon
ImageIcon.AccessibleImageIcon
 
Field Summary
protected  int bottomPad
           
protected  Color color
           
static Color DEFAULT_ICON_COLOR
          Default icon color.
static int DEFAULT_ICON_SIZE
          Default icon size for Visual Properties
protected  int height
           
protected  int leftPad
           
protected  String name
           
protected  Shape shape
           
protected  int width
           
 
Fields inherited from class javax.swing.ImageIcon
component, tracker
 
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, loadImage, paintIcon, setDescription, setImage, setImageObserver, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, 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
Default icon size for Visual Properties

See Also:
Constant Field Values

height

protected int height

width

protected int width

color

protected Color color

shape

protected Shape shape

name

protected String name

leftPad

protected int leftPad

bottomPad

protected int bottomPad
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!

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.