Class ModernTheme.FilterChip

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, SwingConstants
Enclosing class:
ModernTheme

public static class ModernTheme.FilterChip extends JButton
Rule Studio–style filter chip: JButton with active state and rounded rect paint. Use for filter bars (All / Assigned / etc.) or tab strips (Auto Spec / Hotkeys / etc.).
  • Constructor Details

    • FilterChip

      public FilterChip(String text, boolean active)
      Parameters:
      active - whether the chip starts in the active (highlighted) state
  • Method Details

    • setActive

      public void setActive(boolean active)
      Highlights or clears the chip; callers keep one chip in a group active themselves.
    • isActive

      public boolean isActive()
      Whether the chip is highlighted.
    • paintComponent

      protected void paintComponent(Graphics g)
      Paints the active outline or hover fill, then the text.
      Overrides:
      paintComponent in class JComponent