Class AbstractEASyEditorPage
- java.lang.Object
-
- org.eclipse.swt.widgets.Widget
-
- org.eclipse.swt.widgets.Control
-
- org.eclipse.swt.widgets.Scrollable
-
- org.eclipse.swt.widgets.Composite
-
- net.ssehub.easy.producer.ui.productline_editor.AbstractEASyEditorPage
-
- All Implemented Interfaces:
IEASyEditorPage,org.eclipse.jface.dialogs.IPageChangedListener,org.eclipse.swt.graphics.Drawable,org.eclipse.ui.IPropertyListener
- Direct Known Subclasses:
AttributeValuesPage,ConfigurationPage,InstantiatorConfigPage,ModelEditorPage,ProjectConfigurationPage
public abstract class AbstractEASyEditorPage extends org.eclipse.swt.widgets.Composite implements org.eclipse.jface.dialogs.IPageChangedListener, org.eclipse.ui.IPropertyListener, IEASyEditorPage
Abstract super class for editor pages of the EASy-Producer tool suite.- Author:
- El-Sharkawy
-
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.ui.forms.widgets.ScrolledFormcontentPaneprivate java.util.List<IEASyPageListener>pageListenersprivate ProductLineProjectplpprivate org.eclipse.ui.forms.widgets.FormToolkittoolkit
-
Constructor Summary
Constructors Constructor Description AbstractEASyEditorPage(ProductLineProject plp, java.lang.String title, org.eclipse.swt.widgets.Composite parent)Sole constructor for this class.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidclose()Optional method for specifying an on-closed action.protected org.eclipse.ui.forms.widgets.FormcreateForm()Creates a form widget in thegetContentPane().protected org.eclipse.swt.widgets.CompositecreateSection(java.lang.String title, java.lang.String description, int gridStyle)Creates a new subsection inside the current page.protected org.eclipse.swt.widgets.CompositecreateSection(java.lang.String title, java.lang.String description, int style, int gridStyle)Creates a new subsection inside the current page.voiddispose()protected booleandoSave()Is called by the parent to perform save operations if needed.org.eclipse.swt.widgets.CompositegetContentPane()Returns the content pane of this editor page.protected ProductLineProjectgetProductLineProject()Returns theProductLineProjectcurrently edited by this editor.protected org.eclipse.ui.forms.widgets.FormToolkitgetToolkit()Returns the toolkit for creating new widgets.protected abstract voidpageActivated()This method will be called, when this editor page becomes active.voidpageChanged(org.eclipse.jface.dialogs.PageChangedEvent event)voidregister(IEASyPageListener listener)Registers a newIEASyPageListenerwhich will be informed when this page becomes dirty.voidsetDirty()Informs allIEASyPageListenerthat this page became dirty.booleansetFocus()-
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setLayout, setLayoutDeferred, setTabList
-
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
-
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
-
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.ssehub.easy.producer.ui.productline_editor.IEASyEditorPage
getDisplay, getPageText, isDisposed, refresh
-
-
-
-
Field Detail
-
plp
private ProductLineProject plp
-
toolkit
private org.eclipse.ui.forms.widgets.FormToolkit toolkit
-
contentPane
private org.eclipse.ui.forms.widgets.ScrolledForm contentPane
-
pageListeners
private java.util.List<IEASyPageListener> pageListeners
-
-
Constructor Detail
-
AbstractEASyEditorPage
public AbstractEASyEditorPage(ProductLineProject plp, java.lang.String title, org.eclipse.swt.widgets.Composite parent)
Sole constructor for this class.- Parameters:
plp- TheProductLineProjectedited in this editor page.title- The title for this editor page.parent- The parent, holding this editor page.
-
-
Method Detail
-
setFocus
public boolean setFocus()
- Overrides:
setFocusin classorg.eclipse.swt.widgets.Composite
-
getProductLineProject
protected final ProductLineProject getProductLineProject()
Returns theProductLineProjectcurrently edited by this editor.- Returns:
- The
ProductLineProjectedited in the current editor.
-
getContentPane
public final org.eclipse.swt.widgets.Composite getContentPane()
Returns the content pane of this editor page.- Specified by:
getContentPanein interfaceIEASyEditorPage- Returns:
- The content pane of this editor page
-
pageActivated
protected abstract void pageActivated()
This method will be called, when this editor page becomes active.
-
pageChanged
public final void pageChanged(org.eclipse.jface.dialogs.PageChangedEvent event)
- Specified by:
pageChangedin interfaceorg.eclipse.jface.dialogs.IPageChangedListener
-
setDirty
public final void setDirty()
Informs allIEASyPageListenerthat this page became dirty.- Specified by:
setDirtyin interfaceIEASyEditorPage
-
register
public void register(IEASyPageListener listener)
Registers a newIEASyPageListenerwhich will be informed when this page becomes dirty.- Parameters:
listener- AIEASyPageListenerwhich will be informed when this page becomes dirty.
-
dispose
public void dispose()
- Overrides:
disposein classorg.eclipse.swt.widgets.Widget
-
close
public abstract void close()
Optional method for specifying an on-closed action.
-
createForm
protected org.eclipse.ui.forms.widgets.Form createForm()
Creates a form widget in thegetContentPane(). Note that this widget does not scroll its content, so make sure there is a scrolled composite up the parent chain. If you require scrolling, use 'createScrolledForm' instead.- Returns:
- the form that does not scroll
-
getToolkit
protected org.eclipse.ui.forms.widgets.FormToolkit getToolkit()
Returns the toolkit for creating new widgets.- Returns:
- Toolkit for creating new widgets
-
createSection
protected org.eclipse.swt.widgets.Composite createSection(java.lang.String title, java.lang.String description, int gridStyle)Creates a new subsection inside the current page. This subsection has its own heading and can be (un-)folded.- Parameters:
title- The title of the sectiondescription- The description of the section (will be shown directly under the title)gridStyle- A GridData constants for configuring the behavior of the section. Usually, GridData.FILL_HORIZONTAL should be appropriate.- Returns:
- A new composite where new elements can be added to.
The newly created composite must be configured with a
GridLayoutotherwise nested elements will not be displayed. - See Also:
createSection(String, String, int, int)
-
createSection
protected org.eclipse.swt.widgets.Composite createSection(java.lang.String title, java.lang.String description, int style, int gridStyle)Creates a new subsection inside the current page. This subsection has its own heading and can be (un-)folded.- Parameters:
title- The title of the sectiondescription- The description of the section (will be shown directly under the title)style- the section style (use SWT constants).gridStyle- A GridData constants for configuring the behavior of the section. Usually, GridData.FILL_HORIZONTAL should be appropriate.- Returns:
- A new composite where new elements can be added to.
The newly created composite must be configured with a
GridLayoutotherwise nested elements will not be displayed. - See Also:
createSection(String, String, int)
-
doSave
protected boolean doSave()
Is called by the parent to perform save operations if needed.- Returns:
trueif save was needed and performed,falseelse
-
-