public class ALDOperatorParameterPanel extends ALDParameterPanelParent
| Modifier and Type | Field and Description |
|---|---|
protected ALDOperatorControlFrame |
parentFrame
Reference to the control frame linked to this panel.
|
listenerList| Constructor and Description |
|---|
ALDOperatorParameterPanel(ALDOperator op,
Parameter.ExpertMode mode,
boolean topLevel,
ALDSwingValueChangeListener listener)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
changeViewMode(Parameter.ExpertMode mode)
Switches view mode of the panel.
|
void |
copyConfiguration(ALDOperatorParameterPanel opParameterPanel)
TODO Function should usually not be required...
|
void |
disableComponents()
Disables all components in the different sub-panels.
|
void |
dispose()
Disposes all components in the different sub-panels.
|
void |
enableComponents()
Enables all components in the different sub-panels.
|
JPanel |
getJPanel()
Get access to the main panel.
|
protected Object |
getParameterValue(boolean isRequired,
boolean isSupplemental,
ALDParameterDescriptor descr)
Get the current value for a paramter.
|
void |
handleValueChangeEvent(ALDSwingValueChangeEvent event)
Method which is called on event occurence.
|
HashMap<ALDOpParameterDescriptor,String> |
readGUIParameterValues()
Retrieve parameter values from GUI and configure operator accordingly.
|
HashMap<ALDOpParameterDescriptor,String> |
setNewOperator(ALDOperator op)
Sets a new operator for the panel.
|
boolean |
setParameterBatchModeInput(String paramName) |
boolean |
setParameterLinked(String paramName,
String sourceOp,
String sourceParamName)
Changes panel for a parameter to indicate that it is linked.
|
boolean |
setParameterNotLinked(String paramName)
Changes panel for a parameter to indicate that it is not linked anymore.
|
void |
setParentFrame(ALDOperatorControlFrame pf) |
void |
updateConfigurationStatus(Collection<String> missingParams)
Marks configurations status of required parameters by color.
|
HashMap<ALDParameterDescriptor,String> |
validateOperatorParameters(boolean deepValidate)
Check if operator is ready to run.
|
addValueChangeEventListener, fireALDSwingValueChangeEvent, removeValueChangeEventListenerprotected ALDOperatorControlFrame parentFrame
public ALDOperatorParameterPanel(ALDOperator op, Parameter.ExpertMode mode, boolean topLevel, ALDSwingValueChangeListener listener)
Note that value change event listeners added after construction of the object might will events generated during initialization. To avoid that a listener can be handed over to the object upon creation.
op - Operator associated with this panel.mode - Display mode of the panel.topLevel - If true, a top-level context is assumed.listener - Optional value change event listener.protected Object getParameterValue(boolean isRequired, boolean isSupplemental, ALDParameterDescriptor descr)
Usually the value of a parameter is fetched directly from the operator itself. However, sometimes values depend on the system state or are taken from external devices (database, GUI). This method allows to customize the reading of parameter values and is intended to be overriden by sub-classes.
getParameterValue in class ALDParameterPanelParentisRequired - Should be true, if parameter is required.isSupplemental - Should be true, if parameter is required.descr - Parameter descriptor in question.public HashMap<ALDOpParameterDescriptor,String> readGUIParameterValues()
public JPanel getJPanel()
public void setParentFrame(ALDOperatorControlFrame pf)
public boolean setParameterLinked(String paramName, String sourceOp, String sourceParamName)
paramName - Name of the parameter.sourceOp - Source node from where the edge originates.sourceParamName - Name of the source parameter.public boolean setParameterNotLinked(String paramName)
paramName - Name of the parameter.public boolean setParameterBatchModeInput(String paramName)
public HashMap<ALDOpParameterDescriptor,String> setNewOperator(ALDOperator op) throws ALDDataIOProviderException
This function is, e.g., called in case of loading a new operator from file.
op - New operator object to be associated with GUI.ALDDataIOProviderExceptionpublic void updateConfigurationStatus(Collection<String> missingParams)
A required parameter which is neither properly configured nor has an incoming edge is gets a red label, all others get black labels.
public void changeViewMode(Parameter.ExpertMode mode)
mode - Desired view mode.public void disableComponents()
public void enableComponents()
public void dispose()
public HashMap<ALDParameterDescriptor,String> validateOperatorParameters(boolean deepValidate) throws ALDOperatorException
The operator can be run if all GUI elements of required parameters return non-null values, and if furtheron the operator's validate() method returns true.
deepValidate - True if operator has to be validate itself.ALDOperatorExceptionpublic void handleValueChangeEvent(ALDSwingValueChangeEvent event)
ALDSwingValueChangeListenerevent - Event to be handled.public void copyConfiguration(ALDOperatorParameterPanel opParameterPanel) throws ALDDataIOException
opLink - b - ALDDataIOExceptionCopyright © 2010–2015 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.