Package org.eclipse.help.webapp
Class AbstractButton
java.lang.Object
org.eclipse.help.webapp.AbstractButton
- All Implemented Interfaces:
Comparable<AbstractButton>
A class which contributes a button to the help webapp
- Since:
- 3.5
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Toolbar name for bookmarksstatic final String
The state of a button which is hiddenstatic final String
The state of a button which is visible and depressedstatic final String
The state of a button which is visible but not depressedstatic final String
Toolbar name for the content pane, which shows help pagesstatic final String
Toolbar name for the keyword indexstatic final String
Toolbar name for search resultsstatic final String
Toolbar name for the table of contents -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal int
abstract String
a JavaScript function which will be called when the button is pressedabstract String
getId()
Gets the id which will be assigned to the image of the button in the generated HTMLabstract String
Get the location of the a javascript file to be included in any jsp file which uses this buttongetState()
Get the state of a buttonabstract String
getTooltip
(Locale locale) A user visible description of the button which will appear in the tooltipboolean
isAddedToToolbar
(String toolbarName) Determines whether this button should be true if the button should be added to particular toolbar
-
Field Details
-
BUTTON_OUT
The state of a button which is visible but not depressed- See Also:
-
BUTTON_IN
The state of a button which is visible and depressed- See Also:
-
BUTTON_HIDDEN
The state of a button which is hidden- See Also:
-
CONTENT_TOOLBAR
Toolbar name for the content pane, which shows help pages- See Also:
-
TOC_TOOLBAR
Toolbar name for the table of contents- See Also:
-
INDEX_TOOLBAR
Toolbar name for the keyword index- See Also:
-
SEARCH_TOOLBAR
Toolbar name for search results- See Also:
-
BOOKMARKS_TOOLBAR
Toolbar name for bookmarks- See Also:
-
-
Constructor Details
-
AbstractButton
public AbstractButton()
-
-
Method Details
-
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
- Returns:
- a URL relative to /help which is the location of the 16x16 image icon which will appear in the tab
-
getTooltip
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
a JavaScript function which will be called when the button is pressed- Returns:
- the name of a JavaScript function
-
getState
Get the state of a button- Returns:
- one of
BUTTON_OUT
,BUTTON_IN
, orBUTTON_HIDDEN
.
-
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
null
if there.
-
isAddedToToolbar
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
- Specified by:
compareTo
in interfaceComparable<AbstractButton>
- Since:
- 3.7
-