Class AbstractUIProvider
- java.lang.Object
-
- org.palladiosimulator.pcmtx.pcmtxviews.ui.AbstractUIProvider
-
- All Implemented Interfaces:
Disposable,UIProvider
- Direct Known Subclasses:
DatabasesUIProvider,EntityTypesUIProvider,TablesUIProvider
public abstract class AbstractUIProvider extends Object implements UIProvider
This abstract class provides basic UIProvider functionality.
-
-
Field Summary
Fields Modifier and Type Field Description protected ListViewerviewer
-
Constructor Summary
Constructors Constructor Description AbstractUIProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidaddButtonSelected()This method is called when the add button is selected.voidclearUI()Clears and disables all UI elements.protected abstract voidcreateAndInitList(Composite parent)Creates and initializes theListViewer.protected abstract DetailsUIcreateDetailsUI(Composite parent)Creates theDetailsUIand returns it.protected abstract voidcreateLabelComposite(Composite parent)Creates the elements of the label area.voidcreateUI(ScrolledComposite parent)Creates the UI with the given parentScrolledComposite.voiddispose()Disposes theDisposable.protected abstract StringgetModelExtension()Returns a string representation of the extension of model files that can be modified by the elements in the provided UIprotected abstract voidremoveButtonSelected()This method is called when the remove button is selected.voidsetEnabled(boolean enabled)Sets the enabled state of the UI to the given state.voidsetFocus()Sets the focus to an UI element of the provided UI.abstract voidupdateUI()Updates the UI.
-
-
-
Field Detail
-
viewer
protected ListViewer viewer
-
-
Method Detail
-
createUI
public void createUI(ScrolledComposite parent)
Description copied from interface:UIProviderCreates the UI with the given parentScrolledComposite.- Specified by:
createUIin interfaceUIProvider- Parameters:
parent- the parentScrolledComposite
-
createLabelComposite
protected abstract void createLabelComposite(Composite parent)
Creates the elements of the label area.- Parameters:
parent- the parentComposite
-
createDetailsUI
protected abstract DetailsUI createDetailsUI(Composite parent)
Creates theDetailsUIand returns it.
-
createAndInitList
protected abstract void createAndInitList(Composite parent)
Creates and initializes theListViewer.- Parameters:
parent- the parentComposite
-
updateUI
public abstract void updateUI()
Description copied from interface:UIProviderUpdates the UI.- Specified by:
updateUIin interfaceUIProvider
-
clearUI
public void clearUI()
Description copied from interface:UIProviderClears and disables all UI elements.- Specified by:
clearUIin interfaceUIProvider
-
addButtonSelected
protected abstract void addButtonSelected()
This method is called when the add button is selected.
-
removeButtonSelected
protected abstract void removeButtonSelected()
This method is called when the remove button is selected.
-
setEnabled
public void setEnabled(boolean enabled)
Description copied from interface:UIProviderSets the enabled state of the UI to the given state.- Specified by:
setEnabledin interfaceUIProvider- Parameters:
enabled- the new enabled state
-
setFocus
public void setFocus()
Description copied from interface:UIProviderSets the focus to an UI element of the provided UI.- Specified by:
setFocusin interfaceUIProvider
-
dispose
public void dispose()
Description copied from interface:DisposableDisposes theDisposable. Can be used to dispose SWT objects and to remove listeners.- Specified by:
disposein interfaceDisposable
-
getModelExtension
protected abstract String getModelExtension()
Returns a string representation of the extension of model files that can be modified by the elements in the provided UI- Returns:
- the extension of model files that can be modified by the provided UI
-
-