edu.northwestern.at.utils.swing.icons
Class StringPlusIcon

java.lang.Object
  extended by edu.northwestern.at.utils.swing.icons.StringPlusIcon
All Implemented Interfaces:
AddIcon
Direct Known Subclasses:
IconPlusString

public class StringPlusIcon
extends java.lang.Object
implements AddIcon

A string which knows how to append an icon to its JLabel.


Field Summary
protected  javax.swing.Icon icon
          The icon, or null if none.
protected  java.lang.String value
          The string.
 
Constructor Summary
StringPlusIcon(java.lang.String value, javax.swing.Icon icon)
          Constructs a new StringPlusIcon object.
 
Method Summary
 void addIcon(javax.swing.JLabel label)
          Appends the icon to the JLabel.
 java.lang.String toString()
          Returns the string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected java.lang.String value
The string.


icon

protected javax.swing.Icon icon
The icon, or null if none.

Constructor Detail

StringPlusIcon

public StringPlusIcon(java.lang.String value,
                      javax.swing.Icon icon)
Constructs a new StringPlusIcon object.

Parameters:
value - The string.
icon - The icon, or null if none.
Method Detail

addIcon

public void addIcon(javax.swing.JLabel label)
Appends the icon to the JLabel.

Specified by:
addIcon in interface AddIcon
Parameters:
label - The JLabel.

toString

public java.lang.String toString()
Returns the string.

Overrides:
toString in class java.lang.Object
Returns:
The string.