Class RadianceProgressBarUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ProgressBarUI
javax.swing.plaf.basic.BasicProgressBarUI
org.pushingpixels.radiance.theming.internal.ui.RadianceProgressBarUI
UI for progress bars in Radiance look and feel.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final class
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicProgressBarUI
BasicProgressBarUI.ChangeHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate float
The current position of the indeterminate animation's cycle.private int
private Timeline
private Timeline
private int
Inner margin.private static final RadianceFillPainter
private PropertyChangeListener
Property change listener.private ChangeListener
Value change listener on the associated progress bar.Fields inherited from class javax.swing.plaf.basic.BasicProgressBarUI
boxRect, changeListener, progressBar
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentUI
createUI
(JComponent comp) private void
drawDeterminateBackground
(Graphics2D g, JProgressBar bar, int width, int height, RadianceColorScheme scheme, RadianceFillPainter fillPainter, int orientation) private void
drawDeterminateProgress
(Graphics2D g, JProgressBar bar, int width, int height, boolean isFull, RadianceColorScheme scheme, RadianceFillPainter fillPainter, int orientation, ComponentOrientation componentOrientation) private void
drawStripe1X
(Graphics2D g, int baseSize, Color color) protected int
getAmountFull
(Insets b, int width, int height) protected Rectangle
private ComponentState
protected Dimension
protected Dimension
private ComponentState
protected Color
protected Color
private Rectangle
getStringRectangle
(String progressString, int x, int y, int width, int height) Returns the rectangle for the progress bar string.protected void
protected void
void
void
private void
paintRectangularStripedBackground
(Graphics g, int startX, int startY, int width, int height, RadianceColorScheme colorScheme, int stripeOffset, float borderAlpha, boolean isVertical) private void
paintString
(Graphics g, int x, int y, int width, int height, int fillStart, int amountFull) Paints the progress string.protected void
paintString
(Graphics g, int x, int y, int width, int height, int amountFull, Insets b) protected void
protected void
protected void
void
update
(Graphics g, JComponent c) Methods inherited from class javax.swing.plaf.basic.BasicProgressBarUI
getAnimationIndex, getBaseline, getBaselineResizeBehavior, getBoxLength, getCellLength, getCellSpacing, getFrameCount, getMaximumSize, getMinimumSize, getPreferredSize, getStringPlacement, incrementAnimationIndex, installUI, paint, setAnimationIndex, setCellLength, setCellSpacing, uninstallDefaults, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
-
Field Details
-
progressFillPainter
-
animationPosition
private float animationPositionThe 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, theindeterminateLoopTimeline
is updating this value. -
radianceValueChangeListener
Value change listener on the associated progress bar. -
radiancePropertyChangeListener
Property change listener. Tracks changes to thefont
property. -
margin
private int marginInner margin. -
displayedValue
private int displayedValue -
displayTimeline
-
indeterminateLoopTimeline
-
-
Constructor Details
-
RadianceProgressBarUI
protected RadianceProgressBarUI()
-
-
Method Details
-
createUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaults
in classBasicProgressBarUI
-
installListeners
protected void installListeners()- Overrides:
installListeners
in classBasicProgressBarUI
-
uninstallListeners
protected void uninstallListeners()- Overrides:
uninstallListeners
in classBasicProgressBarUI
-
drawStripe1X
-
drawDeterminateBackground
private void drawDeterminateBackground(Graphics2D g, JProgressBar bar, int width, int height, RadianceColorScheme scheme, RadianceFillPainter fillPainter, int orientation) -
drawDeterminateProgress
private void drawDeterminateProgress(Graphics2D g, JProgressBar bar, int width, int height, boolean isFull, RadianceColorScheme scheme, RadianceFillPainter fillPainter, int orientation, ComponentOrientation componentOrientation) -
paintDeterminate
- Overrides:
paintDeterminate
in classBasicProgressBarUI
-
getSelectionBackground
- Overrides:
getSelectionBackground
in classBasicProgressBarUI
-
getSelectionForeground
- Overrides:
getSelectionForeground
in classBasicProgressBarUI
-
paintRectangularStripedBackground
private void paintRectangularStripedBackground(Graphics g, int startX, int startY, int width, int height, RadianceColorScheme colorScheme, int stripeOffset, float borderAlpha, boolean isVertical) -
paintIndeterminate
- Overrides:
paintIndeterminate
in classBasicProgressBarUI
-
getFillState
-
getProgressState
-
getBox
- Overrides:
getBox
in classBasicProgressBarUI
-
startAnimationTimer
protected void startAnimationTimer()- Overrides:
startAnimationTimer
in classBasicProgressBarUI
-
stopAnimationTimer
protected void stopAnimationTimer()- Overrides:
stopAnimationTimer
in classBasicProgressBarUI
-
getAmountFull
- Overrides:
getAmountFull
in classBasicProgressBarUI
-
getPreferredInnerHorizontal
- Overrides:
getPreferredInnerHorizontal
in classBasicProgressBarUI
-
getPreferredInnerVertical
- Overrides:
getPreferredInnerVertical
in classBasicProgressBarUI
-
paintString
protected void paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b) - Overrides:
paintString
in classBasicProgressBarUI
-
paintString
private void paintString(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 boxy
- y location of bounding boxwidth
- width of bounding boxheight
- height of bounding boxfillStart
- 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
Returns the rectangle for the progress bar string.- Parameters:
progressString
- Progress bar string.x
- x location of bounding boxy
- y location of bounding boxwidth
- width of bounding boxheight
- height of bounding box- Returns:
- The rectangle for the progress bar string.
-
update
- Overrides:
update
in classComponentUI
-