How to display a help page inside a plugin?

Have jReality programming problems or questions? Post them here.
Post Reply
fausto
Posts: 5
Joined: Sun 12. Apr 2015, 21:30

How to display a help page inside a plugin?

Post by fausto » Tue 4. Aug 2015, 21:03

Hi folks

How can one implement functionality to display a custom help page when the '?' icon in the header plugin is clicked?

In the developer's tutorial the section"Adding a help page ("http://www3.math.tu-berlin.de/jreality/ ... &redlink=1) is not available.

Also, I saw that the demo app "Schatz Cube" (http://page.math.tu-berlin.de/~gunn/web ... zCube.jnlp) can display a help page when clicking in the '?' icon in the plugin header. It would be great if I could read the source code to learn how this is done, but it is not available. If anyone has it could you please share it?

Thanks a lot!

MarcelP
Posts: 15
Joined: Mon 15. Dec 2014, 12:20

Re: How to display a help page inside a plugin?

Post by MarcelP » Wed 9. Mar 2016, 20:12

For example in the ContentAppearance plugin you can find this:

@Override
public PluginInfo getPluginInfo() {
PluginInfo info = new PluginInfo();
info.name = "Content Appearance";
info.vendorName = "Ulrich Pinkall";
info.icon = ImageHook.getIcon("lupeblau.png");
return info;
}

@Override
public String getHelpDocument() {
return "ContentAppearance.html"; // this is the help page written in html.
}

@Override
public String getHelpPath() {
return "/de/jreality/plugin/help/"; // This is the location of the ContentAppearance.html folder
}

@Override
public Class<?> getHelpHandle() {
return getClass();
}

Post Reply