at.spardat.xma.component
Class EmbeddableComponent

java.lang.Object
  extended byat.spardat.xma.component.Component
      extended byat.spardat.xma.component.ComponentClient
          extended byat.spardat.xma.component.EmbeddableComponent
All Implemented Interfaces:
Descriptive, at.spardat.xma.boot.component.IComponent, IComponentClient, IEmbeddable, at.spardat.xma.boot.component.IXMAControl, Synchronization

public abstract class EmbeddableComponent
extends ComponentClient
implements IEmbeddable

This class servers a base class for client side components, which can be embedded into a client side page. To be embeddable the component must define a main page via setMainPage(PageClient) which will be shown in place inside another page.


Field Summary
 
Fields inherited from class at.spardat.xma.component.ComponentClient
errorBackground, errorBackgroundUneditable, lastResGif, resErrorGif, resInfoGif, resWarnGif
 
Fields inherited from class at.spardat.xma.component.Component
session_
 
Constructor Summary
EmbeddableComponent(XMASessionClient session, boolean isStateless)
          Constructor of the Component.
 
Method Summary
 org.eclipse.swt.widgets.Composite createComposite(org.eclipse.swt.widgets.Composite parent)
           
 void determineStateBase()
          Delegates the call of PageClient.determineStateBase() to the main page.
 void enterBase()
           
 org.eclipse.swt.widgets.Composite getComposite()
           
 java.lang.String getContextString()
           
 at.spardat.xma.boot.component.IDialog getDialog()
          Gets the containing dialog of the PageClient.
 PageClient getMainPage()
          Gets the page which will be shown by the component.
 void initGUI()
           
 void leaveBase()
           
 void removeModel()
          Remove the embedded Component and all its PageModels.
 void removeWidgetsBase()
           
 void setDialog(at.spardat.xma.boot.component.IDialog dialog)
          Sets the containing dialog of the PageClient.
 void setEventsEnabled(boolean enabled)
          Enables/disables GUI-events on the mainpage and all its subpages.
 void setMainPage(PageClient page)
          Sets the page which will be shown by the component.
 void stateChangedBase()
           
 void stateChangedBaseImpl()
          Delegates the call of PageClient.stateChangedBaseImpl() to the main page.
 void stateChangedExtend()
          Delegates the call of PageClient.stateChangedExtend() to the main page.
 
Methods inherited from class at.spardat.xma.component.ComponentClient
addEventListener, addPropertyChangeListener, createTask, dispose, externalize, freePageModel, getColor, getColor, getContext, getDisplay, getFont, getFontByHeight, getFontByStyle, getHelpUri, getImage, getImage, getProperties, getProperty, getRTSession, getSession, internalize, invoke, isOutOfSyncWithServer, newRemoteCall, notifyClosed, notifyEvent, notifyPropertyChange, registerImage, removeEventListener, removePropertyChangeListener, rpcFinished, setOutOfSyncWithServer, setProperties, setProperty, showMessage
 
Methods inherited from class at.spardat.xma.component.Component
commit, describe, externalizePageSet, externalizeProperties, getId, getModelClass, getName, getNumPageModels, getPageModel, getPageModels, getPropDes, getPropDes, getSCN, incrementSCN, internalizePageSet, internalizeProperties, isPageModelAlive, isStateless, model2props, props2model, registerPageModel, removePageModel, rollback, setId, setSCN, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EmbeddableComponent

public EmbeddableComponent(XMASessionClient session,
                           boolean isStateless)
Constructor of the Component. Creates the Display if necessary. Registers this component with the session.

Parameters:
session - the XMASession this component belongs to
isStateless - defines whether this component is stateless or not.
Method Detail

setMainPage

public void setMainPage(PageClient page)
Sets the page which will be shown by the component.

Parameters:
page - the page to show by the component.

getMainPage

public PageClient getMainPage()
Gets the page which will be shown by the component.

Returns:
the page shown by the component.

setDialog

public void setDialog(at.spardat.xma.boot.component.IDialog dialog)
Description copied from interface: IEmbeddable
Sets the containing dialog of the PageClient.

Specified by:
setDialog in interface IEmbeddable
Parameters:
dialog -

getDialog

public at.spardat.xma.boot.component.IDialog getDialog()
Description copied from interface: IEmbeddable
Gets the containing dialog of the PageClient.

Specified by:
getDialog in interface IEmbeddable

createComposite

public org.eclipse.swt.widgets.Composite createComposite(org.eclipse.swt.widgets.Composite parent)
Specified by:
createComposite in interface at.spardat.xma.boot.component.IXMAControl

getComposite

public org.eclipse.swt.widgets.Composite getComposite()
Specified by:
getComposite in interface at.spardat.xma.boot.component.IXMAControl

initGUI

public void initGUI()
Specified by:
initGUI in interface at.spardat.xma.boot.component.IXMAControl

enterBase

public void enterBase()
Specified by:
enterBase in interface at.spardat.xma.boot.component.IXMAControl

stateChangedBase

public void stateChangedBase()
Specified by:
stateChangedBase in interface at.spardat.xma.boot.component.IXMAControl

determineStateBase

public void determineStateBase()
Delegates the call of PageClient.determineStateBase() to the main page.

Specified by:
determineStateBase in interface IEmbeddable

stateChangedExtend

public void stateChangedExtend()
Delegates the call of PageClient.stateChangedExtend() to the main page.

Specified by:
stateChangedExtend in interface IEmbeddable

stateChangedBaseImpl

public void stateChangedBaseImpl()
Delegates the call of PageClient.stateChangedBaseImpl() to the main page.

Specified by:
stateChangedBaseImpl in interface IEmbeddable

leaveBase

public void leaveBase()
Specified by:
leaveBase in interface at.spardat.xma.boot.component.IXMAControl

removeWidgetsBase

public void removeWidgetsBase()
Specified by:
removeWidgetsBase in interface at.spardat.xma.boot.component.IXMAControl

removeModel

public void removeModel()
Remove the embedded Component and all its PageModels. This causes the corresponding server side models to be freed when the next serverEvent occurs. It calls PageClient.removeWidgetModels() on the main page and all subpages. The embedded Component will be disposed.

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

getContextString

public java.lang.String getContextString()
Specified by:
getContextString in interface IEmbeddable
Returns:
the string to show as context in the enclosing AppShell or dialog.

setEventsEnabled

public void setEventsEnabled(boolean enabled)
Enables/disables GUI-events on the mainpage and all its subpages.

Specified by:
setEventsEnabled in interface IEmbeddable
Parameters:
enabled -