Class AbstractButton

java.lang.Object
org.eclipse.help.webapp.AbstractButton
All Implemented Interfaces:
Comparable<AbstractButton>

public abstract class AbstractButton extends Object implements Comparable<AbstractButton>
A class which contributes a button to the help webapp
Since:
3.5
  • Field Details

  • Constructor Details

    • AbstractButton

      public AbstractButton()
  • Method Details

    • getId

      public abstract 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 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 String getTooltip(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 String getAction()
      a JavaScript function which will be called when the button is pressed
      Returns:
      the name of a JavaScript function
    • getState

      public String getState()
      Get the state of a button
      Returns:
      one of BUTTON_OUT, BUTTON_IN, or BUTTON_HIDDEN.
    • getJavaScriptURL

      public 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 null if there.
    • isAddedToToolbar

      public boolean isAddedToToolbar(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:
      compareTo in interface Comparable<AbstractButton>
      Since:
      3.7