Class Tooltip.Button

java.lang.Object
overit.geocall.ui.Tooltip.Button
All Implemented Interfaces:
Serializable
Enclosing class:
Tooltip

public static class Tooltip.Button extends Object implements Serializable
The class implements a clickable button that can be added to the tooltip
See Also:
  • Field Details

    • _label

      protected String _label
    • _icon

      protected Icon _icon
    • _event

      protected String _event
    • _id

      protected String _id
    • _param

      protected String _param
    • _msg

      protected String _msg
    • _prompt

      protected String _prompt
    • promptEmpty

      protected boolean promptEmpty
    • _default

      protected boolean _default
  • Constructor Details

    • Button

      public Button(String label, String icon, String event)
      Creates a button
      Parameters:
      label - The label associated to the button
      icon - The icon associated to the button
      event - The event triggered when the user clicks on the button
  • Method Details

    • setTarget

      public Tooltip.Button setTarget(String target)
      Sets the target for the event of the button
      Parameters:
      target - The desired id of the object that must be used as target for the event
      Returns:
      The button with the given target
    • setParams

      public Tooltip.Button setParams(String param, String msg, String prompt)
      Sets the parameters for the button
      Parameters:
      param - The parameters passed to the event associated to the button
      msg - The string that appears as a message whe the user clicks the button
      prompt - The string that appears as a prompt when the user clicks the button
      Returns:
      The button with the given parameters
    • setDefault

      public Tooltip.Button setDefault()
      Indicates that the button is the default one. The default button has the focus set when the tooltip is showed, so the user can trigger the event associated to the button by just press the enter key
      Returns:
      The button with the default focus attribute
    • setPromptEmpty

      public Tooltip.Button setPromptEmpty(String s)
      Sets if the value returned by the prompt can be an empty string ""
      Parameters:
      s - true if you want to allow to return an empty value by the prompt, false otherwise.
      Returns:
      The button with the given parameters