at.spardat.xma.page
Class Assistent

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

public abstract class Assistent
extends DialogPage

This class is the base class of all assistents (wizards) in XMA. This class is not fully implemented yet.


Field Summary
protected  org.eclipse.swt.widgets.Button butCancel
           
protected  org.eclipse.swt.widgets.Button butNext
           
protected  org.eclipse.swt.widgets.Button butOK
           
protected  org.eclipse.swt.widgets.Button butPrevious
          Buttons of the Assistent.
 
Fields inherited from class at.spardat.xma.page.DialogPage
statusBar, statusBarComposite
 
Fields inherited from class at.spardat.xma.page.PageClient
composite
 
Constructor Summary
Assistent(ComponentClient component, boolean stateless, int style)
          Initializes an Assistent inside a given Component.
Assistent(PageClient parent, boolean stateless, int style)
          Initializes an Assistent inside the same Component as the parent PageClient.
 
Method Summary
 void addPage(AssistentPage page)
          Adds an AssistentPage to the existing AssistentPages of this Assistent.
 void addPage(int index, AssistentPage page)
          Adds an AssistentPage to the existing AssistentPages at the given index.
protected  void buttonCancelEvent()
          Eventhandler called every time the Cancel-Button is pressed.
 void buttonNextEvent()
          Eventhandler called every time the Next-Button is pressed.
 void buttonPrevEvent()
          Eventhandler called every time the Prev-Button is pressed.
protected  void buttonSaveEvent()
          Eventhandler called every time the Save-Button is pressed.
 void enterBase()
          Notify the Assistent and the active AssistentPage, that the Page is becoming visible by calling PageClient.enter() on the Assistent and the active AssistentPage.
 AssistentPage getActivePage()
          Gets the active AssistentPage.
 org.eclipse.swt.widgets.Button getCancelButton()
           
 org.eclipse.swt.widgets.Button getNextButton()
           
 org.eclipse.swt.widgets.Button getOKButton()
           
 AssistentPage getPage(int index)
          Gets the AssistentPage with the given index
 org.eclipse.swt.widgets.Button getPrevButton()
           
 void initGUI()
          Creates the Widgets of the Assistent and the active AssistentPage by calling PageClient.createWidgets() on the Assistent and the active AssistentPage.
 void leaveBase()
          Notify the Assistent and the active AssistentPage, that the Page no longer is visible by calling PageClient.leave()on the active AssistentPage and the Assistent.
 void removeModel()
          Removes the WidgetModels of all AssistentPage by calling PageClient.removeWidgetModels() on all AssistentPages.
 void setActivePage(int index)
          Activates the AssistentPage with the given index.
 void stateChangedBase()
          Notify the Assistent and the active AssistentPage of a possible Change in the PageModels by calling PageClient.stateChanged() on the Assistent and the active AssistentPage.
 
Methods inherited from class at.spardat.xma.page.DialogPage
clearError, clearInfo, clearValidationErrorImpl, clearWarning, close, closeCancel, closeOK, createComposite, getDialog, getErrorCount, getExitstatus, getFocusControl, getShell, hasValidationError, invoke, isVisible, overrideErrorsFromModel, removeWidgetsBase, setError, setFocus, setFocusControl, setInfo, setRerunStateChanched, setValidationErrorImpl, setWarning, updateErrorStatus
 
Methods inherited from class at.spardat.xma.page.PageClient
activatePage, addChild, attachUI, attachUIImpl, clientEvent, clientEventBase, createModels, createWidgets, detachUI, determineState, determineStateBase, enter, getComponent, getComposite, getContextString, getCurrentEvent, getDialogPage, getExtend, getHelpUri, getHelpUriBase, getParent, getWidgets, hasModels, helpEvent, insertLangInFilename, isEventsEnabled, isNew, isUIAttached, launch, launchExtern, launchRelative, leave, newRemoteCall, removeChild, removeWidgetModels, removeWidgets, rpcFinished, serverEvent, setContextString, setDialog, setEditable, setError, setEventsEnabled, setExtend, setId, setNew, setValidationErrorImpl, showException, showMessage, stateChanged, 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
 
Methods inherited from interface at.spardat.xma.boot.component.IXMAControl
getComposite
 
Methods inherited from interface at.spardat.xma.page.IEmbeddable
determineStateBase, getContextString, setDialog, setEventsEnabled, stateChangedBaseImpl, stateChangedExtend
 

Field Detail

butPrevious

protected org.eclipse.swt.widgets.Button butPrevious
Buttons of the Assistent. They must be instantiated and positioned by the generated Class for each Assistent.


butNext

protected org.eclipse.swt.widgets.Button butNext

butOK

protected org.eclipse.swt.widgets.Button butOK

butCancel

protected org.eclipse.swt.widgets.Button butCancel
Constructor Detail

Assistent

public Assistent(ComponentClient component,
                 boolean stateless,
                 int style)
Initializes an Assistent inside a given Component. Creates the Shell for the Assistent.

Parameters:
component - the Component containing the Assistent.
style - The SWT-Style for the Shell of the Assistent.
Throws:
java.lang.IllegalArgumentException - if comonent is null.

Assistent

public Assistent(PageClient parent,
                 boolean stateless,
                 int style)
Initializes an Assistent inside the same Component as the parent PageClient. Creates the Shell for the Assistent.

Parameters:
parent - the PageClient calling this Assistent.
style - The SWT-Style for the Shell of the Assistent.
Method Detail

getPage

public AssistentPage getPage(int index)
Gets the AssistentPage with the given index

Parameters:
index - the index of the desired AssistentPage.
Returns:
the AssistentPage with the given index.
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of range.

addPage

public void addPage(AssistentPage page)
Adds an AssistentPage to the existing AssistentPages of this Assistent. The new AssistentPage is appended at the end of the list.

Parameters:
page - the AssistentPage to add.

addPage

public void addPage(int index,
                    AssistentPage page)
Adds an AssistentPage to the existing AssistentPages at the given index. The new AssistentPage is insertet at the given index position.

Parameters:
index - the index at which the new AssistentPage is to be inserted.
page - the AssistentPage to add.

setActivePage

public void setActivePage(int index)
Activates the AssistentPage with the given index. The new active PageClient will become visible inside the Assistend.

Parameters:
index - the index of the AssistentPage to activate.
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of range.

getActivePage

public AssistentPage getActivePage()
Gets the active AssistentPage. The active AssistenPage is the AssistentPage that is visible inside the Assistent.

Returns:
the currently active AssistentPage.

getPrevButton

public org.eclipse.swt.widgets.Button getPrevButton()

getNextButton

public org.eclipse.swt.widgets.Button getNextButton()

getOKButton

public org.eclipse.swt.widgets.Button getOKButton()

getCancelButton

public org.eclipse.swt.widgets.Button getCancelButton()

initGUI

public void initGUI()
Creates the Widgets of the Assistent and the active AssistentPage by calling PageClient.createWidgets() on the Assistent and the active AssistentPage.

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

enterBase

public void enterBase()
Notify the Assistent and the active AssistentPage, that the Page is becoming visible by calling PageClient.enter() on the Assistent and the active AssistentPage.

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

stateChangedBase

public void stateChangedBase()
Notify the Assistent and the active AssistentPage of a possible Change in the PageModels by calling PageClient.stateChanged() on the Assistent and the active AssistentPage.

Specified by:
stateChangedBase in interface at.spardat.xma.boot.component.IXMAControl
Overrides:
stateChangedBase in class DialogPage

leaveBase

public void leaveBase()
Notify the Assistent and the active AssistentPage, that the Page no longer is visible by calling PageClient.leave()on the active AssistentPage and the Assistent.

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

removeModel

public void removeModel()
Removes the WidgetModels of all AssistentPage by calling PageClient.removeWidgetModels() on all AssistentPages.

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

buttonCancelEvent

protected void buttonCancelEvent()
Eventhandler called every time the Cancel-Button is pressed. This Method is intendet to by implemented by the application programmer. This default implementation simply closes the Shell.


buttonSaveEvent

protected void buttonSaveEvent()
Eventhandler called every time the Save-Button is pressed. This Method is intendet to by implemented by the application programmer. This default implementation simply closes the Shell.


buttonNextEvent

public void buttonNextEvent()
Eventhandler called every time the Next-Button is pressed. Deactivates the currently active AssistentPage and activates the next AssistentPage. The next AssistentPage can be coosen by the currently active AssistentPage by implementing AssistentPage.getNextPage(). If this Method is not implentet the next AssistentPage in the internal List of the Assistent is coosen.


buttonPrevEvent

public void buttonPrevEvent()
Eventhandler called every time the Prev-Button is pressed. Deactivates the currently active AssistentPage and activates the previous AssistentPage. The previous AssistentPage can be coosen by the currently active AssistentPage by implementing AssistentPage.getPrevPage(). If this Method is not implented the preceding AssistentPage in the internal List of the Assistent is coosen.