WinTextComponent.java 文件源码

java
阅读 21 收藏 0 点赞 0 评论 0

项目:cn1 作者:
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();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号