Note: These pages are being reviewed.
How Can I Hook Up JavaHelp to Property Sets or Individual Properties?
Generally speaking, you can implement HelpCtx.Provider for objects in your platform application to associate them with a JavaHelp context (page). For some reason, this approach does not work with node properties. You can set the "helpID" value to associate JavaHelp with an individual property or an entire set, as shown below:
For Individual Properties
// in the constructor of your property class
public LastNameProperty(String initialValue) {
super("lastName", String.class, "Last Name", "The user's surname");
// This is how you associate a given property with a help context.
setValue("helpID", "my.help.ctx");
}
For a Set of Properties
@Override
protected Sheet createSheet() {
Sheet s = super.createSheet();
Sheet.Set ss = s.get(Sheet.PROPERTIES);
if (ss == null) {
ss = Sheet.createPropertiesSet();
s.put(ss);
}
// Do this to specify help for a whole sheet set
ss.setValue("helpID", "my.help.ctx");
ss.put(new FirstNameProperty("Abe"));
ss.put(new LastNameProperty("Lincoln"));
return s;
}
Apache Migration Information
The content in this page was kindly donated by Oracle Corp. to the Apache Software Foundation.
This page was exported from http://wiki.netbeans.org/DevFaqJavaHelpForNodeProperties , that was last modified by NetBeans user Jhavlin on 2011-12-13T16:35:20Z.
NOTE: This document was automatically converted to the AsciiDoc format on 2018-02-07, and needs to be reviewed.