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 ListViewer
viewer
-
Constructor Summary
Constructors Constructor Description AbstractUIProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
addButtonSelected()
This method is called when the add button is selected.void
clearUI()
Clears and disables all UI elements.protected abstract void
createAndInitList(Composite parent)
Creates and initializes theListViewer
.protected abstract DetailsUI
createDetailsUI(Composite parent)
Creates theDetailsUI
and returns it.protected abstract void
createLabelComposite(Composite parent)
Creates the elements of the label area.void
createUI(ScrolledComposite parent)
Creates the UI with the given parentScrolledComposite
.void
dispose()
Disposes theDisposable
.protected abstract String
getModelExtension()
Returns a string representation of the extension of model files that can be modified by the elements in the provided UIprotected abstract void
removeButtonSelected()
This method is called when the remove button is selected.void
setEnabled(boolean enabled)
Sets the enabled state of the UI to the given state.void
setFocus()
Sets the focus to an UI element of the provided UI.abstract void
updateUI()
Updates the UI.
-
-
-
Field Detail
-
viewer
protected ListViewer viewer
-
-
Method Detail
-
createUI
public void createUI(ScrolledComposite parent)
Description copied from interface:UIProvider
Creates the UI with the given parentScrolledComposite
.- Specified by:
createUI
in 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 theDetailsUI
and 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:UIProvider
Updates the UI.- Specified by:
updateUI
in interfaceUIProvider
-
clearUI
public void clearUI()
Description copied from interface:UIProvider
Clears and disables all UI elements.- Specified by:
clearUI
in 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:UIProvider
Sets the enabled state of the UI to the given state.- Specified by:
setEnabled
in interfaceUIProvider
- Parameters:
enabled
- the new enabled state
-
setFocus
public void setFocus()
Description copied from interface:UIProvider
Sets the focus to an UI element of the provided UI.- Specified by:
setFocus
in interfaceUIProvider
-
dispose
public void dispose()
Description copied from interface:Disposable
Disposes theDisposable
. Can be used to dispose SWT objects and to remove listeners.- Specified by:
dispose
in 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
-
-