本文整理汇总了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();
}
}
}
示例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);
}
示例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);
}
示例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());
}
示例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);
}
}