Package com.formdev.flatlaf.ui
Class FlatProgressBarUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.ProgressBarUI
-
- javax.swing.plaf.basic.BasicProgressBarUI
-
- com.formdev.flatlaf.ui.FlatProgressBarUI
-
- All Implemented Interfaces:
FlatStylingSupport.StyleableUI
public class FlatProgressBarUI extends BasicProgressBarUI implements FlatStylingSupport.StyleableUI
Provides the Flat LaF UI delegate forJProgressBar
.- UiDefault:
- ProgressBar.font Font, ProgressBar.background Color, ProgressBar.foreground Color, ProgressBar.selectionBackground Color, ProgressBar.selectionForeground Color, ProgressBar.border Border, ProgressBar.horizontalSize Dimension default is 146,12, ProgressBar.verticalSize Dimension default is 12,146, ProgressBar.repaintInterval int default is 50 milliseconds, ProgressBar.cycleTime int default is 3000 milliseconds , ProgressBar.arc int
-
-
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
arc
protected Dimension
horizontalSize
protected boolean
largeHeight
protected boolean
square
protected Dimension
verticalSize
-
Fields inherited from class javax.swing.plaf.basic.BasicProgressBarUI
boxRect, changeListener, progressBar
-
-
Constructor Summary
Constructors Constructor Description FlatProgressBarUI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyStyle(Object style)
protected Object
applyStyleProperty(String key, Object value)
static ComponentUI
createUI(JComponent c)
protected Dimension
getPreferredInnerHorizontal()
protected Dimension
getPreferredInnerVertical()
Dimension
getPreferredSize(JComponent c)
Map<String,Class<?>>
getStyleableInfos(JComponent c)
Object
getStyleableValue(JComponent c, String key)
protected void
installDefaults()
protected void
installListeners()
protected void
installStyle()
void
installUI(JComponent c)
void
paint(Graphics g, JComponent c)
protected void
paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b)
protected void
setAnimationIndex(int newValue)
protected void
uninstallDefaults()
protected void
uninstallListeners()
void
update(Graphics g, JComponent c)
-
Methods inherited from class javax.swing.plaf.basic.BasicProgressBarUI
getAmountFull, getAnimationIndex, getBaseline, getBaselineResizeBehavior, getBox, getBoxLength, getCellLength, getCellSpacing, getFrameCount, getMaximumSize, getMinimumSize, getSelectionBackground, getSelectionForeground, getStringPlacement, incrementAnimationIndex, paintDeterminate, paintIndeterminate, setCellLength, setCellSpacing, startAnimationTimer, stopAnimationTimer, uninstallUI
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
-
-
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent c)
-
installUI
public void installUI(JComponent c)
- Overrides:
installUI
in classBasicProgressBarUI
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaults
in classBasicProgressBarUI
-
uninstallDefaults
protected void uninstallDefaults()
- Overrides:
uninstallDefaults
in classBasicProgressBarUI
-
installListeners
protected void installListeners()
- Overrides:
installListeners
in classBasicProgressBarUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListeners
in classBasicProgressBarUI
-
installStyle
protected void installStyle()
- Since:
- 2
-
applyStyle
protected void applyStyle(Object style)
- Since:
- 2
-
getStyleableInfos
public Map<String,Class<?>> getStyleableInfos(JComponent c)
- Specified by:
getStyleableInfos
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2
-
getStyleableValue
public Object getStyleableValue(JComponent c, String key)
- Specified by:
getStyleableValue
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2.5
-
getPreferredSize
public Dimension getPreferredSize(JComponent c)
- Overrides:
getPreferredSize
in classBasicProgressBarUI
-
getPreferredInnerHorizontal
protected Dimension getPreferredInnerHorizontal()
- Overrides:
getPreferredInnerHorizontal
in classBasicProgressBarUI
-
getPreferredInnerVertical
protected Dimension getPreferredInnerVertical()
- Overrides:
getPreferredInnerVertical
in classBasicProgressBarUI
-
update
public void update(Graphics g, JComponent c)
- Overrides:
update
in classComponentUI
-
paint
public void paint(Graphics g, JComponent c)
- Overrides:
paint
in classBasicProgressBarUI
-
paintString
protected void paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b)
- Overrides:
paintString
in classBasicProgressBarUI
-
setAnimationIndex
protected void setAnimationIndex(int newValue)
- Overrides:
setAnimationIndex
in classBasicProgressBarUI
-
-