Class PinToolSplitButton

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class PinToolSplitButton extends JPanel
A split-button component for the Pin Tool that combines a toggle button with a color button. The toggle button activates the pin tool, and the color button shows the current color and allows selecting a new color for pins.
See Also:
  • Field Details

  • Constructor Details

    • PinToolSplitButton

      public PinToolSplitButton(Action action)
      Creates a new PinToolSplitButton with the given action.
      Parameters:
      action - the action to be performed when the toggle button is clicked
  • Method Details

    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener listener)
      Adds a property change listener.
      Overrides:
      addPropertyChangeListener in class Container
      Parameters:
      listener - the listener to add
    • addPropertyChangeListener

      public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
      Adds a property change listener for the specified property.
      Overrides:
      addPropertyChangeListener in class Container
      Parameters:
      propertyName - the name of the property to listen on
      listener - the listener to add
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener listener)
      Removes a property change listener.
      Overrides:
      removePropertyChangeListener in class Component
      Parameters:
      listener - the listener to remove
    • removePropertyChangeListener

      public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
      Removes a property change listener for the specified property.
      Overrides:
      removePropertyChangeListener in class Component
      Parameters:
      propertyName - the name of the property that was listened on
      listener - the listener to remove
    • getCurrentColor

      public Color getCurrentColor()
      Gets the current color.
      Returns:
      the current color