Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Dialogs are required when a user is required to set parameters before a functionality is called. Dialogs may be modal and offer a user to run or cancel the task at hand or to open a help page. SNAP offers a class AbstractDialog which might be extended. Note that for Operators there is a pre-defined dialog which expects that a source product has to be processed into a target product. This pre-defined dialog is also able to create its own UI components for Operator parameters which use primitive data types. If an Operator meets these requirements, it should delegate to the DefaultOperatorAction in the layer.xml. Likewise, Product Reader Actions should delegate to the ImportProductAction, which will open a file chooser and pass the user's file choice to the designated writerreader.

Creating Tool Windows

As SNAP Desktop is based on the NetBeans RCP, tool windows are based on NetBeans TopComponents. TopComponents are display windows which might be floating, but can also be tabbed or docked. Similarly to Actions, TopComponents can be annotated. Using these Annotations, it is possible to define entries in menus or toolbars, but also to specify where a TopComponent shall be positioned after it is opened. Some TopComponents might be already open at the start of the Sentinel Toolbox. The Toolbox remembers which TopComponents have been opened and where they have been placed. This configuration will be re-loaded. SNAP offers a convenience class ToolTopComponent which might be used to create Tool Windows. This class listens to changes of the ProductSceneView, as it is assumed that the information displayed in the Tool Window is directly related to the presently displayed image.