Class SubstanceProgressBarUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.ProgressBarUI
-
- javax.swing.plaf.basic.BasicProgressBarUI
-
- org.pushingpixels.substance.internal.ui.SubstanceProgressBarUI
-
public class SubstanceProgressBarUI extends BasicProgressBarUI
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
Fields Modifier and Type Field Description protected intdisplayedValueprotected org.pushingpixels.trident.TimelinedisplayTimelineprotected org.pushingpixels.trident.TimelineindeterminateLoopTimelineprotected intmarginInner margin.protected floatspeedThe speed factor for the indeterminate progress bars.protected PropertyChangeListenersubstancePropertyChangeListenerProperty change listener.protected ChangeListenersubstanceValueChangeListenerValue change listener on the associated progress bar.-
Fields inherited from class javax.swing.plaf.basic.BasicProgressBarUI
boxRect, changeListener, progressBar
-
-
Constructor Summary
Constructors Constructor Description SubstanceProgressBarUI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ComponentUIcreateUI(JComponent comp)protected intgetAmountFull(Insets b, int width, int height)protected RectanglegetBox(Rectangle r)static StringgetMemoryUsage()Returns the memory usage string.protected DimensiongetPreferredInnerHorizontal()protected DimensiongetPreferredInnerVertical()protected ColorgetSelectionBackground()protected ColorgetSelectionForeground()protected RectanglegetStringRectangle(String progressString, int x, int y, int width, int height)Returns the rectangle for the progress bar string.protected voidinstallDefaults()protected voidinstallListeners()voidpaintDeterminate(Graphics g, JComponent c)voidpaintIndeterminate(Graphics g, JComponent c)protected voidpaintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b)protected voidstartAnimationTimer()protected voidstopAnimationTimer()protected voiduninstallListeners()-
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 Detail
-
substanceValueChangeListener
protected ChangeListener substanceValueChangeListener
Value change listener on the associated progress bar.
-
substancePropertyChangeListener
protected PropertyChangeListener substancePropertyChangeListener
Property change listener. Tracks changes to thefontproperty.
-
margin
protected int margin
Inner margin.
-
speed
protected float speed
The 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
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent comp)
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaultsin classBasicProgressBarUI
-
installListeners
protected void installListeners()
- Overrides:
installListenersin classBasicProgressBarUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListenersin classBasicProgressBarUI
-
paintDeterminate
public void paintDeterminate(Graphics g, JComponent c)
- Overrides:
paintDeterminatein classBasicProgressBarUI
-
getSelectionBackground
protected Color getSelectionBackground()
- Overrides:
getSelectionBackgroundin classBasicProgressBarUI
-
getSelectionForeground
protected Color getSelectionForeground()
- Overrides:
getSelectionForegroundin classBasicProgressBarUI
-
paintIndeterminate
public void paintIndeterminate(Graphics g, JComponent c)
- Overrides:
paintIndeterminatein classBasicProgressBarUI
-
getBox
protected Rectangle getBox(Rectangle r)
- Overrides:
getBoxin classBasicProgressBarUI
-
startAnimationTimer
protected void startAnimationTimer()
- Overrides:
startAnimationTimerin classBasicProgressBarUI
-
stopAnimationTimer
protected void stopAnimationTimer()
- Overrides:
stopAnimationTimerin classBasicProgressBarUI
-
getMemoryUsage
public static String getMemoryUsage()
Returns the memory usage string.- Returns:
- The memory usage string.
-
getAmountFull
protected int getAmountFull(Insets b, int width, int height)
- Overrides:
getAmountFullin classBasicProgressBarUI
-
getPreferredInnerHorizontal
protected Dimension getPreferredInnerHorizontal()
- Overrides:
getPreferredInnerHorizontalin classBasicProgressBarUI
-
getPreferredInnerVertical
protected Dimension 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
-
getStringRectangle
protected Rectangle getStringRectangle(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 boxy- y location of bounding boxwidth- width of bounding boxheight- height of bounding box- Returns:
- The rectangle for the progress bar string.
-
-