T
- the type of the text field/editorpublic abstract class SourceListParameterPage<T> extends HaleWizardPage<AbstractGenericFunctionWizard<?,?>> implements ParameterPage
Modifier | Constructor and Description |
---|---|
protected |
SourceListParameterPage(String pageName) |
protected |
SourceListParameterPage(String pageName,
String title,
org.eclipse.jface.resource.ImageDescriptor titleImage) |
Modifier and Type | Method and Description |
---|---|
protected void |
configure(T textField)
Subclasses can configure the text field to for example add some
validation mechanism.
|
protected abstract T |
createAndLayoutTextField(org.eclipse.swt.widgets.Composite parent)
Create and text field and layout it.
|
protected void |
createContent(org.eclipse.swt.widgets.Composite page)
Create the page content
|
protected Map<EntityDefinition,String> |
determineDefaultVariableNames(List<EntityDefinition> variables)
Determine the variable names from the corresponding entity definitions.
The default implementation uses getVariableName(EntityDefinition) to determine the name for each
variable independently. |
com.google.common.collect.ListMultimap<String,ParameterValue> |
getConfiguration()
Returns the configuration of the parameters this page is responsible for.
|
protected abstract String |
getParameterName()
Should return the parameter which should be configured using all source
properties.
|
protected abstract String |
getSourcePropertyName()
Should return the name of the source property which should be used.
|
protected abstract String |
getText(T textField)
Get the current text of the text field.
|
protected T |
getTextField()
Get the text editor/field.
|
protected String |
getVariableName(EntityDefinition variable)
This gets called for all variables.
Subclasses can change how they are displayed here. The default format is like "part1.part2.name". |
protected abstract void |
insertTextAtCurrentPos(T textField,
String insert)
Insert a given text at the current position of the given text field.
|
protected void |
onShowPage(boolean firstShow)
Called when this page is shown
|
void |
setParameter(Set<FunctionParameter> params,
com.google.common.collect.ListMultimap<String,ParameterValue> initialValues)
Sets the parameters this page is responsible for and their initial
values.
|
protected abstract void |
setText(T textField,
String value)
Set the text of the text field to the given value.
|
protected void |
sourcePropertiesChanged(Iterable<EntityDefinition> variables)
This gets called, when the user chose other source properties.
|
createControl, dispose, getHelpContext, getWizard, performHelp
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, setButtonLayoutData, setControl, setMessage, setVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
protected SourceListParameterPage(String pageName, String title, org.eclipse.jface.resource.ImageDescriptor titleImage)
protected SourceListParameterPage(String pageName)
protected abstract String getParameterName()
protected abstract String getSourcePropertyName()
protected void configure(T textField)
textField
- the text field to configureprotected String getVariableName(EntityDefinition variable)
variable
- the variableprotected void sourcePropertiesChanged(Iterable<EntityDefinition> variables)
variables
- the new source propertiespublic void setParameter(Set<FunctionParameter> params, com.google.common.collect.ListMultimap<String,ParameterValue> initialValues)
ParameterPage
setParameter
in interface ParameterPage
params
- the parameters this page is responsible forinitialValues
- initial values of those parameters, may be
null
, should not be changedParameterPage.setParameter(Set, ListMultimap)
public com.google.common.collect.ListMultimap<String,ParameterValue> getConfiguration()
ParameterPage
getConfiguration
in interface ParameterPage
ParameterPage.getConfiguration()
protected void onShowPage(boolean firstShow)
HaleWizardPage
onShowPage
in class HaleWizardPage<AbstractGenericFunctionWizard<?,?>>
firstShow
- specifies if it is the first time the page is shown
since its creationHaleWizardPage.onShowPage(boolean)
protected Map<EntityDefinition,String> determineDefaultVariableNames(List<EntityDefinition> variables)
getVariableName(EntityDefinition)
to determine the name for each
variable independently.variables
- the variablesprotected void createContent(org.eclipse.swt.widgets.Composite page)
HaleWizardPage
createContent
in class HaleWizardPage<AbstractGenericFunctionWizard<?,?>>
page
- the page composite, implementors may assign a custom layout
to this compositeHaleWizardPage.createContent(Composite)
protected abstract void setText(T textField, String value)
textField
- the text fieldvalue
- the value to set as textprotected abstract String getText(T textField)
textField
- the text fieldprotected abstract void insertTextAtCurrentPos(T textField, String insert)
textField
- the text fieldinsert
- the text to insertprotected abstract T createAndLayoutTextField(org.eclipse.swt.widgets.Composite parent)
parent
- the parent composite, it has a one-column grid layoutprotected T getTextField()
Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a