de.unihalle.informatik.Alida.dataio.provider.swing.components
Class ALDSwingComponentComboBoxItem

java.lang.Object
  extended by de.unihalle.informatik.Alida.dataio.provider.swing.components.ALDSwingComponentComboBoxItem
All Implemented Interfaces:
java.lang.Comparable<ALDSwingComponentComboBoxItem>

public class ALDSwingComponentComboBoxItem
extends java.lang.Object
implements java.lang.Comparable<ALDSwingComponentComboBoxItem>

Alida-specific combobox item linked to a ALDSwingComponentComboBox.

An instance of this class contains all information associated with an entry in a ALDSwingComponentComboBox, i.e. the actual object, its textual representation and an optional tooltip text. Note that object and tooltip text are allowed to be null.

Author:
moeller

Field Summary
private  java.lang.Object item
          Item linked to the combobox entry.
private  java.lang.String itemText
          Textual representation of the object.
private  java.lang.String tooltip
          Tooltip text shown upon hovering over the entry.
 
Constructor Summary
ALDSwingComponentComboBoxItem(java.lang.Object _item, java.lang.String _text, java.lang.String _tooltip)
          Default constructor.
 
Method Summary
 int compareTo(ALDSwingComponentComboBoxItem o)
           
 java.lang.String getItemText()
          Get textual representation of object.
 java.lang.Object getObject()
          Get the object associated with this item.
 java.lang.String getTooltip()
          Get tooltip text.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

item

private java.lang.Object item
Item linked to the combobox entry.


itemText

private java.lang.String itemText
Textual representation of the object.


tooltip

private java.lang.String tooltip
Tooltip text shown upon hovering over the entry.

Constructor Detail

ALDSwingComponentComboBoxItem

public ALDSwingComponentComboBoxItem(java.lang.Object _item,
                                     java.lang.String _text,
                                     java.lang.String _tooltip)
Default constructor.

Parameters:
_item - Object linked to item.
_text - Textual representation of object.
_tooltip - Tooltip text.
Method Detail

compareTo

public int compareTo(ALDSwingComponentComboBoxItem o)
Specified by:
compareTo in interface java.lang.Comparable<ALDSwingComponentComboBoxItem>

getItemText

public java.lang.String getItemText()
Get textual representation of object.

Returns:
Textual representation.

getObject

public java.lang.Object getObject()
Get the object associated with this item.

Returns:
Object linked to item.

getTooltip

public java.lang.String getTooltip()
Get tooltip text.

Returns:
Tooltip text.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object