Class JSiteButton

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, SwingConstants

public class JSiteButton extends JButton
A button looking like the jAlbum.net site buttons as they were introduced in September 2009. These buttons have a rounded border, and transparent background. When hovered, the background becomes filled. The rounded border and background are painted in the background color
Since:
8.4
See Also:
  • Field Details

    • showLabel

      protected boolean showLabel
      If set to false, pass label to tool tip instead
    • mouseOver

      protected boolean mouseOver
    • mousePressed

      protected boolean mousePressed
  • Constructor Details

    • JSiteButton

      public JSiteButton()
    • JSiteButton

      public JSiteButton(String text, Icon icon)
    • JSiteButton

      public JSiteButton(Action a)
    • JSiteButton

      public JSiteButton(Action a, boolean showLabel)
    • JSiteButton

      public JSiteButton(String text)
    • JSiteButton

      public JSiteButton(Icon icon)
  • Method Details

    • updateUI

      public void updateUI()
      Overrides:
      updateUI in class JButton
    • isShowLabel

      public boolean isShowLabel()
    • setShowLabel

      public void setShowLabel(boolean showLabel)
    • setUI

      public void setUI(ButtonUI newUI)
      Switching L&F sometimes sets an awfully wide border, so fix the first UI set
      Overrides:
      setUI in class AbstractButton
    • isBorderPainted

      public boolean isBorderPainted()
      Overrides:
      isBorderPainted in class AbstractButton
    • setBorderPainted

      public void setBorderPainted(boolean b)
      Overrides:
      setBorderPainted in class AbstractButton
    • paintComponent

      protected void paintComponent(Graphics g2d)
      Overrides:
      paintComponent in class JComponent
    • getBorderRadius

      public int getBorderRadius()
    • setBorderRadius

      public void setBorderRadius(int borderRadius)
    • setText

      public void setText(String text)
      Overrides:
      setText in class AbstractButton