java.lang.Object
org.relayirc.swingutil.GuiObject
- public class GuiObject
- extends java.lang.Object
Group together a name, object and icon for use in Swing lists,
combo-boxes and tables.
_stringLength
private int _stringLength
_stringValue
private java.lang.String _stringValue
_object
private java.lang.Object _object
_icon
private javax.swing.Icon _icon
GuiObject
public GuiObject(java.lang.String stringValue,
java.lang.Object object)
GuiObject
public GuiObject(java.lang.String stringValue,
java.lang.Object object,
javax.swing.Icon icon)
setStringLength
public void setStringLength(int len)
- Sets the length of strings returned by toString(). Set
to -1 to disable. Only allows length > 3.
getIcon
public javax.swing.Icon getIcon()
setIcon
public void setIcon(javax.swing.Icon icon)
setObject
public void setObject(java.lang.Object object)
getObject
public java.lang.Object getObject()
setString
public void setString(java.lang.String stringValue)
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object
- Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method
never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string
concatenation with this object. If the result is
null, string concatenation will instead
use "null".
The default implementation returns
getClass().getName() + "@" +
Integer.toHexString(hashCode()).