Classes | Public Member Functions | Private Member Functions | Private Attributes

de.fraunhofer.isst.axbench.dialogs.operations.OperationPage Class Reference

The page for data of one operation. More...

List of all members.

Classes

class  ParameterStorage

Public Member Functions

void createControl (Composite theParent)
 Creates the top level control for this dialog page under the given parent composite.
Map< String, Object > getInputParameters ()
 Returns the input parameters.
OperationElement getOperationElement ()
 Returns the operation element of this page.
IAXLOperation getOperationExecutable ()
 Returns the operation executable of this page.
 OperationPage (OperationElement newOperationElement)
 Constructor sets title and description.

Private Member Functions

void browseFile (Button btnSource)
 Displays a file or path selection dialog and lets the user select.
void checkInputControls (Control theCaller)
 Checks if input controls have to be changed/redrawn.
Control createElementSelector (ParameterStorage theParameterStorage, Composite theParent, String theParentElementID)
 Creates an axlang subelement selection GUI.
Control createElementSelector (ParameterStorage theParameterStorage, Composite theParent)
 Creates an axlang element selection GUI.
Control createFileSelection (ParameterStorage theParameterStorage, Composite theParent, ParameterTypes theType)
 Creates a file selection GUI.
Control createFreeSelector (ParameterStorage theParameterStorage, Composite theParent)
 Creates a free selection GUI.
Group createOperationInformation (Composite theParent)
 Creates the operation information part.
Composite createParameterGroup (Composite theParent, Composite cmpAbove)
 Creates an operation parameter group with labels, selectors etc.
Control createSelectionGUI (List< String > theItems, ParameterStorage theParameterStorage, Composite theParent, boolean createTextInput)
 Creates a selection GUI.
Control createTextControl (ParameterStorage theParameterStorage, Composite theParent)
 Creates a text control.
boolean existsPreviousElement ()
 Returns if an aXLang element of a previous operation's output exists.
IAXLangElement getAXLElement (String theParameterID)
 Returns the selected aXLang element.
boolean isValid ()
 Returns the validity of the page.
void redrawPage (Control theCaller)
 Redraws the page and sets the complete flag accordingly.

Private Attributes

boolean keepErrorMessage = false
 do not change error message
Map< String, ParameterStoragemapInputParameters = null
 input parameters of this page
OperationElement theOperationElement = null
 operation of this page
IAXLOperation theOperationExecutable = null
 operation executable of this page

Detailed Description

The page for data of one operation.

The page is added to the OperationWizard.

Every page consists of two parts:

  1. operation information
  2. operation parameter input
Author:
ekleinod
Version:
0.9.0
Since:
0.9.0

Constructor & Destructor Documentation

de.fraunhofer.isst.axbench.dialogs.operations.OperationPage.OperationPage ( OperationElement  newOperationElement  ) 

Constructor sets title and description.

Parameters:
newOperationElement operation

Member Function Documentation

void de.fraunhofer.isst.axbench.dialogs.operations.OperationPage.browseFile ( Button  btnSource  )  [private]

Displays a file or path selection dialog and lets the user select.

Parameters:
btnSource calling button
void de.fraunhofer.isst.axbench.dialogs.operations.OperationPage.checkInputControls ( Control  theCaller  )  [private]

Checks if input controls have to be changed/redrawn.

Parameters:
theCaller calling control
void de.fraunhofer.isst.axbench.dialogs.operations.OperationPage.createControl ( Composite  theParent  ) 

Creates the top level control for this dialog page under the given parent composite.

  1. create the container and define the layout
  2. create the operation information part
  3. create the parameter selection part
Parameters:
theParent the parent composite
Control de.fraunhofer.isst.axbench.dialogs.operations.OperationPage.createElementSelector ( ParameterStorage  theParameterStorage,
Composite  theParent 
) [private]

Creates an axlang element selection GUI.

Parameters:
theParameterStorage operation parameter storage
theParent the parent composite
Returns:
value holding control
Control de.fraunhofer.isst.axbench.dialogs.operations.OperationPage.createElementSelector ( ParameterStorage  theParameterStorage,
Composite  theParent,
String  theParentElementID 
) [private]

Creates an axlang subelement selection GUI.

Parameters:
theParameterStorage operation parameter storage
theParent the parent composite
theParentElementID parameter id
Returns:
value holding control
Control de.fraunhofer.isst.axbench.dialogs.operations.OperationPage.createFileSelection ( ParameterStorage  theParameterStorage,
Composite  theParent,
ParameterTypes  theType 
) [private]

Creates a file selection GUI.

Parameters:
theParameterStorage operation parameter storage
theParent the parent composite
theType type of file selection (ParameterTypes#FILE_IN, ParameterTypes#FILE_OUT, ParameterTypes#PATH)
Returns:
value holding control
Control de.fraunhofer.isst.axbench.dialogs.operations.OperationPage.createFreeSelector ( ParameterStorage  theParameterStorage,
Composite  theParent 
) [private]

Creates a free selection GUI.

Parameters:
theParameterStorage operation parameter storage
theParent the parent composite
Returns:
value holding control
Group de.fraunhofer.isst.axbench.dialogs.operations.OperationPage.createOperationInformation ( Composite  theParent  )  [private]

Creates the operation information part.

  1. operation name
  2. operation group
  3. operation provider
  4. operation description

The labels are defined first, then layouted, for dependencies of layout from defined labels

Parameters:
theParent parent composite
Returns:
created group
Composite de.fraunhofer.isst.axbench.dialogs.operations.OperationPage.createParameterGroup ( Composite  theParent,
Composite  cmpAbove 
) [private]

Creates an operation parameter group with labels, selectors etc.

Parameters:
theParent parent composite
cmpAbove composite above the new parameters (for aligning)
Returns:
created composite
Control de.fraunhofer.isst.axbench.dialogs.operations.OperationPage.createSelectionGUI ( List< String >  theItems,
ParameterStorage  theParameterStorage,
Composite  theParent,
boolean  createTextInput 
) [private]

Creates a selection GUI.

  1. no selection items
    1. create text input if flag was set
    2. create label with error message if flag was not set
  2. less than AXBenchConstants#MAX_RADIO_COUNT items: create radio selection
    1. one item: disable selection, inform user
  3. more than AXBenchConstants#MAX_RADIO_COUNT items: combo box
Parameters:
theItems items to select
theParameterStorage parameter storage
theParent the parent composite
createTextInput create text input field if no selection was given? (true == yes, false == no)
Returns:
value holding control
Control de.fraunhofer.isst.axbench.dialogs.operations.OperationPage.createTextControl ( ParameterStorage  theParameterStorage,
Composite  theParent 
) [private]

Creates a text control.

Parameters:
theParameterStorage parameter storage
theParent the parent composite
Returns:
new text control
boolean de.fraunhofer.isst.axbench.dialogs.operations.OperationPage.existsPreviousElement (  )  [private]

Returns if an aXLang element of a previous operation's output exists.

Returns:
does aXLang of previous operation exist?
Return values:
true yes, exists
false no, does not exist
IAXLangElement de.fraunhofer.isst.axbench.dialogs.operations.OperationPage.getAXLElement ( String  theParameterID  )  [private]

Returns the selected aXLang element.

Parameters:
theParameterID id of parameter holding aXlang element
Returns:
aXLang element to perform the operation on
Return values:
null if from previous operation or not exists
false no, does not exist
Map<String, Object> de.fraunhofer.isst.axbench.dialogs.operations.OperationPage.getInputParameters (  ) 

Returns the input parameters.

Returns:
map of input parameters
OperationElement de.fraunhofer.isst.axbench.dialogs.operations.OperationPage.getOperationElement (  ) 

Returns the operation element of this page.

Returns:
operation element of this page
IAXLOperation de.fraunhofer.isst.axbench.dialogs.operations.OperationPage.getOperationExecutable (  ) 

Returns the operation executable of this page.

Returns:
operation executable of this page
boolean de.fraunhofer.isst.axbench.dialogs.operations.OperationPage.isValid (  )  [private]

Returns the validity of the page.

Returns:
validity
Return values:
true valid (all mandatory input parameters entered)
false not valid (at least one mandatory parameter value is missing)
void de.fraunhofer.isst.axbench.dialogs.operations.OperationPage.redrawPage ( Control  theCaller  )  [private]

Redraws the page and sets the complete flag accordingly.

Parameters:
theCaller calling control

Member Data Documentation

do not change error message

input parameters of this page

operation of this page

operation executable of this page