Class PlasticArrowButton

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, SwingConstants
Direct Known Subclasses:
PlasticSpinnerUI.SpinnerArrowButton, PlasticXPSpinnerUI.SpinnerXPArrowButton

class PlasticArrowButton extends MetalScrollButton
Renders the arrow buttons in scroll bars and spinners.
Version:
$Revision: 1.10 $
  • Field Details

    • shadowColor

      private final Color shadowColor
    • highlightColor

      private final Color highlightColor
    • isFreeStanding

      protected boolean isFreeStanding
  • Constructor Details

    • PlasticArrowButton

      public PlasticArrowButton(int direction, int width, boolean freeStanding)
  • Method Details

    • setFreeStanding

      public void setFreeStanding(boolean freeStanding)
      Overrides:
      setFreeStanding in class MetalScrollButton
    • paint

      public void paint(Graphics g)
      Overrides:
      paint in class MetalScrollButton
    • calculateArrowHeight

      protected int calculateArrowHeight(int height, int width)
      Computes and returns the arrow height based on the specified buttons height and width.
      Parameters:
      height - the height of the button to be used for calculation.
      width - the width of the button to be used for calculation.
      Returns:
      the height of the arrow
    • calculateArrowOffset

      protected int calculateArrowOffset()
    • isPaintingNorthBottom

      protected boolean isPaintingNorthBottom()
    • paintWest

      private void paintWest(Graphics g, boolean isEnabled, Color arrowColor, boolean isPressed, int width, int height, int w, int h, int arrowHeight)
    • paintEast

      private void paintEast(Graphics g, boolean isEnabled, Color arrowColor, boolean isPressed, int width, int height, int w, int h, int arrowHeight)
    • paintSouth

      protected void paintSouth(Graphics g, boolean leftToRight, boolean isEnabled, Color arrowColor, boolean isPressed, int width, int height, int w, int h, int arrowHeight, int arrowOffset)
    • paintNorth

      protected void paintNorth(Graphics g, boolean leftToRight, boolean isEnabled, Color arrowColor, boolean isPressed, int width, int height, int w, int h, int arrowHeight, int arrowOffset, boolean paintBottom)
    • paint3D

      private void paint3D(Graphics g)