Class GraffitiButtonGroup

java.lang.Object
org.graffiti.editor.GraffitiButtonGroup

public class GraffitiButtonGroup
extends Object
Represents a button group.
Version:
$Revision: 1.5 $
  • Constructor Details

    • GraffitiButtonGroup

      public GraffitiButtonGroup()
      Creates a new GraffitiButtonGroup object.
  • Method Details

    • getButtonCount

      public int getButtonCount()
      Returns the number of buttons in the group.
      Returns:
      the button count
    • getElements

      public Enumeration<?> getElements()
      Returns all the buttons that are participating in this GraffitiButtonGroup.
      Returns:
      an Enumeration of the buttons in this group
    • setSelected

      public void setSelected​(ButtonModel m, boolean b)
      Sets the selected value for the ButtonModel. Only one button in the group may be selected at a time.
      Parameters:
      m - ButtonModel
      b - true if this button is to be selected, otherwise false
    • isSelected

      public boolean isSelected​(ButtonModel m)
      Returns whether a ButtonModel is selected.
      Parameters:
      m - DOCUMENT ME!
      Returns:
      true if the button is selected, otherwise returns false
    • getSelection

      public ButtonModel getSelection()
      Returns the model of the selected button.
      Returns:
      the selected button model
    • addButton

      public void addButton​(ToolButton button)
      Adds the given button to the button group.
      Parameters:
      button - the button to add to the group.
    • remove

      public void remove​(ToolButton button)
      Removes the button from the group.
      Parameters:
      button - the button to be removed