at.spardat.xma.appshell
Interface IAppShell

All Superinterfaces:
at.spardat.xma.boot.component.IDialog, IDialogPage, IEmbeddable, at.spardat.xma.boot.component.IXMAControl
All Known Implementing Classes:
AppShell

public interface IAppShell
extends IDialogPage

Interface for AppShell. An application shell is the window opened at startup of the client side application. It stays open during the whole user session. It typically contains a header area showing some context information, a menu area containing the menu tree of the application and a client area showing the currently active component.

Since:
1.4.0

Method Summary
 void callMenu(IMenuItem item)
          Calls the action associated which the given MenuItem.
 void callMenu(java.lang.String menuId)
          Calls the action associated which the named MenuItem.
 void clearClientArea()
          Removes the embedded page or componet form the client area.
 void contextStringChanged(at.spardat.xma.boot.component.IXMAControl source, java.lang.String newText)
          Notifies the AppShell of a change in the context-string of a component or page.
 ITask createTask(java.lang.String name)
          Creates the Task with the given name.
 ITask getTopTask()
          Get the task on top of the call stack.
 boolean hasWidgets()
          Determine if the AppShell still contains widgets.
 void lockMenu()
          Locks and disables the menu.
 void markMenu(java.lang.String menuId)
          Visibly marks the named MenuItem as selected.
 void pushClientComponent(at.spardat.xma.boot.component.IXMAControl newClient, boolean modal)
          Pushes the given Component or Page on top of the call stack.
 void registerMenu(IMenuItem item)
          Register the given MenuItem at the AppShell.
 void selectMenu(java.lang.String menuId)
          Selects the named MenuItem.
 void setClientArea(at.spardat.xma.boot.component.IXMAControl newClient)
          Replaces the embedded page or component in the client area.
 void showContextStack()
          Show the contextStrings of all Tasks, Components and Pages on the call stack.
 void unlockMenu()
          Unlocks the menu.
 void unregisterMenu(IMenuItem item)
          Unregister the given MenuItem fromt the AppShell.
 
Methods inherited from interface at.spardat.xma.page.IDialogPage
clearInfo, clearValidationErrorImpl, clearWarning, hasValidationError, overrideErrorsFromModel, setFocus, setInfo, setValidationErrorImpl, setWarning
 
Methods inherited from interface at.spardat.xma.boot.component.IDialog
clearError, closeCancel, closeOK, getErrorCount, getFocusControl, getShell, setError, setFocusControl, updateErrorStatus
 
Methods inherited from interface at.spardat.xma.boot.component.IXMAControl
createComposite, enterBase, getComposite, initGUI, leaveBase, removeModel, removeWidgetsBase, stateChangedBase
 
Methods inherited from interface at.spardat.xma.page.IEmbeddable
determineStateBase, getContextString, getDialog, setDialog, setEventsEnabled, stateChangedBaseImpl, stateChangedExtend
 

Method Detail

pushClientComponent

public void pushClientComponent(at.spardat.xma.boot.component.IXMAControl newClient,
                                boolean modal)
Pushes the given Component or Page on top of the call stack. It is shown embedded in the client area. If modal is true, this method blocks until the Component or Page is closed.

Parameters:
newClient - the component or page to embedd.
modal - if modal is true this method blocks util newClient is finished if modla if false this method reuturns imediatly.

contextStringChanged

public void contextStringChanged(at.spardat.xma.boot.component.IXMAControl source,
                                 java.lang.String newText)
Notifies the AppShell of a change in the context-string of a component or page. Propagates the change to the GUI.

Parameters:
source - the component or page which changed its context string.
newText - the new context string of the source.

showContextStack

public void showContextStack()
Show the contextStrings of all Tasks, Components and Pages on the call stack.


setClientArea

public void setClientArea(at.spardat.xma.boot.component.IXMAControl newClient)
Replaces the embedded page or component in the client area. The currently embedded page or component is removed from this AppShell and the new one is shown in the client area.

Parameters:
newClient - the new page or component to embedd.

clearClientArea

public void clearClientArea()
Removes the embedded page or componet form the client area. Nothing is embedded afterwards.


getTopTask

public ITask getTopTask()
Get the task on top of the call stack. This is the currently active Task.


lockMenu

public void lockMenu()
Locks and disables the menu. Internaly increments a lock counter. To unlock the menu again unlockMenu() must be called as often as lockMenu().


unlockMenu

public void unlockMenu()
Unlocks the menu. Internaly decrements a lock counter. To unlock the menu unlockMenu() must be called as often as lockMenu() before.


hasWidgets

public boolean hasWidgets()
Determine if the AppShell still contains widgets. Can be used to test if it is disposed.

Returns:
true if it has widgets.

callMenu

public void callMenu(IMenuItem item)
Calls the action associated which the given MenuItem. Before it is actually called, all currently open Tasks outside the given MenuItem are closed.

Parameters:
item - the MenuItem to call.

callMenu

public void callMenu(java.lang.String menuId)
Calls the action associated which the named MenuItem. Before it is actually called, all currently open Tasks outside the named MenuItem are closed.

Parameters:
menuId - the name of the MenuItem to call.

selectMenu

public void selectMenu(java.lang.String menuId)
Selects the named MenuItem. This method behaves like the user has selected the MenuItem via the GUI.

Parameters:
menuId - the name of the MenuItem to select.

markMenu

public void markMenu(java.lang.String menuId)
Visibly marks the named MenuItem as selected.

Parameters:
menuId - the name of the MenuItem to mark as selected.

registerMenu

public void registerMenu(IMenuItem item)
Register the given MenuItem at the AppShell. After this, the MenuItem will be attached to its visual representation. It will be visible and events will be delivered.

Parameters:
item -

unregisterMenu

public void unregisterMenu(IMenuItem item)
Unregister the given MenuItem fromt the AppShell. After this, the MenuItem will no longer be attached to its visual representation. It will not be visible and no events will be delivered any more.

Parameters:
item -

createTask

public ITask createTask(java.lang.String name)
Creates the Task with the given name.

Parameters:
name - unique name for the task within the client side application.