Class Toggle

All Implemented Interfaces:
IFigure
Direct Known Subclasses:
CheckBox, ToggleButton

public class Toggle extends Clickable
Basic Rule for Toggle: Whoever creates the toggle is reponsible for response changes for it (selection, rollover, etc). Only CheckBox does its own listening.
  • Constructor Details

    • Toggle

      public Toggle()
      Constructs a Toggle with no text or icon.
      Since:
      2.0
    • Toggle

      public Toggle(String text, Image icon)
      Constructs a Toggle with passed text and icon
      Parameters:
      text - the text
      icon - the icon
      Since:
      2.0
    • Toggle

      public Toggle(IFigure contents)
      Constructs a Toggle with passed IFigure as its contents.
      Parameters:
      contents - the contents
      Since:
      2.0
    • Toggle

      public Toggle(IFigure contents, int style)
      Constructs a Toggle with the passed figure as its contents and the given style.
      Parameters:
      contents - the contents
      style - the style