当前位置: 首页>>代码示例>>Java>>正文


Java TextComponentState类代码示例

本文整理汇总了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();
}
 
开发者ID:shannah,项目名称:cn1,代码行数:26,代码来源:WinTextComponent.java

示例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);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:18,代码来源:WinTextComponent.java

示例3: drawTextComponentBackground

import org.apache.harmony.awt.state.TextComponentState; //导入依赖的package包/类
public void drawTextComponentBackground(Graphics g, TextComponentState s) {
    DefaultTextComponent.drawBackground(g, s);
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:4,代码来源:Theme.java

示例4: drawTextComponentBackground

import org.apache.harmony.awt.state.TextComponentState; //导入依赖的package包/类
@Override
public void drawTextComponentBackground(Graphics g, TextComponentState s) {
    WinTextComponent.drawBackground(g, s, this);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:5,代码来源:WinTheme.java


注:本文中的org.apache.harmony.awt.state.TextComponentState类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。