Class CreateEditorContents
- java.lang.Object
-
- org.palladiosimulator.editors.commons.dialogs.parameters.CreateEditorContents
-
public final class CreateEditorContents extends Object
This class create a dialog area for Parameter-, DataTypeDialog. In order to make functionality possible from dialogue perfectly to, the following functions must be called: setViewerContentProvider(IContentProvider contentProvider), setViewerLabelProvider(IBaseLabelProvider labelProvider), setViewerCellModifier(ICellModifier cellModifier), setAddButtonActionListener(SelectionListener listener), setDeleteButtonActionListener(SelectionListener listener), setUpButtonActionListener(SelectionListener listener), setDownButtonActionListener(SelectionListener listener), setViewerInput(Object input){
-
-
Field Summary
Fields Modifier and Type Field Description static String
ATTRIBUTE_ICON_COLUMN
Columns of a table, which is used into ParameterEditDialog.static String
CONTEXT_COLUMN
The Constant CONTEXT_COLUMN.static int
CONTEXT_COLUMN_INDEX
The Constant CONTEXT_COLUMN_INDEX.static int
ICON_COLUMN_INDEX
The Constant ICON_COLUMN_INDEX.static String
NAME_COLUMN
The Constant NAME_COLUMN.static int
NAME_COLUMN_INDEX
The Constant NAME_COLUMN_INDEX.static String
TYPE_COLUMN
The Constant TYPE_COLUMN.static int
TYPE_COLUMN_INDEX
The Constant TYPE_COLUMN_INDEX.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CreateEditorContents
create(Composite composite)
Factory Method.void
createNameColumnCellEditor()
Creates the name column cell editor.void
createSeparator(Composite composite)
Creates the separator.void
createTypeColumnCellEditor(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain)
Creates the type column cell editor.static String[]
getColumnNames()
Gets the column names.TableViewer
getViewer()
Gets the viewer.void
init(Composite composite)
create dialog area.void
setAddButtonActionListener(SelectionListener listener)
Sets the adds the button action listener.void
setDeleteButtonActionListener(SelectionListener listener)
Sets the delete button action listener.void
setDeleteItemsEnabled(boolean enabled)
set deleteItem - ToolItem enabled or disabled.void
setDownButtonActionListener(SelectionListener listener)
Sets the down button action listener.void
setDownItemsEnabled(boolean enabled)
set downItem - ToolItem enabled or disabled.void
setUpButtonActionListener(SelectionListener listener)
Sets the up button action listener.void
setUpItemsEnabled(boolean enabled)
set upItem - ToolItem enabled or disabled.void
setViewerCellModifier(ICellModifier cellModifier)
Sets the viewer cell modifier.void
setViewerContentProvider(IContentProvider contentProvider)
Sets the viewer content provider.void
setViewerInput(Object input)
Sets the viewer input.void
setViewerLabelProvider(IBaseLabelProvider labelProvider)
Sets the viewer label provider.void
setViewerSelectionChangedListener(ISelectionChangedListener listener)
Sets the viewer selection changed listener.
-
-
-
Field Detail
-
ICON_COLUMN_INDEX
public static final int ICON_COLUMN_INDEX
The Constant ICON_COLUMN_INDEX.- See Also:
- Constant Field Values
-
CONTEXT_COLUMN_INDEX
public static final int CONTEXT_COLUMN_INDEX
The Constant CONTEXT_COLUMN_INDEX.- See Also:
- Constant Field Values
-
TYPE_COLUMN_INDEX
public static final int TYPE_COLUMN_INDEX
The Constant TYPE_COLUMN_INDEX.- See Also:
- Constant Field Values
-
NAME_COLUMN_INDEX
public static final int NAME_COLUMN_INDEX
The Constant NAME_COLUMN_INDEX.- See Also:
- Constant Field Values
-
ATTRIBUTE_ICON_COLUMN
public static final String ATTRIBUTE_ICON_COLUMN
Columns of a table, which is used into ParameterEditDialog.- See Also:
- Constant Field Values
-
CONTEXT_COLUMN
public static final String CONTEXT_COLUMN
The Constant CONTEXT_COLUMN.- See Also:
- Constant Field Values
-
TYPE_COLUMN
public static final String TYPE_COLUMN
The Constant TYPE_COLUMN.- See Also:
- Constant Field Values
-
NAME_COLUMN
public static final String NAME_COLUMN
The Constant NAME_COLUMN.- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public static CreateEditorContents create(Composite composite)
Factory Method.- Parameters:
composite
- the composite- Returns:
- the creates the editor contents
-
createNameColumnCellEditor
public void createNameColumnCellEditor()
Creates the name column cell editor.
-
createTypeColumnCellEditor
public void createTypeColumnCellEditor(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain)
Creates the type column cell editor.- Parameters:
editingDomain
- the editing domain
-
setViewerContentProvider
public void setViewerContentProvider(IContentProvider contentProvider)
Sets the viewer content provider.- Parameters:
contentProvider
- the new viewer content provider
-
setViewerLabelProvider
public void setViewerLabelProvider(IBaseLabelProvider labelProvider)
Sets the viewer label provider.- Parameters:
labelProvider
- the new viewer label provider
-
setViewerCellModifier
public void setViewerCellModifier(ICellModifier cellModifier)
Sets the viewer cell modifier.- Parameters:
cellModifier
- the new viewer cell modifier
-
setAddButtonActionListener
public void setAddButtonActionListener(SelectionListener listener)
Sets the adds the button action listener.- Parameters:
listener
- the new adds the button action listener
-
setDeleteButtonActionListener
public void setDeleteButtonActionListener(SelectionListener listener)
Sets the delete button action listener.- Parameters:
listener
- the new delete button action listener
-
setUpButtonActionListener
public void setUpButtonActionListener(SelectionListener listener)
Sets the up button action listener.- Parameters:
listener
- the new up button action listener
-
setDownButtonActionListener
public void setDownButtonActionListener(SelectionListener listener)
Sets the down button action listener.- Parameters:
listener
- the new down button action listener
-
setViewerSelectionChangedListener
public void setViewerSelectionChangedListener(ISelectionChangedListener listener)
Sets the viewer selection changed listener.- Parameters:
listener
- the new viewer selection changed listener
-
setViewerInput
public void setViewerInput(Object input)
Sets the viewer input.- Parameters:
input
- the new viewer input
-
init
public void init(Composite composite)
create dialog area.- Parameters:
composite
- the composite
-
setUpItemsEnabled
public void setUpItemsEnabled(boolean enabled)
set upItem - ToolItem enabled or disabled.- Parameters:
enabled
- the new up items enabled
-
setDownItemsEnabled
public void setDownItemsEnabled(boolean enabled)
set downItem - ToolItem enabled or disabled.- Parameters:
enabled
- the new down items enabled
-
setDeleteItemsEnabled
public void setDeleteItemsEnabled(boolean enabled)
set deleteItem - ToolItem enabled or disabled.- Parameters:
enabled
- the new delete items enabled
-
createSeparator
public void createSeparator(Composite composite)
Creates the separator.- Parameters:
composite
- the composite
-
getColumnNames
public static String[] getColumnNames()
Gets the column names.- Returns:
- the column names
-
getViewer
public TableViewer getViewer()
Gets the viewer.- Returns:
- the viewer
-
-