com.sibvisions.rad.ui.web.impl
Class WebLauncher

java.lang.Object
  extended by com.sibvisions.rad.ui.web.impl.WebResource
      extended by com.sibvisions.rad.ui.web.impl.WebComponent
          extended by com.sibvisions.rad.ui.web.impl.WebContainer
              extended by com.sibvisions.rad.ui.web.impl.container.WebToolBarPanel
                  extended by com.sibvisions.rad.ui.web.impl.container.AbstractWebWindow
                      extended by com.sibvisions.rad.ui.web.impl.container.AbstractWebFrame
                          extended by com.sibvisions.rad.ui.web.impl.container.WebFrame
                              extended by com.sibvisions.rad.ui.web.impl.WebLauncher
All Implemented Interfaces:
ILauncher, IFrame, IToolBarPanel, IWindow, IAlignmentConstants, IComponent, IContainer, IResource, IExceptionListener

public class WebLauncher
extends WebFrame
implements ILauncher

Web server implementation of ILauncher.


Field Summary
 
Fields inherited from class com.sibvisions.rad.ui.web.impl.container.AbstractWebFrame
menuBar
 
Fields inherited from class com.sibvisions.rad.ui.web.impl.container.WebToolBarPanel
toolBarPanel
 
Fields inherited from class com.sibvisions.rad.ui.web.impl.WebComponent
componentId
 
Fields inherited from interface javax.rad.application.ILauncher
PARAM_APPLICATIONNAME, PARAM_CODEBASE, PARAM_LOGFACTORY, PARAM_SERVERBASE
 
Fields inherited from interface javax.rad.ui.container.IFrame
ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, NORMAL
 
Fields inherited from interface javax.rad.ui.container.IToolBarPanel
AREA_BOTTOM, AREA_LEFT, AREA_RIGHT, AREA_TOP
 
Fields inherited from interface javax.rad.ui.IAlignmentConstants
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_STRETCH, ALIGN_TOP
 
Constructor Summary
WebLauncher(String pApplicationClassName, String pResourceName, Hashtable<String,String> pParams)
          Creates a new instance of SwingApplication with the desired application.
 
Method Summary
 void cancelPendingThreads()
          Cancel/Interrupts all pending threads.
 void finalizeComponent(String pId)
          Component has to be finalized.
 List<List> getChangedComponents()
          Get the changed components since the last call.
 WebComponent getComponentById(String pId)
          Gets the component by id.
 void getFileHandle(IFileHandleReceiver pFileHandleReceiver, String pTitle)
          Technology independent getFileHandle.
 void getFileHandle(Object pFileHandleReceiver, String pMethodName, String pTitle)
          Technology independent getFileHandle.
 String getParameter(String pName)
          Gets a configuration parameter of the application.
 String getRegistryKey(String pKey)
          Gets the value for a specific key from the applications registry.
 String getUniqueName()
          Gets the unique Launcher name.
 void handleException(Throwable throwable)
          Notification for the listener to handle an exception occured in another part of the program.
 void saveFileHandle(IFileHandle pFileHandle, String pTitle)
          Technology independent saveFileHandle.
 void setComponentData(Map<String,Object> pComponentData)
          Sets the component data.
 void setParameter(String pName, String pValue)
          Sets a configuration parameter of the application.
 void setRegistryKey(String pKey, String pValue)
          Sets the value for a specific key to the applications registry.
 void showDocument(String pDocumentName, IRectangle pBounds, String pTarget)
          Requests that external application shows a document indicated by the pDocumentname argument.
 void showFileHandle(IFileHandle pFileHandle)
          Technology independent showFileHandle.
 void showFileHandle(IFileHandle pFileHandle, IRectangle pBounds, String pTarget)
          Technology independent showFileHandle.
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.container.WebFrame
dispose, isActive, isDisposed, pack, toBack, toFront
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.container.AbstractWebFrame
addPanelIntern, getIconImage, getMenuBar, getState, getTitle, getToolBarArea, isResizable, setIconImage, setMenuBar, setResizable, setState, setTitle, setToolBarArea
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.container.AbstractWebWindow
eventWindowActivated, eventWindowClosed, eventWindowClosing, eventWindowDeactivated, eventWindowDeiconified, eventWindowIconified, eventWindowOpened, setLocationRelativeTo
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.container.WebToolBarPanel
add, addToolBar, addToolBar, getToolBar, getToolBarCount, indexOfToolBar, remove, removeAllToolBars, removePanelIntern, removeToolBar, removeToolBar, setLayout
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.WebContainer
add, add, add, getComponent, getComponentCount, getLayout, indexOf, remove, removeAll
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.WebComponent
capture, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, finalize, getAsString, getBackground, getBounds, getChangedProperties, getComponentId, getComponentName, getConstraints, getCursor, getFactory, getFont, getForeground, getHorizontalAlignment, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getProperty, getSize, getToolTipText, getVerticalAlignment, isBackgroundSet, isChanged, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setComponentId, setConstraints, setCursor, setEnabled, setFactory, setFocusable, setFont, setForeground, setHorizontalAlignment, setLocation, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setProperty, setProperty, setSize, setToolTipText, setVerticalAlignment, setVisible
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.WebResource
getNullableAsString, getResource, setAsString, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.rad.ui.container.IFrame
getIconImage, getMenuBar, getState, getTitle, isResizable, setIconImage, setMenuBar, setResizable, setState, setTitle
 
Methods inherited from interface javax.rad.ui.container.IWindow
dispose, eventWindowActivated, eventWindowClosed, eventWindowClosing, eventWindowDeactivated, eventWindowDeiconified, eventWindowIconified, eventWindowOpened, isActive, isDisposed, pack, setLocationRelativeTo, toBack, toFront
 
Methods inherited from interface javax.rad.ui.IContainer
add, add, add, add, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, setLayout
 
Methods inherited from interface javax.rad.ui.IComponent
capture, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getFactory, getFont, getForeground, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFocusable, setFont, setForeground, setLocation, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setToolTipText, setVisible
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 
Methods inherited from interface javax.rad.ui.container.IToolBarPanel
addToolBar, addToolBar, getToolBar, getToolBarArea, getToolBarCount, indexOfToolBar, removeAllToolBars, removeToolBar, removeToolBar, setToolBarArea
 
Methods inherited from interface javax.rad.ui.IContainer
add, add, add, add, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, setLayout
 
Methods inherited from interface javax.rad.ui.IComponent
capture, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getFactory, getFont, getForeground, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFocusable, setFont, setForeground, setLocation, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setToolTipText, setVisible
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 

Constructor Detail

WebLauncher

public WebLauncher(String pApplicationClassName,
                   String pResourceName,
                   Hashtable<String,String> pParams)
Creates a new instance of SwingApplication with the desired application.

Parameters:
pApplicationClassName - the full qualified class name of the IApplication to run.
pResourceName - gives the name of the configuration file (default: application.xml)
pParams - additional or preferred parameters. The parameters overrides the parameters from the config file
Method Detail

getParameter

public String getParameter(String pName)
Gets a configuration parameter of the application.

Specified by:
getParameter in interface ILauncher
Parameters:
pName - the parameter name
Returns:
the value of the parameter or null if the parameter does not exist

setParameter

public void setParameter(String pName,
                         String pValue)
Sets a configuration parameter of the application.

Specified by:
setParameter in interface ILauncher
Parameters:
pName - the parameter name
pValue - the value for the parameter or null to delete the parameter

showDocument

public void showDocument(String pDocumentName,
                         IRectangle pBounds,
                         String pTarget)
                  throws Throwable
Requests that external application shows a document indicated by the pDocumentname argument. The target argument indicates where the document should be displayed. Applications can also ignore the target information.

Specified by:
showDocument in interface ILauncher
Parameters:
pDocumentName - the location/filename of the document. (local or network adress)
pBounds - the bounds for the document, if supported from the implementation
pTarget - a String indicating where to display the document.
Throws:
Throwable - if the document couldn't opened/shown

showFileHandle

public void showFileHandle(IFileHandle pFileHandle,
                           IRectangle pBounds,
                           String pTarget)
                    throws Throwable
Technology independent showFileHandle. A file chooser dialog should occur. This Function returns immediate.

Specified by:
showFileHandle in interface ILauncher
Parameters:
pFileHandle - the IFileHandle to save.
pBounds - the bounds for the document, if supported from the implementation
pTarget - a String indicating where to display the document.
Throws:
Throwable - if an error occurs during saving the file.

showFileHandle

public void showFileHandle(IFileHandle pFileHandle)
                    throws Throwable
Technology independent showFileHandle. A file chooser dialog should occur. This Function returns immediate.

Specified by:
showFileHandle in interface ILauncher
Parameters:
pFileHandle - the IFileHandle to save.
Throws:
Throwable - if an error occurs during saving the file.

saveFileHandle

public void saveFileHandle(IFileHandle pFileHandle,
                           String pTitle)
                    throws Throwable
Technology independent saveFileHandle. A file chooser dialog should occur. This Function returns immediate.

Specified by:
saveFileHandle in interface ILauncher
Parameters:
pFileHandle - the IFileHandle to save.
pTitle - the title for the dialog or null to set a default title
Throws:
Throwable - if an error occurs during saving the file.

getFileHandle

public void getFileHandle(IFileHandleReceiver pFileHandleReceiver,
                          String pTitle)
                   throws Throwable
Technology independent getFileHandle. A file chooser dialog should occur, and as result this function informs the IFileHandle receiver.

Specified by:
getFileHandle in interface ILauncher
Parameters:
pFileHandleReceiver - the IFileHandle receiver that should receive the file.
pTitle - the title for the dialog or null to set a default title
Throws:
Throwable - if an error occurs during getting the file.

getFileHandle

public void getFileHandle(Object pFileHandleReceiver,
                          String pMethodName,
                          String pTitle)
                   throws Throwable
Technology independent getFileHandle. A file chooser dialog should occur, and as result this function informs the IFileHandle receiver.

Specified by:
getFileHandle in interface ILauncher
Parameters:
pFileHandleReceiver - the IFileHandle receiver that should receive the file.
pMethodName - the method that is invoked.
pTitle - the title for the dialog or null to set a default title
Throws:
Throwable - if an error occurs during getting the file.

cancelPendingThreads

public void cancelPendingThreads()
Cancel/Interrupts all pending threads.

Specified by:
cancelPendingThreads in interface ILauncher

setRegistryKey

public void setRegistryKey(String pKey,
                           String pValue)
Sets the value for a specific key to the applications registry. The registry is a local store for persistent values.

Specified by:
setRegistryKey in interface ILauncher
Parameters:
pKey - the key to set
pValue - the value to set or null to remove the key from the registry

getRegistryKey

public String getRegistryKey(String pKey)
Gets the value for a specific key from the applications registry.

Specified by:
getRegistryKey in interface ILauncher
Parameters:
pKey - the key to get
Returns:
the value for the key or null if the key is not available

handleException

public void handleException(Throwable throwable)
Notification for the listener to handle an exception occured in another part of the program.

Specified by:
handleException in interface IExceptionListener
Parameters:
throwable - the occured exception

getUniqueName

public String getUniqueName()
Gets the unique Launcher name.

Returns:
the unique name

getComponentById

public WebComponent getComponentById(String pId)
Gets the component by id.

Parameters:
pId - the id.
Returns:
the WebComponent.

finalizeComponent

public void finalizeComponent(String pId)
Component has to be finalized.

Parameters:
pId - the id.

getChangedComponents

public List<List> getChangedComponents()
Get the changed components since the last call.

Returns:
the changed components.

setComponentData

public void setComponentData(Map<String,Object> pComponentData)
Sets the component data.

Parameters:
pComponentData - the component data.


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.