Class JGlassButton

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

public class JGlassButton extends JButton
A button looking with semi-transparent background, much like the jAlbum.net site buttons which show as users hover the mouse over images. These buttons have a rounded border When hovered, the background becomes filled totally. The rounded border and background are painted in the background color
Since:
8.4.2
See Also:
  • Field Details

    • mouseOver

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

      protected boolean mousePressed
  • Constructor Details

    • JGlassButton

      public JGlassButton(String text, Icon icon)
    • JGlassButton

      public JGlassButton(Action a)
    • JGlassButton

      public JGlassButton(String text)
    • JGlassButton

      public JGlassButton(Icon icon)
    • JGlassButton

      public JGlassButton()
  • Method Details

    • updateUI

      public void updateUI()
      Switching L&F sometimes sets an awfully wide border, so fix the first UI set
      Overrides:
      updateUI in class JButton
    • setIcon

      public void setIcon(Icon defaultIcon)
      Overrides:
      setIcon in class AbstractButton
    • setVisible

      public void setVisible(boolean visible)
      Overrides:
      setVisible in class JComponent
    • paintComponent

      protected void paintComponent(Graphics gin)
      Overrides:
      paintComponent in class JComponent
    • isDiscrete

      public boolean isDiscrete()
    • setDiscrete

      public void setDiscrete(boolean discrete)
    • getBorderRadius

      public int getBorderRadius()
    • setBorderRadius

      public void setBorderRadius(int borderRadius)
    • getBorderOpacity

      public float getBorderOpacity()
    • setBorderOpacity

      public void setBorderOpacity(float borderOpacity)