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 int
displayedValue
protected org.pushingpixels.trident.Timeline
displayTimeline
protected org.pushingpixels.trident.Timeline
indeterminateLoopTimeline
protected int
margin
Inner margin.protected float
speed
The speed factor for the indeterminate progress bars.protected PropertyChangeListener
substancePropertyChangeListener
Property change listener.protected ChangeListener
substanceValueChangeListener
Value 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 ComponentUI
createUI(JComponent comp)
protected int
getAmountFull(Insets b, int width, int height)
protected Rectangle
getBox(Rectangle r)
static String
getMemoryUsage()
Returns the memory usage string.protected Dimension
getPreferredInnerHorizontal()
protected Dimension
getPreferredInnerVertical()
protected Color
getSelectionBackground()
protected Color
getSelectionForeground()
protected Rectangle
getStringRectangle(String progressString, int x, int y, int width, int height)
Returns the rectangle for the progress bar string.protected void
installDefaults()
protected void
installListeners()
void
paintDeterminate(Graphics g, JComponent c)
void
paintIndeterminate(Graphics g, JComponent c)
protected void
paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b)
protected void
startAnimationTimer()
protected void
stopAnimationTimer()
protected void
uninstallListeners()
-
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 thefont
property.
-
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:
installDefaults
in classBasicProgressBarUI
-
installListeners
protected void installListeners()
- Overrides:
installListeners
in classBasicProgressBarUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListeners
in classBasicProgressBarUI
-
paintDeterminate
public void paintDeterminate(Graphics g, JComponent c)
- Overrides:
paintDeterminate
in classBasicProgressBarUI
-
getSelectionBackground
protected Color getSelectionBackground()
- Overrides:
getSelectionBackground
in classBasicProgressBarUI
-
getSelectionForeground
protected Color getSelectionForeground()
- Overrides:
getSelectionForeground
in classBasicProgressBarUI
-
paintIndeterminate
public void paintIndeterminate(Graphics g, JComponent c)
- Overrides:
paintIndeterminate
in classBasicProgressBarUI
-
getBox
protected Rectangle getBox(Rectangle r)
- Overrides:
getBox
in classBasicProgressBarUI
-
startAnimationTimer
protected void startAnimationTimer()
- Overrides:
startAnimationTimer
in classBasicProgressBarUI
-
stopAnimationTimer
protected void stopAnimationTimer()
- Overrides:
stopAnimationTimer
in 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:
getAmountFull
in classBasicProgressBarUI
-
getPreferredInnerHorizontal
protected Dimension getPreferredInnerHorizontal()
- Overrides:
getPreferredInnerHorizontal
in classBasicProgressBarUI
-
getPreferredInnerVertical
protected Dimension 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
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.
-
-