org.fife.rsta.ac.java
Class DecoratableIcon

java.lang.Object
  extended by org.fife.rsta.ac.java.DecoratableIcon
All Implemented Interfaces:
Icon

public class DecoratableIcon
extends Object
implements Icon

An icon that can have an optional "decorations" icon beside of it.

Version:
1.0
Author:
Robert Futrell

Constructor Summary
DecoratableIcon(Icon mainIcon)
          Constructor.
DecoratableIcon(int width, Icon mainIcon)
          Constructor.
 
Method Summary
 void addDecorationIcon(Icon decoration)
          Adds a decoration icon.
 int getIconHeight()
          
 int getIconWidth()
          
 void paintIcon(Component c, Graphics g, int x, int y)
          
 void setDeprecated(boolean deprecated)
          Sets whether this icon is for a deprecated item.
 void setMainIcon(Icon icon)
          Sets the main icon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecoratableIcon

public DecoratableIcon(Icon mainIcon)
Constructor.

Parameters:
mainIcon - The "main" icon. This cannot be null.

DecoratableIcon

public DecoratableIcon(int width,
                       Icon mainIcon)
Constructor.

Parameters:
w - The width for this icon.
mainIcon - The "main" icon. This cannot be null.
Method Detail

addDecorationIcon

public void addDecorationIcon(Icon decoration)
Adds a decoration icon.

Parameters:
decoration - A new decoration icon. This cannot be null.
See Also:
setMainIcon(Icon)

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

setDeprecated

public void setDeprecated(boolean deprecated)
Sets whether this icon is for a deprecated item.

Parameters:
deprecated - Whether this icon is for a deprecated item.

setMainIcon

public void setMainIcon(Icon icon)
Sets the main icon.

Parameters:
icon - The "main" icon. This cannot be null.
See Also:
#setDecorationIcon(Icon)


Copyright © 2003-2011. All Rights Reserved.