Cytoscape 2.8.0 API

cytoscape.visual.ui.icon
Class NodeIcon

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

public class NodeIcon
extends VisualPropertyIcon

Icon for node shapes.

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  Graphics2D g2d
           
protected  Shape newShape
           
 
Fields inherited from class cytoscape.visual.ui.icon.VisualPropertyIcon
bottomPad, color, DEFAULT_ICON_COLOR, DEFAULT_ICON_SIZE, height, leftPad, name, shape, width
 
Fields inherited from class javax.swing.ImageIcon
component, tracker
 
Constructor Summary
NodeIcon()
          Creates a new NodeIcon object.
NodeIcon(NodeShape ns)
           
NodeIcon(Shape shape, int width, int height, String name)
          Creates a new NodeShapeIcon object.
NodeIcon(Shape shape, int width, int height, String name, Color color)
          Creates a new NodeShapeIcon object.
 
Method Summary
 NodeIcon clone()
          DOCUMENT ME!
 int getIconHeight()
          Get height of icon.
 int getIconWidth()
          Get width of icon.
 void paintIcon(Component c, Graphics g, int x, int y)
          Draw icon using Java2D.
 void setIconHeight(int height)
          DOCUMENT ME!
 void setIconWidth(int width)
          DOCUMENT ME!
 
Methods inherited from class cytoscape.visual.ui.icon.VisualPropertyIcon
getColor, getName, getShape, setBottomPadding, setColor, setLeftPadding, setName
 
Methods inherited from class javax.swing.ImageIcon
getAccessibleContext, getDescription, getImage, getImageLoadStatus, getImageObserver, loadImage, setDescription, setImage, setImageObserver, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

newShape

protected Shape newShape

g2d

protected Graphics2D g2d
Constructor Detail

NodeIcon

public NodeIcon()
Creates a new NodeIcon object.


NodeIcon

public NodeIcon(NodeShape ns)

NodeIcon

public NodeIcon(Shape shape,
                int width,
                int height,
                String name)
Creates a new NodeShapeIcon object.

Parameters:
shape -
width -
height -
name -

NodeIcon

public NodeIcon(Shape shape,
                int width,
                int height,
                String name,
                Color color)
Creates a new NodeShapeIcon object.

Parameters:
shape - DOCUMENT ME!
width - DOCUMENT ME!
height - DOCUMENT ME!
name - DOCUMENT ME!
color - DOCUMENT ME!
Method Detail

setIconWidth

public void setIconWidth(int width)
DOCUMENT ME!

Overrides:
setIconWidth in class VisualPropertyIcon
Parameters:
width - DOCUMENT ME!

setIconHeight

public void setIconHeight(int height)
DOCUMENT ME!

Overrides:
setIconHeight in class VisualPropertyIcon
Parameters:
height - DOCUMENT ME!

getIconWidth

public int getIconWidth()
Description copied from class: VisualPropertyIcon
Get width of icon. This implements Icon interface.

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

getIconHeight

public int getIconHeight()
Description copied from class: VisualPropertyIcon
Get height of icon. This implements Icon interface.

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

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
Draw icon using Java2D.

Specified by:
paintIcon in interface Icon
Overrides:
paintIcon in class ImageIcon
Parameters:
c - DOCUMENT ME!
g - DOCUMENT ME!
x - DOCUMENT ME!
y - DOCUMENT ME!

clone

public NodeIcon clone()
DOCUMENT ME!

Overrides:
clone in class Object
Returns:
DOCUMENT ME!

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.