public class ALDParametrizedClassConfigWindow extends ALDParameterPanelParent implements ActionListener
Modifier and Type | Field and Description |
---|---|
private String |
className
Name of parametrized class to configure.
|
private Parameter.ExpertMode |
displayMode
Mode for displaying parameters.
|
private boolean |
displayOnly
Flag to indicate if editing is allowed or only display is requested.
|
private int |
frameWidth
Fixed width of window.
|
private JPanel |
mainPanel
Main panel of main frame.
|
private Class<?> |
myclass
Parametrized class to configure.
|
private ALDParameterDescriptor |
myDescriptor
Parameter descriptor associated with parametrized class object.
|
private Object |
myObj
Object to configure associated with window.
|
private LinkedList<ALDParameterDescriptor> |
paramDescrips
Listed of associated parametrized class parameters.
|
private ALDParameterPanel |
parameterPanel
Parameter panel.
|
private JFrame |
window
Main configuration window.
|
listenerList
Constructor and Description |
---|
ALDParametrizedClassConfigWindow(Class<?> c,
ALDParameterDescriptor d)
Default constructor.
|
ALDParametrizedClassConfigWindow(Object obj,
ALDParameterDescriptor d)
Default constructor.
|
ALDParametrizedClassConfigWindow(Object obj,
ALDParameterDescriptor d,
boolean noEdit)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
private void |
buildWindow()
Generates the window.
|
void |
disableComponent()
Disable component to prohibit value changes.
|
void |
dispose()
Dispose component and all sub-windows.
|
void |
enableComponent()
Enable component to allow for value changes.
|
Object |
getParameterValue(boolean isRequired,
boolean isSupplemental,
ALDParameterDescriptor descr)
Method to allow
ALDParameterPanel to request parameter values. |
void |
handleValueChangeEvent(ALDSwingValueChangeEvent event)
Method which is called on event occurence.
|
boolean |
isVisible()
Method to query if configuration window is visible.
|
Object |
readData(Field field,
Class<?> cl)
Extracts current parametrized class configuration.
|
void |
setDisplayOnly(boolean b)
Enable or display parameter editing.
|
void |
setEditable(boolean f)
Disable or enable the elements in the window for editing.
|
void |
setValue(Object obj)
Update parameter values in GUI.
|
void |
setVisible(boolean b)
Show or hide the window.
|
addValueChangeEventListener, fireALDSwingValueChangeEvent, removeValueChangeEventListener
private Parameter.ExpertMode displayMode
private JFrame window
private final int frameWidth
private JPanel mainPanel
private ALDParameterPanel parameterPanel
private LinkedList<ALDParameterDescriptor> paramDescrips
private Class<?> myclass
private ALDParameterDescriptor myDescriptor
private Object myObj
private String className
private boolean displayOnly
public ALDParametrizedClassConfigWindow(Class<?> c, ALDParameterDescriptor d)
c
- Class associated with this window.d
- Descriptor associated with parameter configured here.public ALDParametrizedClassConfigWindow(Object obj, ALDParameterDescriptor d)
obj
- Object associated with this window.d
- Descriptor associated with parameter configured here.public ALDParametrizedClassConfigWindow(Object obj, ALDParameterDescriptor d, boolean noEdit)
obj
- Object to configure.d
- Descriptor associated with parameter configured here.noEdit
- If true, no parameter editing is possible.public Object getParameterValue(boolean isRequired, boolean isSupplemental, ALDParameterDescriptor descr)
ALDParameterPanelParent
ALDParameterPanel
to request parameter values.getParameterValue
in class ALDParameterPanelParent
isRequired
- Should be true, if parameter is required.isSupplemental
- Should be true, if parameter is supplemental.descr
- Descriptor linked to requested parameter.public void disableComponent()
public void enableComponent()
public void dispose()
public void setVisible(boolean b) throws ALDDataIOProviderException
b
- If true, window is displayed, otherwise hidden.ALDDataIOProviderException
- Thrown in case of failure.public boolean isVisible()
public void setDisplayOnly(boolean b)
b
- If true, editing is disabled, otherwise enabled.public void setEditable(boolean f)
f
- If true, editing is possible, otherwise not.public void setValue(Object obj) throws ALDDataIOException
obj
- New value of parameter object.ALDDataIOException
- Thrown in case of failure.public Object readData(Field field, Class<?> cl) throws ALDDataIOException
field
- Field of parametrized class object.cl
- Desired class.ALDDataIOException
- Thrown in case of failure.private void buildWindow()
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.