Class RadianceProgressBarUI


  • public class RadianceProgressBarUI
    extends javax.swing.plaf.basic.BasicProgressBarUI
    UI for progress bars in Radiance look and feel.
    • Field Detail

      • animationPosition

        private float animationPosition
        The current position of the indeterminate animation's cycle. 0, the initial value, means paint the first frame. When the progress bar is indeterminate and showing, the indeterminateLoopTimeline is updating this value.
      • radianceValueChangeListener

        private javax.swing.event.ChangeListener radianceValueChangeListener
        Value change listener on the associated progress bar.
      • radiancePropertyChangeListener

        private java.beans.PropertyChangeListener radiancePropertyChangeListener
        Property change listener. Tracks changes to the font property.
      • margin

        private int margin
        Inner margin.
      • displayedValue

        private int displayedValue
      • displayTimeline

        private Timeline displayTimeline
      • indeterminateLoopTimeline

        private Timeline indeterminateLoopTimeline
    • Constructor Detail

      • RadianceProgressBarUI

        protected RadianceProgressBarUI()
    • Method Detail

      • createUI

        public static javax.swing.plaf.ComponentUI createUI​(javax.swing.JComponent comp)
      • installDefaults

        protected void installDefaults()
        Overrides:
        installDefaults in class javax.swing.plaf.basic.BasicProgressBarUI
      • installListeners

        protected void installListeners()
        Overrides:
        installListeners in class javax.swing.plaf.basic.BasicProgressBarUI
      • uninstallListeners

        protected void uninstallListeners()
        Overrides:
        uninstallListeners in class javax.swing.plaf.basic.BasicProgressBarUI
      • drawStripe1X

        private void drawStripe1X​(java.awt.Graphics2D g,
                                  int baseSize,
                                  java.awt.Color color)
      • drawDeterminateBackground

        private void drawDeterminateBackground​(java.awt.Graphics2D g,
                                               javax.swing.JProgressBar bar,
                                               int width,
                                               int height,
                                               RadianceColorScheme scheme,
                                               RadianceFillPainter fillPainter,
                                               int orientation)
      • drawDeterminateProgress

        private void drawDeterminateProgress​(java.awt.Graphics2D g,
                                             javax.swing.JProgressBar bar,
                                             int width,
                                             int height,
                                             boolean isFull,
                                             RadianceColorScheme scheme,
                                             RadianceFillPainter fillPainter,
                                             int orientation,
                                             java.awt.ComponentOrientation componentOrientation)
      • paintDeterminate

        public void paintDeterminate​(java.awt.Graphics g,
                                     javax.swing.JComponent c)
        Overrides:
        paintDeterminate in class javax.swing.plaf.basic.BasicProgressBarUI
      • getSelectionBackground

        protected java.awt.Color getSelectionBackground()
        Overrides:
        getSelectionBackground in class javax.swing.plaf.basic.BasicProgressBarUI
      • getSelectionForeground

        protected java.awt.Color getSelectionForeground()
        Overrides:
        getSelectionForeground in class javax.swing.plaf.basic.BasicProgressBarUI
      • paintRectangularStripedBackground

        private void paintRectangularStripedBackground​(java.awt.Graphics g,
                                                       int startX,
                                                       int startY,
                                                       int width,
                                                       int height,
                                                       RadianceColorScheme colorScheme,
                                                       int stripeOffset,
                                                       float borderAlpha,
                                                       boolean isVertical)
      • paintIndeterminate

        public void paintIndeterminate​(java.awt.Graphics g,
                                       javax.swing.JComponent c)
        Overrides:
        paintIndeterminate in class javax.swing.plaf.basic.BasicProgressBarUI
      • getBox

        protected java.awt.Rectangle getBox​(java.awt.Rectangle r)
        Overrides:
        getBox in class javax.swing.plaf.basic.BasicProgressBarUI
      • startAnimationTimer

        protected void startAnimationTimer()
        Overrides:
        startAnimationTimer in class javax.swing.plaf.basic.BasicProgressBarUI
      • stopAnimationTimer

        protected void stopAnimationTimer()
        Overrides:
        stopAnimationTimer in class javax.swing.plaf.basic.BasicProgressBarUI
      • getAmountFull

        protected int getAmountFull​(java.awt.Insets b,
                                    int width,
                                    int height)
        Overrides:
        getAmountFull in class javax.swing.plaf.basic.BasicProgressBarUI
      • getPreferredInnerHorizontal

        protected java.awt.Dimension getPreferredInnerHorizontal()
        Overrides:
        getPreferredInnerHorizontal in class javax.swing.plaf.basic.BasicProgressBarUI
      • getPreferredInnerVertical

        protected java.awt.Dimension getPreferredInnerVertical()
        Overrides:
        getPreferredInnerVertical in class javax.swing.plaf.basic.BasicProgressBarUI
      • paintString

        protected void paintString​(java.awt.Graphics g,
                                   int x,
                                   int y,
                                   int width,
                                   int height,
                                   int amountFull,
                                   java.awt.Insets b)
        Overrides:
        paintString in class javax.swing.plaf.basic.BasicProgressBarUI
      • paintString

        private void paintString​(java.awt.Graphics g,
                                 int x,
                                 int y,
                                 int width,
                                 int height,
                                 int fillStart,
                                 int amountFull)
        Paints the progress string.
        Parameters:
        g - Graphics used for drawing.
        x - x location of bounding box
        y - y location of bounding box
        width - width of bounding box
        height - height of bounding box
        fillStart - start location, in x or y depending on orientation, of the filled portion of the progress bar.
        amountFull - size of the fill region, either width or height depending upon orientation.
      • getStringRectangle

        private java.awt.Rectangle getStringRectangle​(java.lang.String progressString,
                                                      int x,
                                                      int y,
                                                      int width,
                                                      int height)
        Returns the rectangle for the progress bar string.
        Parameters:
        progressString - Progress bar string.
        x - x location of bounding box
        y - y location of bounding box
        width - width of bounding box
        height - height of bounding box
        Returns:
        The rectangle for the progress bar string.
      • update

        public void update​(java.awt.Graphics g,
                           javax.swing.JComponent c)
        Overrides:
        update in class javax.swing.plaf.ComponentUI