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


Java ArrowType类代码示例

本文整理汇总了Java中com.sun.java.swing.plaf.gtk.GTKConstants.ArrowType的典型用法代码示例。如果您正苦于以下问题:Java ArrowType类的具体用法?Java ArrowType怎么用?Java ArrowType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ArrowType类属于com.sun.java.swing.plaf.gtk.GTKConstants包,在下文中一共展示了ArrowType类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: paintMetacityElement

import com.sun.java.swing.plaf.gtk.GTKConstants.ArrowType; //导入依赖的package包/类
void paintMetacityElement(SynthContext context, Graphics g,
        int gtkState, String detail, int x, int y, int w, int h,
        ShadowType shadow, ArrowType direction) {
    synchronized (UNIXToolkit.GTK_LOCK) {
        if (! ENGINE.paintCachedImage(
                g, x, y, w, h, gtkState, detail, shadow, direction)) {
            ENGINE.startPainting(
                    g, x, y, w, h, gtkState, detail, shadow, direction);
            if (detail == "metacity-arrow") {
                ENGINE.paintArrow(g, context, Region.INTERNAL_FRAME_TITLE_PANE,
                        gtkState, shadow, direction, "", x, y, w, h);

            } else if (detail == "metacity-box") {
                ENGINE.paintBox(g, context, Region.INTERNAL_FRAME_TITLE_PANE,
                        gtkState, shadow, "", x, y, w, h);

            } else if (detail == "metacity-vline") {
                ENGINE.paintVline(g, context, Region.INTERNAL_FRAME_TITLE_PANE,
                        gtkState, "", x, y, w, h);
            }
            ENGINE.finishPainting();
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:25,代码来源:GTKPainter.java

示例2: paintMenuArrowIcon

import com.sun.java.swing.plaf.gtk.GTKConstants.ArrowType; //导入依赖的package包/类
public void paintMenuArrowIcon(SynthContext context, Graphics g,
        int state, int x, int y, int w, int h, ArrowType dir) {
    int gtkState = GTKLookAndFeel.synthStateToGTKState(
            context.getRegion(), state);
    ShadowType shadow = ShadowType.OUT;
    if (gtkState == SynthConstants.MOUSE_OVER) {
        shadow = ShadowType.IN;
    }
    if (!GTKLookAndFeel.is3()) {
        x += 3;
        y += 3;
        w = h = 7;
    }
    ENGINE.paintArrow(g, context, Region.MENU_ITEM, gtkState, shadow,
            dir, "menuitem", x, y, w, h);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:GTKPainter.java

示例3: paintMenuArrowIcon

import com.sun.java.swing.plaf.gtk.GTKConstants.ArrowType; //导入依赖的package包/类
public void paintMenuArrowIcon(SynthContext context, Graphics g,
        int state, int x, int y, int w, int h, ArrowType dir) {
    int gtkState = GTKLookAndFeel.synthStateToGTKState(
            context.getRegion(), state);
    ShadowType shadow = ShadowType.OUT;
    if (gtkState == SynthConstants.MOUSE_OVER) {
        shadow = ShadowType.IN;
    }
    ENGINE.paintArrow(g, context, Region.MENU_ITEM, gtkState, shadow,
            dir, "menuitem", x + 3, y + 3, 7, 7);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:GTKPainter.java

示例4: paintArrow

import com.sun.java.swing.plaf.gtk.GTKConstants.ArrowType; //导入依赖的package包/类
public void paintArrow(Graphics g, SynthContext context,
        Region id, int state, ShadowType shadowType, ArrowType direction,
        String detail, int x, int y, int w, int h) {

    state = GTKLookAndFeel.synthStateToGTKStateType(state).ordinal();
    int widget = getWidgetType(context.getComponent(), id).ordinal();
    native_paint_arrow(widget, state, shadowType.ordinal(),
            detail, x - x0, y - y0, w, h, direction.ordinal());
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:GTKEngine.java

示例5: paintIcon

import com.sun.java.swing.plaf.gtk.GTKConstants.ArrowType; //导入依赖的package包/类
public void paintIcon(SynthContext context, Graphics g, int x, int y,
                      int w, int h) {
    if (context != null) {
        ArrowType arrowDir = ArrowType.RIGHT;
        if (!context.getComponent().getComponentOrientation().isLeftToRight()) {
            arrowDir = ArrowType.LEFT;
        }
        GTKPainter.INSTANCE.paintIcon(context, g,
                getMethod(), x, y, w, h, arrowDir);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:GTKIconFactory.java


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