|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.spardat.xma.page.Page
at.spardat.xma.page.PageClient
Base class of all client side pages. A PageClient contains Widgets and Models.
| Field Summary | |
protected org.eclipse.swt.widgets.Composite |
composite
The SWT-Composite corresponding to this PageClient. |
| Constructor Summary | |
PageClient(ComponentClient component,
boolean stateless)
Constructor of the PageClient. |
|
PageClient(PageClient parent,
boolean stateless)
Constructor of the PageClient. |
|
| Method Summary | |
void |
activatePage()
Brings the window representing this page to the foreground. |
protected void |
addChild(at.spardat.xma.boot.component.IXMAControl child)
Adds a Subpage to this PageClient. |
void |
attachUI()
Responsible for attaching a UI to all WidgetModels of this page. |
abstract void |
attachUIImpl()
Must be implemented by subclass. |
void |
clearError(org.eclipse.swt.widgets.Widget widget)
Removes the error for the given widget. |
void |
clearValidationErrorImpl(org.eclipse.swt.widgets.Widget widget)
Removes a validation error for a particular widget model. |
protected void |
clientEvent(org.eclipse.swt.events.SelectionEvent event,
int type)
Calls the clientevent configured for the widget of the event. |
protected void |
clientEventBase(org.eclipse.swt.events.SelectionEvent event,
int type)
Calls the clientevent configured for the widget of the event by calling clientEvent(SelectionEvent,int). |
protected abstract void |
createModels()
This Method will be implemented in the generated Class for each PageClient, to create the WidgetModels. |
protected abstract void |
createWidgets()
This Method will be implemented in the generated Class for each PageClient, to create and initialize all SWT-Widgets of the PageClient. |
void |
detachUI()
Detaches the UI-page from this Page. |
void |
determineState()
This method is called every time the content of any WizardModel of the Page may have been changed. |
void |
determineStateBase()
Calls determineState() on the PageClient and all subpages |
protected void |
enter()
This method will be called every time the PageClient becomes visible. |
void |
enterBase()
Notify the PageClient and all Subpages, that the PageClient is becoming visible by calling enter() on the PageClient and all Subpages. |
ComponentClient |
getComponent()
Returns the Component this belongs to. |
org.eclipse.swt.widgets.Composite |
getComposite()
Get the SWT-Composite of the PageClient. |
java.lang.String |
getContextString()
|
org.eclipse.swt.events.TypedEvent |
getCurrentEvent()
Get the current SWT-Event. |
at.spardat.xma.boot.component.IDialog |
getDialog()
Get the DialogPage of the PageClient. |
IDialogPage |
getDialogPage()
Get the DialogPage of the PageClient. |
IPageExtender |
getExtend()
Gets the extention object of the page. |
java.lang.String |
getHelpUri()
Gets the URI to the help page explaining this page. |
java.lang.String |
getHelpUriBase()
Gets the URI to the help page explaining this page. |
PageClient |
getParent()
Get the Parent of the PageClient, if any. |
abstract org.eclipse.swt.widgets.Control[] |
getWidgets()
Returns an array of all Widgets of this page. |
abstract boolean |
hasModels()
This Method will be implemented in the generated Class for each PageClient, to indicate if the WidgetModels are allready created. |
boolean |
hasValidationError(org.eclipse.swt.widgets.Widget widget)
Determines if a validation error currently exists for a given widget. |
void |
helpEvent()
Shows the help-uri of the page in a browser window. |
void |
initGUI()
Creates the Widgets of the PageClient and all Subpages by calling createWidgets() on the PageClient and all Subpages. |
static java.lang.String |
insertLangInFilename(java.lang.String uri,
java.util.Locale locale)
Places the language code of the given locale into the file-part of the given uri just before the extention. |
boolean |
isEventsEnabled()
Determine if this page currently responds to UI-Events |
boolean |
isNew()
Yields true if this Page has been created since the last server side event. |
boolean |
isUIAttached()
Yields true, if every WidgetModel in this page has a UI attached. |
void |
launch(EmbeddableComponent comp)
Calls a modal component. |
java.util.Properties |
launchExtern(java.lang.String componentUri,
java.util.Properties input)
Calls a modal component of an other application. |
java.util.Properties |
launchRelative(java.lang.String componentName,
java.util.Properties input)
Calls a modal component of the same application. |
protected void |
leave()
This method will be called every time the PageClient becomes invisible. |
void |
leaveBase()
Notify the PageClient and all Subpages, that the PageClient no longer is visible by calling leave() on all Subpages and the PageClient. |
RemoteCallClient |
newRemoteCall(java.lang.String namEvent)
Constructs a RemoteCall object to execute a
server side method with the provided name. |
protected void |
removeChild(at.spardat.xma.boot.component.IXMAControl child)
Removes a Subpage of this PageClient. |
void |
removeModel()
Notify the PageClient and all Subpages, to remove alle WidgetModles by calling removeWidgetModels() on all Subpages and the PageClient. |
protected abstract void |
removeWidgetModels()
This Method will be implemented in the generated Class for each PageClient, to remove alle WidgetModels. |
protected abstract void |
removeWidgets()
This Method will be implemented in the generated Class for each PageClient, to remove all Widgets after the Widgets have been disposed. |
void |
removeWidgetsBase()
Notify the PageClient and all Subpages, that the Widgets are disposed by calling removeWidgets() on all Subpages and the PageClient. |
void |
rpcFinished(RemoteCallClient rc,
RemoteReply reply)
Is called at the end of RemoteCallClient.execute(). |
void |
serverEvent(java.lang.String event)
Calls the named eventMethod on the Server. |
void |
setContextString(java.lang.String text)
Sets the context String and notifies the containing AppShell or dialog if there exists one. |
void |
setDialog(at.spardat.xma.boot.component.IDialog dialog)
Sets the containing dialog of the PageClient. |
void |
setEditable(boolean what)
Sets the editable-state of all model's widgets. |
void |
setError(ValidationErrorClient error)
Sets an error for the given widget. |
void |
setEventsEnabled(boolean enabled)
Enables/disables GUI-events on the page and all its subpages. |
void |
setExtend(IPageExtender extend)
Sets an extention object, which can add behavior to the page. |
void |
setId(short id)
Assigns an id to this Page. |
void |
setNew(boolean what)
Sets the new state. |
void |
setValidationErrorImpl(ValidationErrorClient error)
Sets a validation error for a particular widget model. |
void |
showException(java.lang.Exception exc)
Shows an Exception in a MessageBox. |
int |
showMessage(at.spardat.enterprise.exc.INotification notification)
Displays the provided notification in a modal message box. |
void |
stateChanged()
This method is called every time the content of any WizardModel of the Page may have been changed. |
void |
stateChangedBase()
Notify the PageClient and all Subpages of a possible Change in the PageModels by calling determineState() and stateChanged() on the PageClient
and all Subpages. |
void |
stateChangedBaseImpl()
Calls stateChanged() on the PageClient and all subpages |
void |
stateChangedExtend()
Calls IPageExtender.stateChanged() on the IPageExtender of the PageClient and all subpages |
java.lang.String |
toLocalizedHelpUri(java.lang.String helpUri,
java.util.Locale locale)
Overwrite this method to convert the given helpUri to the uri of the tranlation of the help page to the language given in the locale. |
| 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 |
createComposite |
| Field Detail |
protected org.eclipse.swt.widgets.Composite composite
| Constructor Detail |
public PageClient(ComponentClient component,
boolean stateless)
component - the component containing this page.stateless - indicating if this page is stateless on the server.
public PageClient(PageClient parent,
boolean stateless)
parent - the parentpage of this page. parent must not be null.stateless - indicating if this page is stateless on the server.| Method Detail |
protected void addChild(at.spardat.xma.boot.component.IXMAControl child)
child - the IXMAControl to add.protected void removeChild(at.spardat.xma.boot.component.IXMAControl child)
child - the IXMAControl to remove.public org.eclipse.swt.widgets.Composite getComposite()
getComposite in interface at.spardat.xma.boot.component.IXMAControlpublic PageClient getParent()
public void setDialog(at.spardat.xma.boot.component.IDialog dialog)
setDialog in interface IEmbeddabledialog - public at.spardat.xma.boot.component.IDialog getDialog()
getDialog in interface IEmbeddablepublic IDialogPage getDialogPage()
public abstract org.eclipse.swt.widgets.Control[] getWidgets()
public void initGUI()
createWidgets() on the PageClient and all Subpages.
initGUI in interface at.spardat.xma.boot.component.IXMAControlprotected abstract void createModels()
public abstract boolean hasModels()
protected abstract void createWidgets()
public void enterBase()
enter() on the PageClient and all Subpages.
enterBase in interface at.spardat.xma.boot.component.IXMAControlprotected void enter()
public void leaveBase()
leave() on all Subpages and the PageClient.
leaveBase in interface at.spardat.xma.boot.component.IXMAControlprotected void leave()
public void removeModel()
removeWidgetModels() on all Subpages and the PageClient.
removeModel in interface at.spardat.xma.boot.component.IXMAControlprotected abstract void removeWidgetModels()
public void removeWidgetsBase()
removeWidgets() on all Subpages and the PageClient.
removeWidgetsBase in interface at.spardat.xma.boot.component.IXMAControlprotected abstract void removeWidgets()
public void stateChangedBase()
determineState() and stateChanged() on the PageClient
and all Subpages.
stateChangedBase in interface at.spardat.xma.boot.component.IXMAControlpublic void determineStateBase()
determineState() on the PageClient and all subpages
determineStateBase in interface IEmbeddablepublic void determineState()
stateChanged().
This method is called imidiatly befor stateChanged().
public void stateChangedExtend()
IPageExtender.stateChanged() on the IPageExtender of the PageClient and all subpages
stateChangedExtend in interface IEmbeddablepublic void stateChangedBaseImpl()
stateChanged() on the PageClient and all subpages
stateChangedBaseImpl in interface IEmbeddablepublic void stateChanged()
determineState().
public void setEventsEnabled(boolean enabled)
setEventsEnabled in interface IEmbeddableenabled - public boolean isEventsEnabled()
public void showException(java.lang.Exception exc)
exc - the catched Exceptionpublic int showMessage(at.spardat.enterprise.exc.INotification notification)
public void helpEvent()
public java.lang.String getHelpUriBase()
public java.lang.String getHelpUri()
public java.lang.String toLocalizedHelpUri(java.lang.String helpUri,
java.util.Locale locale)
helpUri - as returned by getHelpUri()locale - the locale from the XMAContext
public static java.lang.String insertLangInFilename(java.lang.String uri,
java.util.Locale locale)
protected void clientEventBase(org.eclipse.swt.events.SelectionEvent event,
int type)
clientEvent(SelectionEvent,int).
event - the SWT-Event that happened.type - the type of the Event, as defined by the event type constants in class SWT.
protected void clientEvent(org.eclipse.swt.events.SelectionEvent event,
int type)
event - the SWT-Event that happened.type - the type of the Event, as defined by the event type constants in class SWT.public void serverEvent(java.lang.String event)
event - a String identifieing the event.public boolean isUIAttached()
public ComponentClient getComponent()
public void attachUI()
throws AttachmentExceptionClient
AttachementException - if some of the WidgetModels could
not be attached. In this case, all successfully attached
widgets are detached and !isUIAttached holds
after this method returns.
java.lang.IllegalStateException - if already attached.
AttachmentExceptionClient
public abstract void attachUIImpl()
throws AttachmentExceptionClient
AttachmentExceptionClientpublic void detachUI()
public void clearError(org.eclipse.swt.widgets.Widget widget)
widget - the widget where to clear the error state.public void setError(ValidationErrorClient error)
public void clearValidationErrorImpl(org.eclipse.swt.widgets.Widget widget)
widget - the widget where to clear the error state.public void setValidationErrorImpl(ValidationErrorClient error)
error - indicates the errorpublic boolean hasValidationError(org.eclipse.swt.widgets.Widget widget)
widget - to search for validation errors
public boolean isNew()
public void setNew(boolean what)
what - true if this should be marked as new.public void setId(short id)
setId in class Pageid - the assigned id for this Pagepublic RemoteCallClient newRemoteCall(java.lang.String namEvent)
RemoteCall object to execute a
server side method with the provided name. The corresponding server side Page
class must have a method with the signature
void <namEvent> (RemoteCall call, RemoteReply reply)This method will be called if you call execute on the RemoteCall object returned by this.
namEvent - the name of the server side method to call
public void setEditable(boolean what)
what - the value to set.
public java.util.Properties launchRelative(java.lang.String componentName,
java.util.Properties input)
IAppShell,
the called component is pushed on the client area of the IAppShell.
In all other cases, the component is called as a dialog.
componentName - name of the component within the applicationinput - input properties for the component
public java.util.Properties launchExtern(java.lang.String componentUri,
java.util.Properties input)
IAppShell,
the called component is pushed on the client area of the IAppShell.
In all other cases, the component is called as a dialog.
componentUri - absolute URI of the componentinput - input properties for the component
public void launch(EmbeddableComponent comp)
IAppShell,
the called component is pushed on the client area of the IAppShell.
In all other cases, the component is called as a dialog.
comp - the component to call.public void setExtend(IPageExtender extend)
public IPageExtender getExtend()
public java.lang.String getContextString()
getContextString in interface IEmbeddablepublic void setContextString(java.lang.String text)
text - the new contextStringpublic void activatePage()
public void rpcFinished(RemoteCallClient rc,
RemoteReply reply)
rc - the RemoteCallClient whose execute method is about to endreply - the RemoteReply object that execute will returnpublic final org.eclipse.swt.events.TypedEvent getCurrentEvent()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||