本文整理汇总了Java中org.apache.harmony.awt.state.TextComponentState类的典型用法代码示例。如果您正苦于以下问题:Java TextComponentState类的具体用法?Java TextComponentState怎么用?Java TextComponentState使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TextComponentState类属于org.apache.harmony.awt.state包,在下文中一共展示了TextComponentState类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: drawBackground
import org.apache.harmony.awt.state.TextComponentState; //导入依赖的package包/类
public static void drawBackground(Graphics g, TextComponentState s,
WinTheme t) {
Color c = (s.isEnabled() ? s.getBackground() : SystemColor.control);
WinThemeGraphics wgr = new WinThemeGraphics(g);
if (t.isXpThemeActive()) {
wgr.setTheme(t.getXpTheme("Edit")); //$NON-NLS-1$
int flags = (s.isEnabled() ? WindowsConsts.ETS_NORMAL :
WindowsConsts.ETS_DISABLED);
wgr.drawXpBackground(s.getSize(),
WindowsConsts.EP_EDITTEXT, flags);
if (s.isEnabled() && s.isBackgroundSet()) {
fill(s, c, wgr);
}
} else {
g.setColor(c);
fill(s, c, wgr);
wgr.drawEdge(s.getSize(), WindowsDefs.EDGE_SUNKEN);
}
wgr.dispose();
}
示例2: fill
import org.apache.harmony.awt.state.TextComponentState; //导入依赖的package包/类
private static void fill(TextComponentState s, Color c, WinThemeGraphics wgr) {
Dimension size = s.getSize();
Rectangle client = s.getClient();
Insets ins = s.getInsets();
int x = client.x + client.width;
int y = client.y + client.height;
int w = size.width - x;
int h = size.height - y;
wgr.fillBackground(client, c, true);
// fill areas outside of client area &&
// scrollbars
wgr.fillBackground(x, y, w, h, c, true);
wgr.fillBackground(0, size.height - ins.bottom,
size.width, ins.bottom, c, true);
wgr.fillBackground(size.width - ins.right, 0,
ins.right, size.height, c, true);
}
示例3: drawTextComponentBackground
import org.apache.harmony.awt.state.TextComponentState; //导入依赖的package包/类
public void drawTextComponentBackground(Graphics g, TextComponentState s) {
DefaultTextComponent.drawBackground(g, s);
}
示例4: drawTextComponentBackground
import org.apache.harmony.awt.state.TextComponentState; //导入依赖的package包/类
@Override
public void drawTextComponentBackground(Graphics g, TextComponentState s) {
WinTextComponent.drawBackground(g, s, this);
}