public class BETextFieldUI extends javax.swing.plaf.basic.BasicTextFieldUI implements __UI__.BgSwitchable, BeautyEyeLNFHelper.__UseParentPaintSurported
构造器和说明 |
---|
BETextFieldUI() |
限定符和类型 | 方法和说明 |
---|---|
static void |
addOtherListener(javax.swing.JComponent c)
为组件添加焦点监听器(获得/取消焦点时可以自动设置/取消一个彩色的边框效果,以体高UI体验)
、右键菜单监听器(有复制/粘贴等功能).
|
static BETextFieldUI |
createUI(javax.swing.JComponent c)
Creates the ui.
|
boolean |
isUseParentPaint()
是否使用父类的绘制实现方法,true表示是.
|
protected void |
paintBackground(java.awt.Graphics g)
Paints a background for the view.
|
static void |
paintBg(java.awt.Graphics g,
int x,
int y,
int w,
int h,
boolean enabled,
org.jb2011.ninepatch4j.NinePatch bg)
Paint bg.
|
void |
switchBgToFocused()
Switch bg to focused.
|
void |
switchBgToNomal()
Switch bg to nomal.
|
create, getBaseline, getBaselineResizeBehavior, getPropertyPrefix
create, createCaret, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getEditorKit, getKeymapName, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getPreferredSize, getRootView, getToolTipText, getVisibleEditorRect, installDefaults, installKeyboardActions, installListeners, installUI, modelChanged, modelToView, modelToView, paint, paintSafely, propertyChange, setView, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, update, viewToModel, viewToModel
public static BETextFieldUI createUI(javax.swing.JComponent c)
c
- the cpublic boolean isUseParentPaint()
因为在BE LNF中,边框和背景等都是使用N9图,没法通过设置背景色和前景 色来控制JTextField的颜色和边框,本方法的目的就是当用户设置了进度条的border或背景色 时告之本实现类不使用BE LNF中默认的N9图填充绘制而改用父类中的方法(父类中的方法 就可以支持颜色的设置罗,只是丑点,但总归是能适应用户的需求场景要求,其实用户完全可以 通过JTextField.setUI(..)方式来自定义UI哦).
isUseParentPaint
在接口中 BeautyEyeLNFHelper.__UseParentPaintSurported
protected void paintBackground(java.awt.Graphics g)
paintBackground
在类中 javax.swing.plaf.basic.BasicTextUI
g
- the graphics contextpublic void switchBgToNomal()
__UI__.BgSwitchable
switchBgToNomal
在接口中 __UI__.BgSwitchable
public void switchBgToFocused()
__UI__.BgSwitchable
switchBgToFocused
在接口中 __UI__.BgSwitchable
public static void paintBg(java.awt.Graphics g, int x, int y, int w, int h, boolean enabled, org.jb2011.ninepatch4j.NinePatch bg)
g
- the gx
- the xy
- the yw
- the wh
- the henabled
- the enabledbg
- the bgpublic static void addOtherListener(javax.swing.JComponent c)
c
- the c