Package org.pushingpixels.substance.internal.ui

# 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

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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### substanceValueChangeListener

protected ChangeListener substanceValueChangeListener
Value change listener on the associated progress bar.

### substancePropertyChangeListener

protected PropertyChangeListener substancePropertyChangeListener
Property change listener. Tracks changes to the `font` 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

## Constructor Details

### SubstanceProgressBarUI

public SubstanceProgressBarUI()

## Method Details

### createUI

public static ComponentUI createUI(JComponent comp)

### installDefaults

protected void installDefaults()

Overrides:
  `installDefaults` in class `BasicProgressBarUI`

### installListeners

protected void installListeners()

Overrides:
  `installListeners` in class `BasicProgressBarUI`

### uninstallListeners

protected void uninstallListeners()

Overrides:
  `uninstallListeners` in class `BasicProgressBarUI`

### paintDeterminate

public void paintDeterminate(Graphics g, JComponent c)

Overrides:
  `paintDeterminate` in class `BasicProgressBarUI`

### getSelectionBackground

protected Color getSelectionBackground()

Overrides:
  `getSelectionBackground` in class `BasicProgressBarUI`

### getSelectionForeground

protected Color getSelectionForeground()

Overrides:
  `getSelectionForeground` in class `BasicProgressBarUI`

### paintIndeterminate

public void paintIndeterminate(Graphics g, JComponent c)

Overrides:
  `paintIndeterminate` in class `BasicProgressBarUI`

### getBox

protected Rectangle getBox(Rectangle r)

Overrides:
  `getBox` in class `BasicProgressBarUI`

### startAnimationTimer

protected void startAnimationTimer()

Overrides:
  `startAnimationTimer` in class `BasicProgressBarUI`

### stopAnimationTimer

protected void stopAnimationTimer()

Overrides:
  `stopAnimationTimer` in class `BasicProgressBarUI`

### 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 class `BasicProgressBarUI`

### getPreferredInnerHorizontal

protected Dimension getPreferredInnerHorizontal()

Overrides:
  `getPreferredInnerHorizontal` in class `BasicProgressBarUI`

### getPreferredInnerVertical

protected Dimension getPreferredInnerVertical()

Overrides:
  `getPreferredInnerVertical` in class `BasicProgressBarUI`

### paintString

protected void paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b)

Overrides:
  `paintString` in class `BasicProgressBarUI`

### 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 box
  `y` - y location of bounding box
  `width` - width of bounding box
  `height` - height of bounding box
Returns:
  The rectangle for the progress bar string.