Package org.eclipse.help.webapp
Class AbstractButton
- java.lang.Object
-
- org.eclipse.help.webapp.AbstractButton
-
- All Implemented Interfaces:
java.lang.Comparable<AbstractButton>
public abstract class AbstractButton extends java.lang.Object implements java.lang.Comparable<AbstractButton>
A class which contributes a button to the help webapp- Since:
- 3.5
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBOOKMARKS_TOOLBARToolbar name for bookmarksstatic java.lang.StringBUTTON_HIDDENThe state of a button which is hiddenstatic java.lang.StringBUTTON_INThe state of a button which is visible and depressedstatic java.lang.StringBUTTON_OUTThe state of a button which is visible but not depressedstatic java.lang.StringCONTENT_TOOLBARToolbar name for the content pane, which shows help pagesstatic java.lang.StringINDEX_TOOLBARToolbar name for the keyword indexstatic java.lang.StringSEARCH_TOOLBARToolbar name for search resultsstatic java.lang.StringTOC_TOOLBARToolbar name for the table of contents
-
Constructor Summary
Constructors Constructor Description AbstractButton()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intcompareTo(AbstractButton o)abstract java.lang.StringgetAction()a JavaScript function which will be called when the button is pressedabstract java.lang.StringgetId()Gets the id which will be assigned to the image of the button in the generated HTMLabstract java.lang.StringgetImageURL()java.lang.StringgetJavaScriptURL()Get the location of the a javascript file to be included in any jsp file which uses this buttonjava.lang.StringgetState()Get the state of a buttonabstract java.lang.StringgetTooltip(java.util.Locale locale)A user visible description of the button which will appear in the tooltipbooleanisAddedToToolbar(java.lang.String toolbarName)Determines whether this button should be true if the button should be added to particular toolbar
-
-
-
Field Detail
-
BUTTON_OUT
public static final java.lang.String BUTTON_OUT
The state of a button which is visible but not depressed- See Also:
- Constant Field Values
-
BUTTON_IN
public static final java.lang.String BUTTON_IN
The state of a button which is visible and depressed- See Also:
- Constant Field Values
-
BUTTON_HIDDEN
public static final java.lang.String BUTTON_HIDDEN
The state of a button which is hidden- See Also:
- Constant Field Values
-
CONTENT_TOOLBAR
public static final java.lang.String CONTENT_TOOLBAR
Toolbar name for the content pane, which shows help pages- See Also:
- Constant Field Values
-
TOC_TOOLBAR
public static final java.lang.String TOC_TOOLBAR
Toolbar name for the table of contents- See Also:
- Constant Field Values
-
INDEX_TOOLBAR
public static final java.lang.String INDEX_TOOLBAR
Toolbar name for the keyword index- See Also:
- Constant Field Values
-
SEARCH_TOOLBAR
public static final java.lang.String SEARCH_TOOLBAR
Toolbar name for search results- See Also:
- Constant Field Values
-
BOOKMARKS_TOOLBAR
public static final java.lang.String BOOKMARKS_TOOLBAR
Toolbar name for bookmarks- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
public abstract java.lang.String getId()
Gets the id which will be assigned to the image of the button in the generated HTML- Returns:
- a string that consists of alphanumeric characters only with no spaces
-
getImageURL
public abstract java.lang.String getImageURL()
- Returns:
- a URL relative to /help which is the location of the 16x16 image icon which will appear in the tab
-
getTooltip
public abstract java.lang.String getTooltip(java.util.Locale locale)
A user visible description of the button which will appear in the tooltip- Parameters:
locale- the locale of the client- Returns:
- the tooltip text to be used in this locale
-
getAction
public abstract java.lang.String getAction()
a JavaScript function which will be called when the button is pressed- Returns:
- the name of a JavaScript function
-
getState
public java.lang.String getState()
Get the state of a button- Returns:
- one of
BUTTON_OUT,BUTTON_IN, orBUTTON_HIDDEN.
-
getJavaScriptURL
public java.lang.String getJavaScriptURL()
Get the location of the a javascript file to be included in any jsp file which uses this button- Returns:
- a URL path, relative to /help or
nullif there.
-
isAddedToToolbar
public boolean isAddedToToolbar(java.lang.String toolbarName)
Determines whether this button should be true if the button should be added to particular toolbar- Parameters:
toolbarName- Name of the toolbar.- Returns:
- true
-
compareTo
public final int compareTo(AbstractButton o)
- Specified by:
compareToin interfacejava.lang.Comparable<AbstractButton>- Since:
- 3.7
-
-