Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Scout/Concepts/Desktop"

m (removed the Exec prefix of the events)
(Events)
Line 34: Line 34:
 
* {{ScoutEvent|Init}}
 
* {{ScoutEvent|Init}}
  
Events of the application:
+
===Application events===
* {{ScoutEvent|Open}}: used to start the Form responsible to represent pages in the main windows.
+
* {{ScoutEvent|Open}}:  
 +
 
 +
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 '''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|Closed}}: occures before the application quit.
 
* {{ScoutEvent|OutlineChanged}}: the active {{ScoutLink|Concepts|Outline|outline}} changed.
 
* {{ScoutEvent|OutlineChanged}}: the active {{ScoutLink|Concepts|Outline|outline}} changed.
  
Events to handle GUI:
+
===Events to handle GUI===
 
* {{ScoutEvent|GUIAttached}}
 
* {{ScoutEvent|GUIAttached}}
 
* {{ScoutEvent|GUIDetached}}
 
* {{ScoutEvent|GUIDetached}}
 
  
 
== See Also ==
 
== See Also ==
 
* {{ScoutLink|Concepts|Outline|Outline}}  
 
* {{ScoutLink|Concepts|Outline|Outline}}  
 
* {{ScoutLink|Concepts|Client Plug-In|Client Plug-In}}
 
* {{ScoutLink|Concepts|Client Plug-In|Client Plug-In}}

Revision as of 16:10, 7 September 2011

The Scout documentation has been moved to https://eclipsescout.github.io/.

Desktop is the root component of Scout Client applications.


Description

The desktop is the entry point of every Scout Client application. It can (may) consist of:

  • 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 The Scout documentation has been moved to https://eclipsescout.github.io/. methods.


Events

Defined with The Scout documentation has been moved to https://eclipsescout.github.io/. methods.

Application events

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 The Scout documentation has been moved to https://eclipsescout.github.io/. 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 The Scout documentation has been moved to https://eclipsescout.github.io/. you want to create.

For a Single form application:

@Override
protected void execOpened() throws ProcessingException {
  // dektop form
  DesktopForm desktopForm = new DesktopForm();
  desktopForm.startView();
}

For an Outline based application:

@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]);
  }
}

Events to handle GUI

See Also

Back to the top