private class ALDEnumSetDataIOSwing.EnumSelectionConfigWindow extends ALDSwingValueChangeReporter implements ActionListener, ALDSwingValueChangeListener
Modifier and Type | Field and Description |
---|---|
private JButton |
closeButton
Button to close the configuration window.
|
private Type |
elemType
EnumSet element type.
|
private ALDSwingComponentList |
enumList
List component displaying elements.
|
private Vector<ALDSwingComponentItem> |
enumListItems
Items in list component.
|
private static int |
frameHeightMin
Fixed minimal height of the configuration window.
|
private static int |
frameWidthMin
Fixed minimal width of window.
|
private JPanel |
mainPanel
Main panel of main frame.
|
private ALDParameterDescriptor |
paramDescriptor
Parameter descriptor of associated parameter.
|
private JScrollPane |
scroller
Scroller element for collection elements.
|
private JFrame |
window
Main frame.
|
listenerList
Constructor and Description |
---|
EnumSelectionConfigWindow(Field field,
Class<?> cl,
Object obj,
ALDParameterDescriptor descr)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
void |
disableComponent()
Deactivates the configuration window to prohibit value changes.
|
void |
dispose()
Disposes this window and all sub-components.
|
void |
enableComponent()
Reactivates the configuration window to allow for value changes.
|
void |
handleValueChangeEvent(ALDSwingValueChangeEvent event)
Method which is called on event occurence.
|
EnumSet<?> |
readData(Field field,
Class<?> cl)
Extracts current collection data.
|
private void |
setupWindow(EnumSet<?> selection)
Displays the selection in the window.
|
void |
setValue(Object value)
Updates current enum selection.
|
addValueChangeEventListener, fireALDSwingValueChangeEvent, removeValueChangeEventListener
private static final int frameWidthMin
private static final int frameHeightMin
private JFrame window
private JPanel mainPanel
private ALDSwingComponentList enumList
private Vector<ALDSwingComponentItem> enumListItems
private JScrollPane scroller
private JButton closeButton
private Type elemType
private ALDParameterDescriptor paramDescriptor
public EnumSelectionConfigWindow(Field field, Class<?> cl, Object obj, ALDParameterDescriptor descr)
field
- Field to specify input data objects.cl
- Class of collection elements.obj
- Initial value of collection.descr
- Optional descriptor for additional information.public EnumSet<?> readData(Field field, Class<?> cl)
field
- Field of collection elements.cl
- Class of collection elements.public void setValue(Object value)
value
- New selection.public void disableComponent()
public void enableComponent()
public void dispose()
private void setupWindow(EnumSet<?> selection)
selection
- Set of currently selected items.public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void handleValueChangeEvent(ALDSwingValueChangeEvent event)
ALDSwingValueChangeListener
handleValueChangeEvent
in interface ALDSwingValueChangeListener
event
- Event to be handled.Copyright © 2010–2021 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.