Class FlatArrowButton

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, UIResource, SwingConstants
Direct Known Subclasses:
FlatComboBoxUI.FlatComboBoxButton, FlatPopupMenuUI.FlatPopupScroller.ArrowButton, FlatScrollBarUI.FlatScrollBarButton, FlatSplitPaneUI.FlatSplitPaneDivider.FlatOneTouchButton, FlatTabbedPaneUI.FlatTabAreaButton

public class FlatArrowButton extends BasicArrowButton implements UIResource
Button that draws a scaled arrow in one direction.
See Also:
  • Field Details

    • DEFAULT_ARROW_WIDTH

      public static final int DEFAULT_ARROW_WIDTH
      See Also:
    • chevron

      protected boolean chevron
    • foreground

      protected Color foreground
    • disabledForeground

      protected Color disabledForeground
    • hoverForeground

      protected Color hoverForeground
    • hoverBackground

      protected Color hoverBackground
    • pressedForeground

      protected Color pressedForeground
    • pressedBackground

      protected Color pressedBackground
    • arrowWidth

      private int arrowWidth
    • arrowThickness

      private float arrowThickness
    • xOffset

      private float xOffset
    • yOffset

      private float yOffset
    • roundBorderAutoXOffset

      private boolean roundBorderAutoXOffset
    • hover

      private boolean hover
    • pressed

      private boolean pressed
  • Constructor Details

    • FlatArrowButton

      public FlatArrowButton(int direction, String type, Color foreground, Color disabledForeground, Color hoverForeground, Color hoverBackground, Color pressedForeground, Color pressedBackground)
  • Method Details

    • updateStyle

      public void updateStyle(String type, Color foreground, Color disabledForeground, Color hoverForeground, Color hoverBackground, Color pressedForeground, Color pressedBackground)
      Since:
      2
    • getArrowWidth

      public int getArrowWidth()
    • setArrowWidth

      public void setArrowWidth(int arrowWidth)
    • getArrowThickness

      public float getArrowThickness()
      Since:
      3
    • setArrowThickness

      public void setArrowThickness(float arrowThickness)
      Since:
      3
    • isHover

      protected boolean isHover()
    • isPressed

      protected boolean isPressed()
    • getXOffset

      public float getXOffset()
    • setXOffset

      public void setXOffset(float xOffset)
    • getYOffset

      public float getYOffset()
    • setYOffset

      public void setYOffset(float yOffset)
    • isRoundBorderAutoXOffset

      public boolean isRoundBorderAutoXOffset()
      Since:
      3
    • setRoundBorderAutoXOffset

      public void setRoundBorderAutoXOffset(boolean roundBorderAutoXOffset)
      Since:
      3
    • deriveBackground

      protected Color deriveBackground(Color background)
    • deriveForeground

      protected Color deriveForeground(Color foreground)
    • getArrowColor

      protected Color getArrowColor()
      Returns the color used to paint the arrow.
      Since:
      1.2
    • getPreferredSize

      public Dimension getPreferredSize()
      Overrides:
      getPreferredSize in class BasicArrowButton
    • getMinimumSize

      public Dimension getMinimumSize()
      Overrides:
      getMinimumSize in class BasicArrowButton
    • paint

      public void paint(Graphics g)
      Overrides:
      paint in class BasicArrowButton
    • paintBackground

      protected void paintBackground(Graphics2D g)
    • paintArrow

      protected void paintArrow(Graphics2D g)