org.knime.base.node.viz.property.color
Class ColorManager2Icon

java.lang.Object
  extended by org.knime.base.node.viz.property.color.ColorManager2Icon
All Implemented Interfaces:
Icon

 class ColorManager2Icon
extends Object
implements Icon

Constructs a new icon with its specific Color and size.

Author:
Thomas Gabriel, University of Konstanz

Constructor Summary
ColorManager2Icon(DataCell cell, Color color)
          Creates new squared color icon.
ColorManager2Icon(DataCell cell, String prefix, Color color)
          Creates new squared color icon.
 
Method Summary
 DataCell getCell()
           
 Color getColor()
           
 int getIconHeight()
          
 int getIconWidth()
          
 String getText()
           
 void paintIcon(Component c, Graphics g, int x, int y)
          
 void setColor(Color color)
          Set's a new color.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorManager2Icon

ColorManager2Icon(DataCell cell,
                  Color color)
Creates new squared color icon.

Parameters:
cell - The label.
color - The initial color.

ColorManager2Icon

ColorManager2Icon(DataCell cell,
                  String prefix,
                  Color color)
Creates new squared color icon.

Parameters:
cell - The label.
prefix - The label's prefix.
color - The inital color.
Method Detail

setColor

public void setColor(Color color)
Set's a new color.

Parameters:
color - The new Color.

getColor

public Color getColor()
Returns:
The color.

getCell

public DataCell getCell()
Returns:
The label.

getText

public String getText()
Returns:
The display text which is the prefix plus DataCell.

getIconHeight

public int getIconHeight()

Specified by:
getIconHeight in interface Icon

getIconWidth

public int getIconWidth()

Specified by:
getIconWidth in interface Icon

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)

Specified by:
paintIcon in interface Icon


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.