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 classNested classes/interfaces inherited from class BasicProgressBarUI
BasicProgressBarUI.ChangeHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate floatThe current position of the indeterminate animation's cycle.private intprivate Timelineprivate Timelineprivate intInner margin.private static final RadianceSurfacePainterprivate PropertyChangeListenerProperty change listener.private ChangeListenerValue change listener on the associated progress bar.Fields inherited from class BasicProgressBarUI
boxRect, changeListener, progressBar -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentUIcreateUI(JComponent comp) private voiddrawDeterminateBackground(Graphics2D g, JProgressBar bar, int width, int height, ContainerColorTokens colorTokens, RadianceSurfacePainter surfacePainter, int orientation, ComponentState currState) private voiddrawDeterminateProgress(Graphics2D g, JProgressBar bar, int width, int height, boolean isFull, ContainerColorTokens colorTokens, RadianceSurfacePainter surfacePainter, int orientation, ComponentState currState) private voiddrawStripe1X(Graphics2D g, int baseSize, Color color) protected intgetAmountFull(Insets b, int width, int height) protected Rectangleprivate ComponentStateprotected Dimensionprotected Dimensionprivate ComponentStateprotected Colorprotected Colorprivate RectanglegetStringRectangle(String progressString, int x, int y, int width, int height) Returns the rectangle for the progress bar string.protected voidprotected voidvoidvoidprivate voidpaintRectangularStripedBackground(Graphics g, int startX, int startY, int width, int height, ContainerColorTokens colorTokens, int stripeOffset, float borderAlpha, ComponentState currState, boolean isVertical) private voidpaintString(Graphics g, int x, int y, int width, int height, int fillStart, int amountFull) Paints the progress string.protected voidpaintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b) protected voidprotected voidprotected voidvoidupdate(Graphics g, JComponent c) Methods inherited from class BasicProgressBarUI
getAnimationIndex, getBaseline, getBaselineResizeBehavior, getBoxLength, getCellLength, getCellSpacing, getFrameCount, getMaximumSize, getMinimumSize, getPreferredSize, getStringPlacement, incrementAnimationIndex, installUI, paint, setAnimationIndex, setCellLength, setCellSpacing, uninstallDefaults, uninstallUIMethods inherited from class ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
-
Field Details
-
progressSurfacePainter
-
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, theindeterminateLoopTimelineis updating this value. -
radianceValueChangeListener
Value change listener on the associated progress bar. -
radiancePropertyChangeListener
Property change listener. Tracks changes to thefontproperty. -
margin
private int marginInner margin. -
displayedValue
private int displayedValue -
displayTimeline
-
indeterminateLoopTimeline
-
-
Constructor Details
-
RadianceProgressBarUI
protected RadianceProgressBarUI()
-
-
Method Details
-
createUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaultsin classBasicProgressBarUI
-
installListeners
protected void installListeners()- Overrides:
installListenersin classBasicProgressBarUI
-
uninstallListeners
protected void uninstallListeners()- Overrides:
uninstallListenersin classBasicProgressBarUI
-
drawStripe1X
-
drawDeterminateBackground
private void drawDeterminateBackground(Graphics2D g, JProgressBar bar, int width, int height, ContainerColorTokens colorTokens, RadianceSurfacePainter surfacePainter, int orientation, ComponentState currState) -
drawDeterminateProgress
private void drawDeterminateProgress(Graphics2D g, JProgressBar bar, int width, int height, boolean isFull, ContainerColorTokens colorTokens, RadianceSurfacePainter surfacePainter, int orientation, ComponentState currState) -
paintDeterminate
- Overrides:
paintDeterminatein classBasicProgressBarUI
-
getSelectionBackground
- Overrides:
getSelectionBackgroundin classBasicProgressBarUI
-
getSelectionForeground
- Overrides:
getSelectionForegroundin classBasicProgressBarUI
-
paintRectangularStripedBackground
private void paintRectangularStripedBackground(Graphics g, int startX, int startY, int width, int height, ContainerColorTokens colorTokens, int stripeOffset, float borderAlpha, ComponentState currState, boolean isVertical) -
paintIndeterminate
- Overrides:
paintIndeterminatein classBasicProgressBarUI
-
getFillState
-
getProgressState
-
getBox
- Overrides:
getBoxin classBasicProgressBarUI
-
startAnimationTimer
protected void startAnimationTimer()- Overrides:
startAnimationTimerin classBasicProgressBarUI
-
stopAnimationTimer
protected void stopAnimationTimer()- Overrides:
stopAnimationTimerin classBasicProgressBarUI
-
getAmountFull
- Overrides:
getAmountFullin classBasicProgressBarUI
-
getPreferredInnerHorizontal
- Overrides:
getPreferredInnerHorizontalin classBasicProgressBarUI
-
getPreferredInnerVertical
- Overrides:
getPreferredInnerVerticalin classBasicProgressBarUI
-
paintString
protected void paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b) - Overrides:
paintStringin 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:
updatein classComponentUI
-