Skip to main content
summaryrefslogtreecommitdiffstats
blob: 7714ed34015ad582084ce8daa6a47ccd27e86853 (plain) (blame)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*******************************************************************************
 * Copyright (c) 2009, 2015 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

package org.eclipse.help.webapp;

import java.util.Locale;

/**
 * A view which contributes a view to the help webapp
 * @since 3.5
 */

public abstract class AbstractView {

	/**
	 *
	 * @return a non translated name which is root name of the
	 * View and Toolbar jsp files used in this view. For example if the name
	 * is toc the help system will look for the files tocView.jsp
	 * and tocToolbar.jsp
	 */
    public abstract String getName();

    /**
     * @return a URL path, relative to /help which is the
     * location of the jsp files in the advanced presentation
     */
    public abstract String getURL();

    /**
     * @return a URL path, relative to /help which is the
     * location of the jsp files in the basic presentation
     */
    public String getBasicURL() {
    	return getURL();
    }

    /**
     * @return a URL relative to /help which is the location
     * of the 16x16 image icon which will appear in the tab
     */
    public abstract String getImageURL();

    /**
     * @return a character which can be used as an accesskey to
     * navigate directly to this view, or (char)0 if no
     * acceskey is specified
     */
    public abstract char getKey();

    /**
     * Used to allow for views whose loading is deferred until
     * their contents are visible
     * @return true if this view has deferred loading
     */
    public boolean isDeferred() {
    	return false;
    }

    /**
     * A user visible title for the view which will appear in the tooltip
     * @param locale the locale of the client
     * @return the tooltip text to be used in this locale
     */
    public abstract String getTitle(Locale locale);

    /**
     * @return true if the view should be shown in the advanced presentation
     */
    public boolean isVisible() {
        return true;
    }

    /**
     * @return true if the view should be shown in the basic presentation
     */
    public boolean isVisibleBasic() {
        return true;
    }

}

Back to the top