at.spardat.xma.page
Class NotebookPage

java.lang.Object
  extended byat.spardat.xma.page.Page
      extended byat.spardat.xma.page.PageClient
          extended byat.spardat.xma.page.NotebookPage
All Implemented Interfaces:
Descriptive, IEmbeddable, at.spardat.xma.boot.component.IXMAControl, Synchronization, Transactional

public abstract class NotebookPage
extends PageClient

Base class of all Pages shown as a folder inside a Notebook.


Field Summary
 
Fields inherited from class at.spardat.xma.page.PageClient
composite
 
Constructor Summary
NotebookPage(Notebook notebook, boolean stateless)
          Initializes the NotebookPage inside the given Notebook.
 
Method Summary
protected  boolean close()
          This method will be called every time the NotebookPage is tried to be closed by clicking on the TabFolder and switching to another NotebookPage.
 org.eclipse.swt.widgets.Composite createComposite(org.eclipse.swt.widgets.Composite parentComp)
          Creates the SWT-Composite of the NotebookPage.
protected  org.eclipse.swt.widgets.TabItem createTabItem(org.eclipse.swt.widgets.TabFolder tabfolderW, int index)
          Creates the coresponding TabItem
 org.eclipse.swt.widgets.Composite getComposite()
          Get the SWT-Composite of the NotebookPage.
 Notebook getNotebook()
          Gets the Notebook containing this NotebookPage.
 org.eclipse.swt.widgets.TabItem getTabItem()
          Get the TabItem corresponding to this NotebookPage
 void initGUI()
          Creates the Composite and Widgets of the NotebookPage by calling PageClient.createWidgets().
 
Methods inherited from class at.spardat.xma.page.PageClient
activatePage, addChild, attachUI, attachUIImpl, clearError, clearValidationErrorImpl, clientEvent, clientEventBase, createModels, createWidgets, detachUI, determineState, determineStateBase, enter, enterBase, getComponent, getContextString, getCurrentEvent, getDialog, getDialogPage, getExtend, getHelpUri, getHelpUriBase, getParent, getWidgets, hasModels, hasValidationError, helpEvent, insertLangInFilename, isEventsEnabled, isNew, isUIAttached, launch, launchExtern, launchRelative, leave, leaveBase, newRemoteCall, removeChild, removeModel, removeWidgetModels, removeWidgets, removeWidgetsBase, rpcFinished, serverEvent, setContextString, setDialog, setEditable, setError, setEventsEnabled, setExtend, setId, setNew, setValidationErrorImpl, showException, showMessage, stateChanged, stateChangedBase, stateChangedBaseImpl, stateChangedExtend, toLocalizedHelpUri
 
Methods inherited from class at.spardat.xma.page.Page
changed, commit, describe, display, equalsCS, externalize, getId, getNumWModels, getTypeId, getWModel, getWModels, internalize, isAtServer, isStateless, randomlyChange, rollback, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NotebookPage

public NotebookPage(Notebook notebook,
                    boolean stateless)
Initializes the NotebookPage inside the given Notebook.

Parameters:
notebook - the Notebook containing this NotebookPage.
Method Detail

getNotebook

public Notebook getNotebook()
Gets the Notebook containing this NotebookPage.

Returns:
the Notebook containing this NotebookPage.

getComposite

public org.eclipse.swt.widgets.Composite getComposite()
Get the SWT-Composite of the NotebookPage. All SWT-Widgets of this NotebookPage are children of this Composite (directly or indirectly).

Specified by:
getComposite in interface at.spardat.xma.boot.component.IXMAControl
Overrides:
getComposite in class PageClient
Returns:
the SWT-Composite corresponding to this PageClient

createComposite

public org.eclipse.swt.widgets.Composite createComposite(org.eclipse.swt.widgets.Composite parentComp)
Creates the SWT-Composite of the NotebookPage. All SWT-Widgets of this PageClient will be children of this Composite (directly or indirectly).

Parameters:
parentComp - the SWT-Composite to use as parent of the created SWT-Composite.
Returns:
the newly created SWT-Composite corresponding to this NotebookPage

initGUI

public void initGUI()
Creates the Composite and Widgets of the NotebookPage by calling PageClient.createWidgets().

Specified by:
initGUI in interface at.spardat.xma.boot.component.IXMAControl
Overrides:
initGUI in class PageClient

createTabItem

protected org.eclipse.swt.widgets.TabItem createTabItem(org.eclipse.swt.widgets.TabFolder tabfolderW,
                                                        int index)
Creates the coresponding TabItem

Parameters:
tabfolderW - the parent of the TabItem
index - the position where to add the TabItem to its TabFolder

getTabItem

public org.eclipse.swt.widgets.TabItem getTabItem()
Get the TabItem corresponding to this NotebookPage

Returns:
the TabItem corresponding to this NotebookPage

close

protected boolean close()
This method will be called every time the NotebookPage is tried to be closed by clicking on the TabFolder and switching to another NotebookPage. It is intended to be implemented by the application programmer if he wants to react on this event. The application programmer my decide if the NotebookPage will actually be closed and another NotebookPage will be entered. If this method returns false then nether this NotebookPage's leave() nor another NotebookPage's enter() is called. This method is not called if NotebookPages are changed programmatically. As the SWT TabFolder cannot be disabled the clicked 'new' NotebookPage will be shown for an instant, afterwards the TabFolder switches back. Normally the briefly shown clicked NotebookPage is not recognizable for an user. But if some time consuming actions are done in this method (RPC, message box) then this is done before the background of the clicked NotebookPage.

Returns:
true (default) - means it is ok to close the NotebookPage (switch to another one) false - means do not close the NotebookPage