Class DataTypeDialog
- java.lang.Object
-
- org.eclipse.jface.window.Window
-
- org.eclipse.jface.dialogs.Dialog
-
- org.eclipse.jface.dialogs.TrayDialog
-
- org.eclipse.jface.dialogs.TitleAreaDialog
-
- org.palladiosimulator.editors.commons.dialogs.datatype.DataTypeDialog
-
- All Implemented Interfaces:
IShellProvider
- Direct Known Subclasses:
PalladioDataTypeDialog
public abstract class DataTypeDialog extends TitleAreaDialog
The dialogue is used in the PCM Bench for the production by Collection or Composite data types.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
Window.IExceptionHandler
-
-
Field Summary
-
Fields inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
DLG_IMG_TITLE_BANNER, DLG_IMG_TITLE_ERROR, INFO_MESSAGE, WARNING_MESSAGE
-
Fields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS
-
Fields inherited from class org.eclipse.jface.window.Window
CANCEL, OK, resizeHasOccurred
-
-
Constructor Summary
Constructors Constructor Description DataTypeDialog(Shell parentShell)
Instantiates a new data type dialog.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
configureShell(Shell newShell)
protected void
createButtonsForButtonBar(Composite parent)
abstract void
createCollectionDataType()
The method create a new CollectionDataType.abstract void
createCompositeDataType()
The method create a new CompositeDataType.protected Control
createDialogArea(Composite parent)
abstract void
createInnerSectionCompositeGroup(Composite group)
The method create the editing area for CompositeDataType.protected Group
getChoiceTypeGroup()
Gets the choice type group.protected Button
getCollectionButton()
Gets the collection button.protected Composite
getComposite()
Gets the composite.protected Button
getCompositeButton()
Gets the composite button.protected DataTypeEnum
getEditeDataType()
Gets the edite data type.protected String
getEntityName()
Gets the entity name.protected Point
getInitialSize()
abstract String[]
getLoadedRepositories()
The method define the list with a loaded repository.abstract String
getSelectedInnerType(SelectionEvent event)
Gets the selected inner type.protected StackLayout
getStackLayout()
Gets the stack layout.protected void
init(DataTypeEnum dataTyp, String repositoryName, String entityName, String entityInnerType)
The method is called with the editing of the type of DataType.abstract void
setEditedResource(String resource)
Sets the edited resource.void
setEnabled(boolean enabled)
Enables the receiver all component if the argument is true, and disables it otherwise.protected void
setOKButtonDisabled()
Sets the ok button disabled.protected void
setOKButtonEnabled()
Sets the ok button enabled.protected void
setTopCollectionLayout()
Sets the top collection layout.protected void
setTopCompositeLayout()
The method specified in topControl is visible and all other controls are not visible.abstract boolean
validateCompositeDataType()
Validate composite data type.void
validateInput()
The method examines whether the straight editing DataTYpe type has all parameters.-
Methods inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
createContents, getErrorMessage, getMessage, getTitleArea, getTitleImageLabel, setErrorMessage, setMessage, setMessage, setTitle, setTitleAreaColor, setTitleImage
-
Methods inherited from class org.eclipse.jface.dialogs.TrayDialog
closeTray, createButtonBar, createHelpControl, getLayout, getTray, handleShellCloseEvent, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailable
-
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getOKButton, initializeBounds, initializeDialogUnits, isResizable, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
-
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
-
-
-
-
Constructor Detail
-
DataTypeDialog
public DataTypeDialog(Shell parentShell)
Instantiates a new data type dialog.- Parameters:
parentShell
- the parent shell
-
-
Method Detail
-
init
protected void init(DataTypeEnum dataTyp, String repositoryName, String entityName, String entityInnerType)
The method is called with the editing of the type of DataType.- Parameters:
dataTyp
- the data typrepositoryName
- - the repository name of editing DataTypeentityName
- - the name of the editing DataTypeentityInnerType
- - the inner type of the editing DataType
-
configureShell
protected void configureShell(Shell newShell)
- Overrides:
configureShell
in classWindow
-
createDialogArea
protected Control createDialogArea(Composite parent)
- Overrides:
createDialogArea
in classTitleAreaDialog
-
setEnabled
public void setEnabled(boolean enabled)
Enables the receiver all component if the argument is true, and disables it otherwise.- Parameters:
enabled
- the new enabled state
-
getInitialSize
protected Point getInitialSize()
- Overrides:
getInitialSize
in classTitleAreaDialog
-
getEditeDataType
protected DataTypeEnum getEditeDataType()
Gets the edite data type.- Returns:
- the edite data type
-
createButtonsForButtonBar
protected void createButtonsForButtonBar(Composite parent)
- Overrides:
createButtonsForButtonBar
in classDialog
-
setOKButtonEnabled
protected void setOKButtonEnabled()
Sets the ok button enabled.
-
setOKButtonDisabled
protected void setOKButtonDisabled()
Sets the ok button disabled.
-
getLoadedRepositories
public abstract String[] getLoadedRepositories()
The method define the list with a loaded repository.- Returns:
- the loaded repositories
-
createInnerSectionCompositeGroup
public abstract void createInnerSectionCompositeGroup(Composite group)
The method create the editing area for CompositeDataType.- Parameters:
group
- the group
-
getSelectedInnerType
public abstract String getSelectedInnerType(SelectionEvent event)
Gets the selected inner type.- Parameters:
event
- the event- Returns:
- the selected inner type
-
setEditedResource
public abstract void setEditedResource(String resource)
Sets the edited resource.- Parameters:
resource
- the new edited resource
-
createCollectionDataType
public abstract void createCollectionDataType()
The method create a new CollectionDataType.
-
createCompositeDataType
public abstract void createCompositeDataType()
The method create a new CompositeDataType.
-
validateCompositeDataType
public abstract boolean validateCompositeDataType()
Validate composite data type.- Returns:
- true, if successful
-
getEntityName
protected String getEntityName()
Gets the entity name.- Returns:
- the entity name
-
setTopCompositeLayout
protected void setTopCompositeLayout()
The method specified in topControl is visible and all other controls are not visible.
-
setTopCollectionLayout
protected void setTopCollectionLayout()
Sets the top collection layout.
-
validateInput
public void validateInput()
The method examines whether the straight editing DataTYpe type has all parameters.
-
getChoiceTypeGroup
protected Group getChoiceTypeGroup()
Gets the choice type group.- Returns:
- the choice type group
-
getCompositeButton
protected Button getCompositeButton()
Gets the composite button.- Returns:
- the composite button
-
getCollectionButton
protected Button getCollectionButton()
Gets the collection button.- Returns:
- the collection button
-
getStackLayout
protected StackLayout getStackLayout()
Gets the stack layout.- Returns:
- the stack layout
-
getComposite
protected Composite getComposite()
Gets the composite.- Returns:
- the composite
-
-