1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
package wg.view.tabs;
import java.awt.BorderLayout;
@SuppressWarnings("serial")
public class Aide extends JPanel {
private MainView owner;
private HelpBroker hb =null;
private HelpSet hs;
public Aide (MainView mainView){
this.owner = mainView;
this.hb=null;
this.hs = this.getHelpSet("aide.hs");
this.hb = this.hs.createHelpBroker();
this.setLayout(new BorderLayout(0, 0));
JHelp OJavaHelp = new JHelp(this.hs);
OJavaHelp.setBounds(0, 0, 500, 500);
this.add(OJavaHelp);
this.revalidate();
this.repaint();
}
public HelpSet getHelpSet(String helpsetfile) {
HelpSet hs = null;
ClassLoader cl = this.getClass().getClassLoader();
try {
java.net.URL hsURL = HelpSet.findHelpSet(cl, helpsetfile);
hs = new HelpSet(null, hsURL);
} catch(Exception ee) {
System.out.println("HelpSet: "+ee.getMessage());
System.out.println("HelpSet: "+ helpsetfile + " non trouvé");
}
return hs;
}
} |
Partager