Class ToolButton

All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, ActionControl, ButtonControl, Component, Control, InputFocusableComponent, LabelDisplayableComponent, ToolButtonControl, ActionListenable, ActionModel, Displayable, Enableable, InfoModel, LabelModel, Model, PresentationModel, DepictedObject

public class ToolButton extends AbstractButtonControl implements ToolButtonControl
Control with an action model rendered as a tool button. Tool buttons are typically presented on toolbars and rendered differently than a normal button; they usually are more subtle and may only present button decorations upon certain gestures such as mouse overs.
Author:
Garret Wilson
  • Constructor Details

    • ToolButton

      public ToolButton()
      Default constructor.
    • ToolButton

      public ToolButton(String label)
      Label constructor.
      Parameters:
      label - The text of the label, or null if there should be no label.
    • ToolButton

      public ToolButton(String label, URI icon)
      Label and icon constructor.
      Parameters:
      label - The text of the label, or null if there should be no label.
      icon - The icon URI, which may be a resource URI, or null if there is no icon URI.
    • ToolButton

      public ToolButton(InfoModel infoModel, ActionModel actionModel, Enableable enableable)
      Info model, action model, and enableable object constructor.
      Parameters:
      infoModel - The component info model.
      actionModel - The component action model.
      enableable - The enableable object in which to store enabled status.
      Throws:
      NullPointerException - if the given info model, action model, and/or enableable object is null.
    • ToolButton

      public ToolButton(ActionPrototype actionPrototype)
      Prototype constructor.
      Parameters:
      actionPrototype - The prototype on which this component should be based.
      Throws:
      NullPointerException - if the given prototype is null.