KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > api > javahelp > Help


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.api.javahelp;
21
22 import javax.swing.event.ChangeListener JavaDoc;
23
24
25 import org.openide.util.HelpCtx;
26
27 /** An implementation of the JavaHelp system.
28 * Get the concrete instance using lookup.
29 * @author Jaroslav Tulach, Jesse Glick
30 */

31 public abstract class Help {
32
33     /** constructor for subclasses
34      */

35     protected Help() {}
36
37     /** Test whether a given ID is valid in some known helpset.
38      * In lazy mode, should be a fast operation; if in doubt say you do not know.
39      * @param id the ID to check for validity
40      * @param force if false, do not do too much work (be lazy) and if necessary return null;
41      * if true, must return non-null (meaning the call may block loading helpsets)
42      * @return whether it is valid, if this is known; else may be null (only permitted when force is false)
43      */

44     public abstract Boolean JavaDoc isValidID(String JavaDoc id, boolean force);
45     
46     /** Shows help.
47      * @param ctx help context
48      */

49     public void showHelp(HelpCtx ctx) {
50         showHelp(ctx, /* #15711 */true);
51     }
52
53     /** Shows help.
54      * @param ctx help context
55      * @param showmaster whether to force the master helpset
56      * to be shown (full navigators) even
57      * though the supplied ID only applies
58      * to one subhelpset
59      */

60     public abstract void showHelp(HelpCtx ctx, boolean showmaster);
61
62     /** Add a change listener for when help sets change.
63      * @param l the listener to add
64      */

65     public abstract void addChangeListener(ChangeListener JavaDoc l);
66     
67     /** Remove a change listener.
68      * @param l the listener to remove
69      */

70     public abstract void removeChangeListener(ChangeListener JavaDoc l);
71
72 }
73
Popular Tags