|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sibvisions.rad.ui.awt.impl.AwtResource<C>
com.sibvisions.rad.ui.awt.impl.AwtComponent<C>
com.sibvisions.rad.ui.awt.impl.AwtContainer<C>
com.sibvisions.rad.ui.swing.impl.container.SwingAbstractFrame<javax.swing.JFrame>
com.sibvisions.rad.ui.swing.impl.container.SwingFrame
com.sibvisions.rad.ui.swing.impl.SwingApplication
public class SwingApplication
The SwingApplication
is the IApplication
implementation
for swing applications with full access to the JFrame
.
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_APPLICATION
the property name for the application (client properties). |
Fields inherited from class com.sibvisions.rad.ui.swing.impl.container.SwingAbstractFrame |
---|
bDisposed, bWindowListener, eventWindowActivated, eventWindowClosed, eventWindowClosing, eventWindowDeactivated, eventWindowDeiconified, eventWindowIconified, eventWindowOpened, iconImage, menuBar |
Fields inherited from class com.sibvisions.rad.ui.awt.impl.AwtComponent |
---|
bComponentListener, bFocusListener, bKeyListener, bMouseListener, eventComponentMoved, eventComponentResized, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, eventSource, factory, parent |
Fields inherited from class com.sibvisions.rad.ui.awt.impl.AwtResource |
---|
resource |
Fields inherited from interface javax.rad.application.ILauncher |
---|
ENVIRONMENT_DESKTOP, ENVIRONMENT_HEADLESS, ENVIRONMENT_MOBILE, ENVIRONMENT_WEB, PARAM_APPLICATIONLANGUAGE, PARAM_APPLICATIONNAME, PARAM_CODEBASE, PARAM_ENVIRONMENT, PARAM_LOGFACTORY, PARAM_SERVERBASE, PARAM_UIFACTORY |
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_DEFAULT, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_STRETCH, ALIGN_TOP |
Constructor Summary | |
---|---|
SwingApplication()
Creates a new instance of SwingApplication . |
|
SwingApplication(java.lang.String pApplicationClassName,
java.lang.String pConfigFileName,
java.lang.String[] pParams)
Creates a new instance of SwingApplication with the desired
application. |
Method Summary | |
---|---|
void |
cancelPendingThreads()
Cancel/Interrupts all pending threads. |
static SwingApplication |
createSwingApplication()
Creates the application in the UI thread. |
static SwingApplication |
createSwingApplication(java.lang.String pApplicationClassName,
java.lang.String pConfigFileName,
java.lang.String[] pParams)
Creates the application in the UI thread. |
void |
dispose()
Marks the frame as disposed. |
IApplication |
getApplication()
Gets the launched application. |
java.lang.String |
getEnvironmentName()
Gets the name of the environment for this launcher. |
void |
getFileHandle(IFileHandleReceiver pFileHandleReceiver,
java.lang.String pTitle)
Technology independent getFileHandle. |
java.lang.Object |
getObject(java.lang.String pName)
Gets an external object from launchers object store. |
java.lang.String |
getParameter(java.lang.String pName)
Gets a configuration parameter of the application. |
java.lang.String |
getRegistryKey(java.lang.String pKey)
Gets the value for a specific key from the applications registry. |
void |
handleException(java.lang.Throwable pThrowable)
Notification for the listener to handle an exception occured in another part of the program. |
boolean |
isFullScreen()
Gets whether full screen mode is active. |
boolean |
isSystemExitOnDispose()
Gets whether System.exit(int) will be called if dispose is called. |
static void |
main(java.lang.String[] pArguments)
Starts the application as frame. |
java.lang.Object |
putObject(java.lang.String pName,
java.lang.Object pObject)
Puts an external object into launchers object store. |
void |
saveFileHandle(IFileHandle pFileHandle,
java.lang.String pTitle)
Technology independent saveFileHandle. |
void |
setFullScreen(boolean pFullScreen)
Sets the full screen mode. |
void |
setParameter(java.lang.String pName,
java.lang.String pValue)
Sets a configuration parameter of the application. |
void |
setRegistryKey(java.lang.String pKey,
java.lang.String pValue)
Sets the value for a specific key to the applications registry. |
void |
setSystemExitOnDispose(boolean pExitOnDispose)
Sets whether System.exit(int) should be called if dispose is called. |
void |
showDocument(java.lang.String pDocumentName,
IRectangle pBounds,
java.lang.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,
java.lang.String pTarget)
Technology independent showFileHandle. |
void |
startup(java.lang.String pApplicationClassName,
java.lang.String pConfigFileName,
java.lang.String[] pParams)
Starts the application in the UI thread. |
Methods inherited from class com.sibvisions.rad.ui.swing.impl.container.SwingFrame |
---|
addIntern, addWindowListenerToResource, capture, centerRelativeTo, getModalDesktopPane, getState, getTitle, isActive, isResizable, pack, removeIntern, setIconImage, setLayoutIntern, setMenuBar, setResizable, setState, setTitle, setVisible, toBack, toFront, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened |
Methods inherited from class com.sibvisions.rad.ui.swing.impl.container.SwingAbstractFrame |
---|
addToolBar, addToolBar, addToolBarIntern, addWindowListener, eventWindowActivated, eventWindowClosed, eventWindowClosing, eventWindowDeactivated, eventWindowDeiconified, eventWindowIconified, eventWindowOpened, getIconImage, getMenuBar, getToolBar, getToolBarArea, getToolBarCount, getTranslation, indexOfToolBar, isDisposed, removeAllToolBars, removeToolBar, removeToolBar, removeToolBarIntern, setCursor, setToolBarArea, setTranslation |
Methods inherited from class com.sibvisions.rad.ui.awt.impl.AwtContainer |
---|
add, add, add, add, checkAdd, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, setLayout |
Methods inherited from class com.sibvisions.rad.ui.awt.impl.AwtResource |
---|
getResource, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, 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 |
---|
centerRelativeTo, eventWindowActivated, eventWindowClosed, eventWindowClosing, eventWindowDeactivated, eventWindowDeiconified, eventWindowIconified, eventWindowOpened, getTranslation, isActive, isDisposed, pack, setTranslation, toBack, toFront |
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.IResource |
---|
getResource |
Field Detail |
---|
public static final java.lang.String PROPERTY_APPLICATION
Constructor Detail |
---|
public SwingApplication()
SwingApplication
. Use this constructor
if you need access to the frame before the application is started.
startup(String, String, String[])
public SwingApplication(java.lang.String pApplicationClassName, java.lang.String pConfigFileName, java.lang.String[] pParams)
SwingApplication
with the desired
application.
pApplicationClassName
- the full qualified class name of the IApplication
to run.pConfigFileName
- gives the name of the configuration file (default: application.xml)pParams
- additional or preferred parameters. The parameters overrides the parameters from the config fileMethod Detail |
---|
public static void main(java.lang.String[] pArguments)
pArguments
- the launcher arguments: main-class [config.xml key1=value1 key2=value2]public static SwingApplication createSwingApplication()
public static SwingApplication createSwingApplication(java.lang.String pApplicationClassName, java.lang.String pConfigFileName, java.lang.String[] pParams)
pApplicationClassName
- the full qualified class name of the IApplication
to run.pConfigFileName
- gives the name of the configuration file (default: application.xml)pParams
- additional or preferred parameters. The parameters overrides the parameters from the config file
public void startup(java.lang.String pApplicationClassName, java.lang.String pConfigFileName, java.lang.String[] pParams)
pApplicationClassName
- the full qualified class name of the IApplication
to run.pConfigFileName
- gives the name of the configuration file (default: application.xml)pParams
- additional or preferred parameters. The parameters overrides the parameters from the config filepublic void dispose()
dispose
in interface IWindow
dispose
in class SwingFrame
IWindow.pack()
,
IComponent.setVisible(boolean)
public java.lang.String getParameter(java.lang.String pName)
getParameter
in interface ILauncher
pName
- the parameter name
null
if the parameter does not existpublic void setParameter(java.lang.String pName, java.lang.String pValue)
setParameter
in interface ILauncher
pName
- the parameter namepValue
- the value for the parameter or null
to delete the parameterpublic void showDocument(java.lang.String pDocumentName, IRectangle pBounds, java.lang.String pTarget) throws java.lang.Throwable
pDocumentname
argument. The
target
argument indicates where the document should be displayed.
Applications can also ignore the target
information.
showDocument
in interface ILauncher
pDocumentName
- the location/filename of the document. (local or network adress)pBounds
- the bounds for the document, if supported from the implementationpTarget
- a String
indicating where to display the document.
java.lang.Throwable
- if the document couldn't opened/shownpublic void showFileHandle(IFileHandle pFileHandle, IRectangle pBounds, java.lang.String pTarget) throws java.lang.Throwable
showFileHandle
in interface ILauncher
pFileHandle
- the IFileHandle to save.pBounds
- the bounds for the document, if supported from the implementationpTarget
- a String
indicating where to display the document.
java.lang.Throwable
- if an error occurs during saving the file.public void showFileHandle(IFileHandle pFileHandle) throws java.lang.Throwable
showFileHandle
in interface ILauncher
pFileHandle
- the IFileHandle to save.
java.lang.Throwable
- if an error occurs during saving the file.public void saveFileHandle(IFileHandle pFileHandle, java.lang.String pTitle) throws java.lang.Throwable
saveFileHandle
in interface ILauncher
pFileHandle
- the IFileHandle to save.pTitle
- the title for the dialog or null
to set a default title
java.lang.Throwable
- if an error occurs during saving the file.public void getFileHandle(IFileHandleReceiver pFileHandleReceiver, java.lang.String pTitle) throws java.lang.Throwable
getFileHandle
in interface ILauncher
pFileHandleReceiver
- the IFileHandle receiver that should receive the file.pTitle
- the title for the dialog or null
to set a default title
java.lang.Throwable
- if an error occurs during getting the file.public void cancelPendingThreads()
cancelPendingThreads
in interface ILauncher
public void setRegistryKey(java.lang.String pKey, java.lang.String pValue)
setRegistryKey
in interface ILauncher
pKey
- the key to setpValue
- the value to set or null
to remove the key from the registrypublic java.lang.String getRegistryKey(java.lang.String pKey)
getRegistryKey
in interface ILauncher
pKey
- the key to get
null
if the key is not availablepublic java.lang.String getEnvironmentName()
getEnvironmentName
in interface ILauncher
ILauncher.ENVIRONMENT_HEADLESS
,
ILauncher.ENVIRONMENT_DESKTOP
public void handleException(java.lang.Throwable pThrowable)
handleException
in interface IExceptionListener
pThrowable
- the occured exceptionpublic IApplication getApplication()
public java.lang.Object putObject(java.lang.String pName, java.lang.Object pObject)
pName
- the name of the objectpObject
- the object or null
to remove the object from the store
public java.lang.Object getObject(java.lang.String pName)
pName
- the name of the object
null
if no object was found with the given namepublic void setSystemExitOnDispose(boolean pExitOnDispose)
System.exit(int)
should be called if dispose is called.
pExitOnDispose
- true
to call System.exit(int)
, false
otherwisepublic boolean isSystemExitOnDispose()
System.exit(int)
will be called if dispose is called.
true
if System.exit(int)
will be called, false
otherwisepublic void setFullScreen(boolean pFullScreen)
pFullScreen
- true
to enable full screen mode, false
to set normal modepublic boolean isFullScreen()
true
if full screen mode is active, false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |