public class ALDSwingComponentList extends ALDSwingComponent implements ListSelectionListener
JList
.
This component wraps a JList
thereby triggering value change
events and adding support for tooltips.
Modifier and Type | Field and Description |
---|---|
protected JList<ALDSwingComponentItem> |
compList
Associated Swing component.
|
(package private) DefaultListModel<ALDSwingComponentItem> |
compListModel
List model underlying the JList component.
|
private boolean |
ignoreEvents
Flag to ensure that no events are triggered if item change is triggered
from internal.
|
protected Vector<ALDSwingComponentItem> |
items
Items represented in list.
|
protected ALDParameterDescriptor |
paramDescriptor
Descriptor of associated (operator) parameter.
|
listenerList
Constructor and Description |
---|
ALDSwingComponentList(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.
|
JList<ALDSwingComponentItem> |
getJComponent()
Method to request the provider's GUI element.
|
Vector<ALDSwingComponentItem> |
getSelectedItems()
Get set of selected items.
|
void |
setSelectedItems(Vector<ALDSwingComponentItem> sItems)
Selects the given items.
|
void |
updateItems(Vector<ALDSwingComponentItem> sItems)
Updates the set of items managed by the list.
|
void |
valueChanged(ListSelectionEvent e) |
addValueChangeEventListener, fireALDSwingValueChangeEvent, removeValueChangeEventListener
protected ALDParameterDescriptor paramDescriptor
protected JList<ALDSwingComponentItem> compList
DefaultListModel<ALDSwingComponentItem> compListModel
protected Vector<ALDSwingComponentItem> items
private boolean ignoreEvents
public ALDSwingComponentList(ALDParameterDescriptor descr, Vector<ALDSwingComponentItem> its)
descr
- Descriptor of associated parameter.its
- Set of items to be shown in combobox.public JList<ALDSwingComponentItem> getJComponent()
ALDSwingComponent
getJComponent
in class ALDSwingComponent
public void valueChanged(ListSelectionEvent e)
valueChanged
in interface ListSelectionListener
public void updateItems(Vector<ALDSwingComponentItem> sItems)
its
- List of new items.public void clearItems()
public void setSelectedItems(Vector<ALDSwingComponentItem> sItems)
list
- Objects which should be selected.public Vector<ALDSwingComponentItem> getSelectedItems()
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.