...
Code Block |
---|
|
public class ${NAME}TopComponent extends TopComponent {
...
} |
Help
In most toolwindows we had a help button, created and initialised like this:
Code Block |
---|
|
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:
Code Block |
---|
|
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
Code Block |
---|
|
@Override
public HelpCtx getHelpCtx() {
return new HelpCtx(HELP_ID);
} |
References
Jira Legacy |
---|
server | JIRA (senbox.atlassian.net) |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
serverId | 34c99a62-e5be-31ca-898a-01c2aded1b99 |
---|
key | SNAP-45 |
---|
|
- Window and Selection Management Specification
...