/
Window System Migration
Window System Migration
Tool Windows
Basics
What was a derivative of org.esa.beam.framework.ui.application.support.AbstractToolView
public class ${NAME}ToolView extends AbstractToolView { ... }
becomes a derivative of org.openide.windows.TopComponent
:
public class ${NAME}TopComponent extends TopComponent { ... }
Help
In most toolwindows we had a help button, created and initialised like this:
AbstractButton helpButton = ToolButtonFactory.createButton(UIUtils.loadImageIcon("icons/Help22.png"), false); helpButton.setToolTipText("Help."); /*I18N*/ helpButton.setName("helpButton"); ... if (getDescriptor().getHelpId() != null) { HelpSys.enableHelpOnButton(helpButton, getDescriptor().getHelpId()); HelpSys.enableHelpKey(mainPane, getDescriptor().getHelpId()); }
This code can be replaced by within a ${NAME}TopComponent.initComponents()
method as follows:
AbstractButton helpButton = ToolButtonFactory.createButton(new HelpAction(this), false); helpButton.setName("helpButton");
We can use new HelpAction(this)
, because this
is a TopComponent
which is always HelpCtx.Provider
. To provide context-sensitive help also add
@Override public HelpCtx getHelpCtx() { return new HelpCtx(HELP_ID); }
References
- - SNAP-45Getting issue details... STATUS
- Window and Selection Management Specification
, multiple selections available,
Related content
API and Architectural Changes in SNAP 10
API and Architectural Changes in SNAP 10
More like this
IntelliJ IDEA
IntelliJ IDEA
More like this
SNAP 12 deprecated classes and methods
SNAP 12 deprecated classes and methods
More like this
SNAP 11 deprecated classes and methods
SNAP 11 deprecated classes and methods
More like this
How to develop an extension module
How to develop an extension module
More like this