Class SubstanceProgressBarUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ProgressBarUI
javax.swing.plaf.basic.BasicProgressBarUI
org.pushingpixels.substance.internal.ui.SubstanceProgressBarUI
UI for progress bars in Substance look and feel.
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicProgressBarUI
BasicProgressBarUI.ChangeHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected org.pushingpixels.trident.Timeline
protected org.pushingpixels.trident.Timeline
protected int
Inner margin.protected float
The speed factor for the indeterminate progress bars.protected PropertyChangeListener
Property change listener.protected 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) protected int
getAmountFull
(Insets b, int width, int height) protected Rectangle
static String
Returns the memory usage string.protected Dimension
protected Dimension
protected Color
protected Color
protected 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
protected void
paintString
(Graphics g, int x, int y, int width, int height, int amountFull, Insets b) protected void
protected void
protected void
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, update
-
Field Details
-
substanceValueChangeListener
Value change listener on the associated progress bar. -
substancePropertyChangeListener
Property change listener. Tracks changes to thefont
property. -
margin
protected int marginInner margin. -
speed
protected float speedThe speed factor for the indeterminate progress bars. -
displayedValue
protected int displayedValue -
displayTimeline
protected org.pushingpixels.trident.Timeline displayTimeline -
indeterminateLoopTimeline
protected org.pushingpixels.trident.Timeline indeterminateLoopTimeline
-
-
Constructor Details
-
SubstanceProgressBarUI
public SubstanceProgressBarUI()
-
-
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
-
paintDeterminate
- Overrides:
paintDeterminate
in classBasicProgressBarUI
-
getSelectionBackground
- Overrides:
getSelectionBackground
in classBasicProgressBarUI
-
getSelectionForeground
- Overrides:
getSelectionForeground
in classBasicProgressBarUI
-
paintIndeterminate
- Overrides:
paintIndeterminate
in classBasicProgressBarUI
-
getBox
- Overrides:
getBox
in classBasicProgressBarUI
-
startAnimationTimer
protected void startAnimationTimer()- Overrides:
startAnimationTimer
in classBasicProgressBarUI
-
stopAnimationTimer
protected void stopAnimationTimer()- Overrides:
stopAnimationTimer
in classBasicProgressBarUI
-
getMemoryUsage
Returns the memory usage string.- Returns:
- The memory usage string.
-
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
-
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.
-