public class ALDSwingComponentComboBox extends ALDSwingComponent implements ItemListener
JComboBox
.
This component wraps a JComboBox
thereby triggering value change
events and adding support for tooltips.
Modifier and Type | Class and Description |
---|---|
protected class |
ALDSwingComponentComboBox.ComboBoxTooltipRenderer
Tooltip renderer class, adds a tooltip to each item in the combobox.
|
Modifier and Type | Field and Description |
---|---|
protected JComboBox<ALDSwingComponentItem> |
compComboBox
Associated Swing component.
|
private boolean |
ignoreEvents
Flag to ensure that no events are triggered if item change is triggered
from internal.
|
protected ALDParameterDescriptor |
paramDescriptor
Descriptor of associated (operator) parameter.
|
listenerList
Constructor and Description |
---|
ALDSwingComponentComboBox(ALDParameterDescriptor descr,
Vector<ALDSwingComponentItem> its)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clearItems()
Clears the combo box, i.e. removes the current set of items.
|
void |
disableComponent()
Method to disable the component, i.e. all graphical elements, to
prohibit parameter changes.
|
void |
dispose()
Releases all resources, i.e. closes all sub-windows.
|
void |
enableComponent()
Method to enable the component with all graphical elements again.
|
JComboBox |
getJComponent()
Method to request the provider's GUI element.
|
void |
itemStateChanged(ItemEvent e) |
void |
setSelectedItem(Object obj)
Selects the item associated with the given object.
|
void |
updateItems(Vector<ALDSwingComponentItem> its)
Updates the set of items managed by the combo box.
|
addValueChangeEventListener, fireALDSwingValueChangeEvent, removeValueChangeEventListener
protected ALDParameterDescriptor paramDescriptor
protected JComboBox<ALDSwingComponentItem> compComboBox
private boolean ignoreEvents
public ALDSwingComponentComboBox(ALDParameterDescriptor descr, Vector<ALDSwingComponentItem> its)
descr
- Descriptor of associated parameter.its
- Set of items to be shown in combobox.public JComboBox getJComponent()
ALDSwingComponent
getJComponent
in class ALDSwingComponent
public void itemStateChanged(ItemEvent e)
itemStateChanged
in interface ItemListener
public void updateItems(Vector<ALDSwingComponentItem> its)
its
- List of new items.public void clearItems()
public void setSelectedItem(Object obj)
obj
- Object which should be selected.public void disableComponent()
ALDSwingComponent
disableComponent
in class ALDSwingComponent
public void enableComponent()
ALDSwingComponent
enableComponent
in class ALDSwingComponent
public void dispose()
ALDSwingComponent
dispose
in class ALDSwingComponent
Copyright © 2010–2021 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.