|
|
(One intermediate revision by one other user not shown) |
Line 1: |
Line 1: |
− | {{ScoutPage|cat=Concepts}}
| + | The Scout documentation has been moved to https://eclipsescout.github.io/. |
− | | + | |
− | Desktop is the root component of Scout Client applications.
| + | |
− | | + | |
− | * implements: {{ScoutJavadoc|IDesktop|I}}
| + | |
− | * extends: {{ScoutJavadoc|AbstractDesktop|C}}
| + | |
− | | + | |
− | | + | |
− | == Description ==
| + | |
− | The desktop is the entry point of every Scout Client application. It can (may) consist of: | + | |
− | | + | |
− | * Top-level {{ScoutLink|Concepts|Menu|menus}}
| + | |
− | * {{ScoutLink|Concepts|Tool|Tools}}
| + | |
− | * Set of available {{ScoutLink|Concepts|Outline|outlines}} and an active {{ScoutLink|Concepts|Outline|outline}}
| + | |
− | | + | |
− | * active message box stack
| + | |
− | * active tableview
| + | |
− | * active detail form
| + | |
− | * active search form
| + | |
− | * form stack (swing: dialogs on desktop as JInternalFrames; eclipse: editors or views)
| + | |
− | * dialog stack of modal and non-modal dialogs (swing: dialogs as JDialog, JFrame; eclipse: dialogs in a new Shell)
| + | |
− | | + | |
− | | + | |
− | == Properties ==
| + | |
− | ''Defined with {{ScoutLink|Concepts|GetConfigured Methods|getConfiguredXxxxxx()}} methods''.
| + | |
− | | + | |
− | * {{ScoutProp|Title}}: title of the application.
| + | |
− | * {{ScoutProp|Outlines}}: provide a list of the Outlines defined in the application.
| + | |
− | | + | |
− | | + | |
− | == Events ==
| + | |
− | ''Defined with {{ScoutLink|Concepts|Exec_Methods|execXxxxxx()}} methods''.
| + | |
− | | + | |
− | * {{ScoutEvent|Init}}
| + | |
− | | + | |
− | ===Application events===
| + | |
− | * {{ScoutEvent|Opened}}:
| + | |
− | | + | |
− | This event is occurs after the desktop was opened and setup in UI. It provide the possibility to define what will be displayed in the main windows. The corresponding {{ScoutLink|Concepts|Form|forms}} are instantiated and started.
| + | |
− | | + | |
− | In most of the cases, the code generated when you create a new project do not need to be changed. It depends of {{ScoutLink|Concepts|Type of application|the type of application}} you want to create.
| + | |
− | | + | |
− | For a '''Single form application''':
| + | |
− | | + | |
− | <source lang="java">
| + | |
− | @Override
| + | |
− | protected void execOpened() throws ProcessingException {
| + | |
− | // dektop form
| + | |
− | DesktopForm desktopForm = new DesktopForm();
| + | |
− | desktopForm.startView();
| + | |
− | }
| + | |
− | </source>
| + | |
− | | + | |
− | For an '''{{ScoutLink|Concepts|Outline based application|Outline based application}}''':
| + | |
− | | + | |
− | <source lang="java">
| + | |
− | @Override
| + | |
− | protected void execOpened() throws ProcessingException {
| + | |
− | // outline tree
| + | |
− | DefaultOutlineTreeForm treeForm = new DefaultOutlineTreeForm();
| + | |
− | treeForm.startView();
| + | |
− | | + | |
− | //outline table
| + | |
− | DefaultOutlineTableForm tableForm = new DefaultOutlineTableForm();
| + | |
− | tableForm.startView();
| + | |
− | | + | |
− | if (getAvailableOutlines().length > 0) {
| + | |
− | setOutline(getAvailableOutlines()[0]);
| + | |
− | }
| + | |
− | }
| + | |
− | </source>
| + | |
− | * {{ScoutEvent|Closed}}: occures before the application quit.
| + | |
− | * {{ScoutEvent|OutlineChanged}}: the active {{ScoutLink|Concepts|Outline|outline}} changed.
| + | |
− | | + | |
− | ===Events to handle GUI===
| + | |
− | * {{ScoutEvent|GUIAttached}}
| + | |
− | * {{ScoutEvent|GUIDetached}}
| + | |
− | | + | |
− | == See Also ==
| + | |
− | * {{ScoutLink|Concepts|Outline|Outline}}
| + | |
− | * {{ScoutLink|Concepts|Client Plug-In|Client Plug-In}}
| + | |