本文整理汇总了Java中com.sun.java.swing.plaf.gtk.GTKConstants.ArrowType.DOWN属性的典型用法代码示例。如果您正苦于以下问题:Java ArrowType.DOWN属性的具体用法?Java ArrowType.DOWN怎么用?Java ArrowType.DOWN使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.sun.java.swing.plaf.gtk.GTKConstants.ArrowType
的用法示例。
在下文中一共展示了ArrowType.DOWN属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: drawGTKArrow
protected void drawGTKArrow(Node node, Graphics g) {
NamedNodeMap attrs = node.getAttributes();
String arrow = getStringAttr(attrs, "arrow");
String shadow = getStringAttr(attrs, "shadow");
String stateStr = getStringAttr(attrs, "state").toUpperCase();
int x = aee.evaluate(getStringAttr(attrs, "x"));
int y = aee.evaluate(getStringAttr(attrs, "y"));
int w = aee.evaluate(getStringAttr(attrs, "width"));
int h = aee.evaluate(getStringAttr(attrs, "height"));
int state = -1;
if ("NORMAL".equals(stateStr)) {
state = ENABLED;
} else if ("SELECTED".equals(stateStr)) {
state = SELECTED;
} else if ("INSENSITIVE".equals(stateStr)) {
state = DISABLED;
} else if ("PRELIGHT".equals(stateStr)) {
state = MOUSE_OVER;
}
ShadowType shadowType = null;
if ("in".equals(shadow)) {
shadowType = ShadowType.IN;
} else if ("out".equals(shadow)) {
shadowType = ShadowType.OUT;
} else if ("etched_in".equals(shadow)) {
shadowType = ShadowType.ETCHED_IN;
} else if ("etched_out".equals(shadow)) {
shadowType = ShadowType.ETCHED_OUT;
} else if ("none".equals(shadow)) {
shadowType = ShadowType.NONE;
}
ArrowType direction = null;
if ("up".equals(arrow)) {
direction = ArrowType.UP;
} else if ("down".equals(arrow)) {
direction = ArrowType.DOWN;
} else if ("left".equals(arrow)) {
direction = ArrowType.LEFT;
} else if ("right".equals(arrow)) {
direction = ArrowType.RIGHT;
}
GTKPainter.INSTANCE.paintMetacityElement(context, g, state,
"metacity-arrow", x, y, w, h, shadowType, direction);
}