Class DelegatingEasyEditorPage
- java.lang.Object
-
- net.ssehub.easy.producer.ui.productline_editor.DelegatingEasyEditorPage
-
- All Implemented Interfaces:
IEASyEditorPage
public class DelegatingEasyEditorPage extends java.lang.Object implements IEASyEditorPage
Implementation of an editorpage to use the configuration table editor within usual composites.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDelegatingEasyEditorPage.IDirtyListenerA dirty listener interface.
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.swt.widgets.Compositecompositeprivate booleandirtyprivate DelegatingEasyEditorPage.IDirtyListenerlistener
-
Constructor Summary
Constructors Constructor Description DelegatingEasyEditorPage(org.eclipse.swt.widgets.Composite composite)Constructor for an EasyEditorPage.DelegatingEasyEditorPage(org.eclipse.swt.widgets.Composite composite, DelegatingEasyEditorPage.IDirtyListener listener)Constructor for an EasyEditorPage.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.swt.widgets.CompositegetContentPane()Returns the content pane of this editor page.org.eclipse.swt.widgets.DisplaygetDisplay()Returns theDisplaythat is associated with the receiver.java.lang.StringgetPageText()Returns the text label for the editor page.booleanisDirty()Returns whether dirty or not.booleanisDisposed()Returns whether the editor page is disposed.private voidnotifyListener()Notifies the dirty listener about a change in the dirty flag.voidrefresh()Refreshes the shown content of the current project.voidsetDirty()Informs allIEASyPageListenerthat this page became dirty.voidunsetDirty()Resets the dirty flag.
-
-
-
Field Detail
-
composite
private org.eclipse.swt.widgets.Composite composite
-
dirty
private boolean dirty
-
listener
private DelegatingEasyEditorPage.IDirtyListener listener
-
-
Constructor Detail
-
DelegatingEasyEditorPage
public DelegatingEasyEditorPage(org.eclipse.swt.widgets.Composite composite)
Constructor for an EasyEditorPage.- Parameters:
composite- This Composite will be set.
-
DelegatingEasyEditorPage
public DelegatingEasyEditorPage(org.eclipse.swt.widgets.Composite composite, DelegatingEasyEditorPage.IDirtyListener listener)Constructor for an EasyEditorPage.- Parameters:
composite- This Composite will be set.listener- optional dirty listener (may be null)
-
-
Method Detail
-
notifyListener
private void notifyListener()
Notifies the dirty listener about a change in the dirty flag.
-
setDirty
public void setDirty()
Description copied from interface:IEASyEditorPageInforms allIEASyPageListenerthat this page became dirty.- Specified by:
setDirtyin interfaceIEASyEditorPage
-
unsetDirty
public void unsetDirty()
Resets the dirty flag.
-
isDirty
public boolean isDirty()
Returns whether dirty or not.- Returns:
- dirty true -> dirty. false -> not dirty.
-
getContentPane
public org.eclipse.swt.widgets.Composite getContentPane()
Description copied from interface:IEASyEditorPageReturns the content pane of this editor page.- Specified by:
getContentPanein interfaceIEASyEditorPage- Returns:
- The content pane of this editor page
-
getDisplay
public org.eclipse.swt.widgets.Display getDisplay()
Description copied from interface:IEASyEditorPageReturns theDisplaythat is associated with the receiver.- Specified by:
getDisplayin interfaceIEASyEditorPage- Returns:
- the receiver's display (may be null if disposed)
-
getPageText
public java.lang.String getPageText()
Description copied from interface:IEASyEditorPageReturns the text label for the editor page. This is for creating labels/tabs in an editor.- Specified by:
getPageTextin interfaceIEASyEditorPage- Returns:
- The text label for the editor page (must not be null).
-
refresh
public void refresh()
Description copied from interface:IEASyEditorPageRefreshes the shown content of the current project. This method should be calles if the contant inside the editor has been changed and should also affect other editor parts.- Specified by:
refreshin interfaceIEASyEditorPage
-
isDisposed
public boolean isDisposed()
Description copied from interface:IEASyEditorPageReturns whether the editor page is disposed.- Specified by:
isDisposedin interfaceIEASyEditorPage- Returns:
trueif the editor page is disposed,falseelse
-
-