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

java.lang.Object
  extended by de.unihalle.informatik.Alida.dataio.provider.swing.events.ALDSwingValueChangeReporter
      extended by de.unihalle.informatik.Alida.dataio.provider.swing.components.ALDSwingComponent
          extended by de.unihalle.informatik.Alida.dataio.provider.swing.components.ALDSwingComponentComboBox
All Implemented Interfaces:
java.awt.event.ItemListener, java.util.EventListener

public class ALDSwingComponentComboBox
extends ALDSwingComponent
implements java.awt.event.ItemListener

Alida-specific Swing component linked to a JComboBox.

This component wraps a JComboBox thereby triggering value change events and adding support for tooltips.

Author:
moeller

Nested Class Summary
protected  class ALDSwingComponentComboBox.ComboBoxTooltipRenderer
          Tooltip renderer class, adds a tooltip to each item in the combobox.
 
Field Summary
protected  javax.swing.JComboBox compComboBox
          Associated Swing component.
 
Fields inherited from class de.unihalle.informatik.Alida.dataio.provider.swing.events.ALDSwingValueChangeReporter
listenerList
 
Constructor Summary
ALDSwingComponentComboBox(java.util.Vector<ALDSwingComponentComboBoxItem> its)
          Default constructor.
 
Method Summary
 void disableComponent()
          Method to disable the component, i.e. all graphical elements, to prohibit parameter changes.
 void enableComponent()
          Method to enable the component with all graphical elements again.
 javax.swing.JComboBox getJComponent()
          Method to request the provider's GUI element.
 void itemStateChanged(java.awt.event.ItemEvent e)
           
 void setSelectedItem(java.lang.Object obj)
          Selects the item associated with the given object.
 
Methods inherited from class de.unihalle.informatik.Alida.dataio.provider.swing.events.ALDSwingValueChangeReporter
addValueChangeEventListener, fireALDSwingValueChangeEvent, removeValueChangeEventListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

compComboBox

protected javax.swing.JComboBox compComboBox
Associated Swing component.

Constructor Detail

ALDSwingComponentComboBox

public ALDSwingComponentComboBox(java.util.Vector<ALDSwingComponentComboBoxItem> its)
Default constructor.

Parameters:
itms - Set of items to be shown in combobox.
Method Detail

disableComponent

public void disableComponent()
Description copied from class: ALDSwingComponent
Method to disable the component, i.e. all graphical elements, to prohibit parameter changes.

Specified by:
disableComponent in class ALDSwingComponent

enableComponent

public void enableComponent()
Description copied from class: ALDSwingComponent
Method to enable the component with all graphical elements again.

Specified by:
enableComponent in class ALDSwingComponent

getJComponent

public javax.swing.JComboBox getJComponent()
Description copied from class: ALDSwingComponent
Method to request the provider's GUI element.

Specified by:
getJComponent in class ALDSwingComponent
Returns:
Component to be integrated in a graphical user interface.

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
Specified by:
itemStateChanged in interface java.awt.event.ItemListener

setSelectedItem

public void setSelectedItem(java.lang.Object obj)
Selects the item associated with the given object.

Parameters:
obj - Object which should be selected.