ij2x.plugin
Class ColorIcon

java.lang.Object
  extended by ij2x.plugin.ColorIcon
All Implemented Interfaces:
javax.swing.Icon

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

Title: ColorIcon

Description: implements Icon to draw a solid "iconWidth x iconHeight" block of the specified color.

Copyright: Copyright (c)

Company: rawak.de


Field Summary
protected  java.awt.image.BufferedImage bimage
           
protected  java.awt.Color color
           
protected  java.awt.Shape icon
           
protected  int iconHeight
           
protected  int iconHeight1
           
protected  int iconWidth
           
protected  int iconWidth1
           
protected  boolean isPolygon
           
protected  boolean modal
           
protected  java.awt.Graphics2D offScrGc
           
protected  java.awt.Color oldcolor
           
protected  java.awt.Shape polygon
           
protected  java.util.Vector shapeEventListeners
           
protected  int x
           
protected  int y
           
 
Constructor Summary
ColorIcon()
           
ColorIcon(java.awt.Color color)
           
ColorIcon(java.awt.Color color, int iconWidth, int iconHeight)
           
ColorIcon(java.awt.Color color, int iconWidth, int iconHeight, int iconWidth1, int iconHeight1, boolean modal)
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener p)
           
 java.awt.Color getColor()
           
 java.awt.Graphics2D getIconGC()
           
 int getIconHeight()
           
 int getIconWidth()
           
 void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener p)
           
 void setColor(java.awt.Color color)
           
 void updateShape()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

color

protected java.awt.Color color

oldcolor

protected java.awt.Color oldcolor

iconWidth

protected int iconWidth

iconHeight

protected int iconHeight

iconWidth1

protected int iconWidth1

iconHeight1

protected int iconHeight1

icon

protected java.awt.Shape icon

polygon

protected java.awt.Shape polygon

shapeEventListeners

protected java.util.Vector shapeEventListeners

offScrGc

protected java.awt.Graphics2D offScrGc

x

protected int x

y

protected int y

bimage

protected java.awt.image.BufferedImage bimage

isPolygon

protected boolean isPolygon

modal

protected boolean modal
Constructor Detail

ColorIcon

public ColorIcon(java.awt.Color color,
                 int iconWidth,
                 int iconHeight,
                 int iconWidth1,
                 int iconHeight1,
                 boolean modal)
Parameters:
color - is selected Icon Color

ColorIcon

public ColorIcon(java.awt.Color color,
                 int iconWidth,
                 int iconHeight)
Parameters:
color - is selected Icon Color

ColorIcon

public ColorIcon(java.awt.Color color)
Parameters:
color - is selected Icon Color

ColorIcon

public ColorIcon()
Method Detail

paintIcon

public void paintIcon(java.awt.Component c,
                      java.awt.Graphics g,
                      int x,
                      int y)
Specified by:
paintIcon in interface javax.swing.Icon

getColor

public java.awt.Color getColor()

setColor

public void setColor(java.awt.Color color)

getIconGC

public java.awt.Graphics2D getIconGC()

getIconWidth

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

getIconHeight

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

updateShape

public void updateShape()

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener p)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener p)