public class BEProgressBarUI extends javax.swing.plaf.basic.BasicProgressBarUI implements BeautyEyeLNFHelper.__UseParentPaintSurported
构造器和说明 |
---|
BEProgressBarUI() |
限定符和类型 | 方法和说明 |
---|---|
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent x)
Creates the ui.
|
boolean |
isUseParentPaint()
是否使用父类的绘制实现方法,true表示是.
|
protected void |
paintDeterminate(java.awt.Graphics g,
javax.swing.JComponent c)
All purpose paint method that should do the right thing for almost all
linear, determinate progress bars.
|
protected void |
paintIndeterminate(java.awt.Graphics g,
javax.swing.JComponent c)
All purpose paint method that should do the right thing for all
linear bouncing-box progress bars.
|
protected void |
paintProgressBarBgImpl(boolean isHorizontal,
java.awt.Graphics g,
java.awt.Insets b,
int barRectWidth,
int barRectHeight)
进度条背景填充实现方法.
|
protected void |
paintProgressBarContentImpl(boolean isHorizontal,
java.awt.Graphics g,
int x,
int y,
int amountFull,
int barContentRectHeight,
int barSumHeightForVertival)
进度条当前值的绘制实现方法.
|
getAmountFull, getAnimationIndex, getBaseline, getBaselineResizeBehavior, getBox, getBoxLength, getCellLength, getCellSpacing, getFrameCount, getMaximumSize, getMinimumSize, getPreferredInnerHorizontal, getPreferredInnerVertical, getPreferredSize, getSelectionBackground, getSelectionForeground, getStringPlacement, incrementAnimationIndex, installDefaults, installListeners, installUI, paint, paintString, setAnimationIndex, setCellLength, setCellSpacing, startAnimationTimer, stopAnimationTimer, uninstallDefaults, uninstallListeners, uninstallUI
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent x)
x
- the xpublic boolean isUseParentPaint()
因为在BE LNF中,进度条和背景都是使用N9图,没法通过设置JProgressBar的背景色和前景 色来控制进度条的颜色,本方法的目的就是当用户设置了进度条的Background或Foreground 时告之本实现类不使用BE LNF中默认的N9图填充绘制而改用父类中的方法(父类中的方法 就可以支持颜色的设置罗,只是丑点,但总归是能适应用户的需求场景要求,其实用户完全可以 通过JProgressBar.setUI(new MetalProgressBar())方式来自定义进度的UI哦).
isUseParentPaint
在接口中 BeautyEyeLNFHelper.__UseParentPaintSurported
protected void paintDeterminate(java.awt.Graphics g, javax.swing.JComponent c)
paintDeterminate
在类中 javax.swing.plaf.basic.BasicProgressBarUI
g
- the gc
- the cpaintIndeterminate(java.awt.Graphics, javax.swing.JComponent)
protected void paintIndeterminate(java.awt.Graphics g, javax.swing.JComponent c)
paintIndeterminate
在类中 javax.swing.plaf.basic.BasicProgressBarUI
g
- the gc
- the cpaintDeterminate(java.awt.Graphics, javax.swing.JComponent)
protected void paintProgressBarContentImpl(boolean isHorizontal, java.awt.Graphics g, int x, int y, int amountFull, int barContentRectHeight, int barSumHeightForVertival)
isHorizontal
- true表示水平进度条,否则表示垂直进度条g
- the gx
- the xy
- the yamountFull
- the amount fullbarContentRectHeight
- the bar content rect heightbarSumHeightForVertival
- 本参数只在垂直进度条时有意义,目的是为了在当前值很
小的情况下为了达到N9图最小绘制高度时,作修正时需要protected void paintProgressBarBgImpl(boolean isHorizontal, java.awt.Graphics g, java.awt.Insets b, int barRectWidth, int barRectHeight)
isHorizontal
- the is horizontalg
- the gb
- the bbarRectWidth
- the bar rect widthbarRectHeight
- the bar rect height