|
||||||||||
| 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<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 String |
PROPERTY_APPLICATION
the property name for the application (client properties). |
| Fields inherited from class com.sibvisions.rad.ui.swing.impl.container.SwingAbstractFrame |
|---|
bDisposed, eventWindowActivated, eventWindowClosed, eventWindowClosing, eventWindowDeactivated, eventWindowDeiconified, eventWindowIconified, eventWindowOpened, iconImage, menuBar |
| Fields inherited from class com.sibvisions.rad.ui.awt.impl.AwtComponent |
|---|
eventComponentMoved, eventComponentResized, 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_LEFT, ALIGN_RIGHT, ALIGN_STRETCH, ALIGN_TOP |
| Constructor Summary | |
|---|---|
SwingApplication()
Creates a new instance of SwingApplication. |
|
SwingApplication(String pApplicationClassName,
String pConfigFileName,
String[] pParams)
Creates a new instance of SwingApplication with the desired
application. |
|
| Method Summary | |
|---|---|
protected void |
addIntern(Component pComponent,
Object pConstraints,
int pIndex)
Internal function, for adding physical component and supporting layers. |
void |
cancelPendingThreads()
Cancel/Interrupts all pending threads. |
IImage |
capture(int pWidth,
int pHeight)
Creates an image/screenshot of the component. |
void |
dispose()
Marks the frame as disposed. |
IApplication |
getApplication()
Gets the launched application. |
String |
getEnvironmentName()
Gets the name of the environment for this launcher. |
void |
getFileHandle(IFileHandleReceiver pFileHandleReceiver,
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. |
void |
handleException(Throwable pThrowable)
Notification for the listener to handle an exception occured in another part of the program. |
static void |
main(String[] pArguments)
Starts the application as frame. |
protected void |
removeIntern(Component pComponent)
Internal function, for adding physical component and supporting layers. |
void |
saveFileHandle(IFileHandle pFileHandle,
String pTitle)
Technology independent saveFileHandle. |
protected void |
setLayoutIntern(LayoutManager pLayoutManager)
Internal function, for setting the layout. |
void |
setMenuBar(IMenuBar pMenuBar)
Sets the menubar for this frame. |
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. |
void |
startup(String pApplicationClassName,
String pConfigFileName,
String[] pParams)
Starts the application in the UI thread. |
| Methods inherited from class com.sibvisions.rad.ui.swing.impl.container.SwingFrame |
|---|
centerRelativeTo, getState, getTitle, isActive, isResizable, pack, setIconImage, 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, eventWindowActivated, eventWindowClosed, eventWindowClosing, eventWindowDeactivated, eventWindowDeiconified, eventWindowIconified, eventWindowOpened, getIconImage, getMenuBar, getToolBar, getToolBarArea, getToolBarCount, indexOfToolBar, isDisposed, removeAllToolBars, removeToolBar, removeToolBar, removeToolBarIntern, setCursor, setToolBarArea |
| 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 |
|---|
equals, getResource, hashCode, 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, setResizable, setState, setTitle |
| Methods inherited from interface javax.rad.ui.container.IWindow |
|---|
centerRelativeTo, eventWindowActivated, eventWindowClosed, eventWindowClosing, eventWindowDeactivated, eventWindowDeiconified, eventWindowIconified, eventWindowOpened, isActive, isDisposed, pack, 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 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(String pApplicationClassName,
String pConfigFileName,
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 file| Method Detail |
|---|
public static void main(String[] pArguments)
pArguments - the launcher arguments: main-class [config.xml key1=value1 key2=value2]
public void startup(String pApplicationClassName,
String pConfigFileName,
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 IWindowdispose in class SwingFrameIWindow.pack(),
IComponent.setVisible(boolean)public void setMenuBar(IMenuBar pMenuBar)
setMenuBar in interface IFramesetMenuBar in class SwingFramepMenuBar - the menubar being placed in the frameIFrame.getMenuBar()protected void setLayoutIntern(LayoutManager pLayoutManager)
setLayoutIntern in class SwingAbstractFrame<JFrame>pLayoutManager - the layout
protected void addIntern(Component pComponent,
Object pConstraints,
int pIndex)
addIntern in class SwingAbstractFrame<JFrame>pComponent - the Component to be addedpConstraints - an object expressing layout contraints for thispIndex - the position in the container's list at which to insert
the Component; -1 means insert at the end
componentAwtContainer.add(IComponent, Object, int)protected void removeIntern(Component pComponent)
removeIntern in class SwingAbstractFrame<JFrame>pComponent - the Component to be removedAwtContainer.remove(int)
public IImage capture(int pWidth,
int pHeight)
capture in interface IComponentcapture in class AwtComponent<JFrame>pWidth - the expected widthpHeight - the expected height
public String getParameter(String pName)
getParameter in interface ILauncherpName - the parameter name
null if the parameter does not exist
public void setParameter(String pName,
String pValue)
setParameter in interface ILauncherpName - the parameter namepValue - the value for the parameter or null to delete the parameter
public void showDocument(String pDocumentName,
IRectangle pBounds,
String pTarget)
throws Throwable
pDocumentname argument. The
target argument indicates where the document should be displayed.
Applications can also ignore the target information.
showDocument in interface ILauncherpDocumentName - 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.
Throwable - if the document couldn't opened/shown
public void showFileHandle(IFileHandle pFileHandle,
IRectangle pBounds,
String pTarget)
throws Throwable
showFileHandle in interface ILauncherpFileHandle - the IFileHandle to save.pBounds - the bounds for the document, if supported from the implementationpTarget - a String indicating where to display the document.
Throwable - if an error occurs during saving the file.
public void showFileHandle(IFileHandle pFileHandle)
throws Throwable
showFileHandle in interface ILauncherpFileHandle - the IFileHandle to save.
Throwable - if an error occurs during saving the file.
public void saveFileHandle(IFileHandle pFileHandle,
String pTitle)
throws Throwable
saveFileHandle in interface ILauncherpFileHandle - the IFileHandle to save.pTitle - the title for the dialog or null to set a default title
Throwable - if an error occurs during saving the file.
public void getFileHandle(IFileHandleReceiver pFileHandleReceiver,
String pTitle)
throws Throwable
getFileHandle in interface ILauncherpFileHandleReceiver - the IFileHandle receiver that should receive the file.pTitle - the title for the dialog or null to set a default title
Throwable - if an error occurs during getting the file.public void cancelPendingThreads()
cancelPendingThreads in interface ILauncher
public void setRegistryKey(String pKey,
String pValue)
setRegistryKey in interface ILauncherpKey - the key to setpValue - the value to set or null to remove the key from the registrypublic String getRegistryKey(String pKey)
getRegistryKey in interface ILauncherpKey - the key to get
null if the key is not availablepublic String getEnvironmentName()
getEnvironmentName in interface ILauncherILauncher.ENVIRONMENT_HEADLESS,
ILauncher.ENVIRONMENT_DESKTOPpublic void handleException(Throwable pThrowable)
handleException in interface IExceptionListenerpThrowable - the occured exceptionpublic IApplication getApplication()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||