com.ibm.carma.ui.action.custom
Interface ICustomParameterControl

All Known Implementing Classes:
AbstractCustomParameterControl

public interface ICustomParameterControl

Interface for custom parameter controls. Clients should implement this interface and include the name of their class in a custom parameter control contributed to the custom parameter controls extension point "com.ibm.carma.ui.customParameterControls". For example, the markup in the contributing plugin.xml might contain:

 <extension point="com.ibm.carma.ui.customParameterControls">
   <customParameterControl
     parameterId="042"
     actionId="21"
     ramId="42"
     class="com.example.MyCustomParameterControl"/>
 </extension>
 

Since:
8.0

Method Summary
 void addParameterValueChangedListener(IParameterValueChangedListener listener)
          Adds a IParameterValueChangedListener to the custom control.
 org.eclipse.swt.widgets.Control createControl(org.eclipse.swt.widgets.Composite parent, com.ibm.carma.model.RepositoryManager repositoryManager, com.ibm.carma.model.Parameter parameter, com.ibm.carma.model.Action action, com.ibm.carma.model.CustomActionAccepter customActionAccepter, java.lang.Object defaultValue)
          This method is invoked when CARMA user interface is building the dialog for the relevant custom action.
 java.lang.Object getValue()
          This method returns the value of the parameter for which a custom control has been created.
 boolean isUsingDefaultLabel()
          If this method returns true, the CARMA user interface will create a label for the control in the input dialog's left column, like it does for default controls.
 void removeParameterValueChangedListener(IParameterValueChangedListener listener)
          Removes a IParameterValueChangedListener from the custom control.
 

Method Detail

createControl

org.eclipse.swt.widgets.Control createControl(org.eclipse.swt.widgets.Composite parent,
                                              com.ibm.carma.model.RepositoryManager repositoryManager,
                                              com.ibm.carma.model.Parameter parameter,
                                              com.ibm.carma.model.Action action,
                                              com.ibm.carma.model.CustomActionAccepter customActionAccepter,
                                              java.lang.Object defaultValue)
This method is invoked when CARMA user interface is building the dialog for the relevant custom action. Contributors should return a control for the given parameter in the user interface for the given action.

Parameters:
parent - the parent composite
repositoryManager - the repository manager
parameter - the parameter
action - the action
customActionAccepter - the resource that is being acted upon
defaultValue - the default value of the parameter
Returns:
the control for the given parameter for the given action

getValue

java.lang.Object getValue()
This method returns the value of the parameter for which a custom control has been created.

Returns:
the value of the parameter

isUsingDefaultLabel

boolean isUsingDefaultLabel()
If this method returns true, the CARMA user interface will create a label for the control in the input dialog's left column, like it does for default controls. If this method returns false, the control returned by the createControl method will span all display columns in the input dialog, and the CARMA user interface will not provide any label.

Returns:
whether to use the default label

addParameterValueChangedListener

void addParameterValueChangedListener(IParameterValueChangedListener listener)
Adds a IParameterValueChangedListener to the custom control.

Parameters:
listener - the listener

removeParameterValueChangedListener

void removeParameterValueChangedListener(IParameterValueChangedListener listener)
Removes a IParameterValueChangedListener from the custom control.

Parameters:
listener - the listener