cytoscape.editor.impl
Class CytoShapeIcon

java.lang.Object
  extended bycytoscape.editor.impl.CytoShapeIcon
All Implemented Interfaces:
javax.swing.Icon

public class CytoShapeIcon
extends java.lang.Object
implements javax.swing.Icon

Specialized Icon for Cytoscape editor palette entry. Renders icon based upon input shape, size, color.

Version:
1.0
Author:
Allan Kuchinsky

Field Summary
static int HEIGHT
           
static int WIDTH
           
 
Constructor Summary
CytoShapeIcon(cytoscape.visual.Arrow arrowType)
           
CytoShapeIcon(byte shape, java.awt.Color color)
           
CytoShapeIcon(java.awt.Image img)
           
 
Method Summary
 int getIconHeight()
           
 int getIconWidth()
           
 void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
          /** Implements specialized coordinate line drawing for palette shcapes (non-Javadoc)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WIDTH

public static final int WIDTH
See Also:
Constant Field Values

HEIGHT

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

CytoShapeIcon

public CytoShapeIcon(byte shape,
                     java.awt.Color color)

CytoShapeIcon

public CytoShapeIcon(java.awt.Image img)

CytoShapeIcon

public CytoShapeIcon(cytoscape.visual.Arrow arrowType)
Method Detail

getIconHeight

public int getIconHeight()
Specified by:
getIconHeight in interface javax.swing.Icon

getIconWidth

public int getIconWidth()
Specified by:
getIconWidth in interface javax.swing.Icon

paintIcon

public void paintIcon(java.awt.Component c,
                      java.awt.Graphics g,
                      int x,
                      int y)
/** Implements specialized coordinate line drawing for palette shcapes (non-Javadoc)

Specified by:
paintIcon in interface javax.swing.Icon
See Also:
Icon.paintIcon(java.awt.Component, java.awt.Graphics, int, int)