Java Code Examples for com.sun.java.swing.plaf.gtk.GTKConstants.ShadowType#ETCHED_IN

The following examples show how to use com.sun.java.swing.plaf.gtk.GTKConstants.ShadowType#ETCHED_IN . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Metacity.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
protected void drawGTKBox(Node node, Graphics g) {
    NamedNodeMap attrs = node.getAttributes();
    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;
    }
    GTKPainter.INSTANCE.paintMetacityElement(context, g, state,
            "metacity-box", x, y, w, h, shadowType, null);
}
 
Example 2
Source File: Metacity.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
protected void drawGTKBox(Node node, Graphics g) {
    NamedNodeMap attrs = node.getAttributes();
    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;
    }
    GTKPainter.INSTANCE.paintMetacityElement(context, g, state,
            "metacity-box", x, y, w, h, shadowType, null);
}
 
Example 3
Source File: Metacity.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
protected void drawGTKBox(Node node, Graphics g) {
    NamedNodeMap attrs = node.getAttributes();
    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;
    }
    GTKPainter.INSTANCE.paintMetacityElement(context, g, state,
            "metacity-box", x, y, w, h, shadowType, null);
}
 
Example 4
Source File: Metacity.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
protected void drawGTKBox(Node node, Graphics g) {
    NamedNodeMap attrs = node.getAttributes();
    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;
    }
    GTKPainter.INSTANCE.paintMetacityElement(context, g, state,
            "metacity-box", x, y, w, h, shadowType, null);
}
 
Example 5
Source File: Metacity.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
protected void drawGTKBox(Node node, Graphics g) {
    NamedNodeMap attrs = node.getAttributes();
    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;
    }
    GTKPainter.INSTANCE.paintMetacityElement(context, g, state,
            "metacity-box", x, y, w, h, shadowType, null);
}
 
Example 6
Source File: Metacity.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
protected void drawGTKBox(Node node, Graphics g) {
    NamedNodeMap attrs = node.getAttributes();
    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;
    }
    GTKPainter.INSTANCE.paintMetacityElement(context, g, state,
            "metacity-box", x, y, w, h, shadowType, null);
}
 
Example 7
Source File: Metacity.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
protected void drawGTKBox(Node node, Graphics g) {
    NamedNodeMap attrs = node.getAttributes();
    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;
    }
    GTKPainter.INSTANCE.paintMetacityElement(context, g, state,
            "metacity-box", x, y, w, h, shadowType, null);
}
 
Example 8
Source File: Metacity.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
protected void drawGTKBox(Node node, Graphics g) {
    NamedNodeMap attrs = node.getAttributes();
    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;
    }
    GTKPainter.INSTANCE.paintMetacityElement(context, g, state,
            "metacity-box", x, y, w, h, shadowType, null);
}
 
Example 9
Source File: Metacity.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
protected void drawGTKBox(Node node, Graphics g) {
    NamedNodeMap attrs = node.getAttributes();
    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;
    }
    GTKPainter.INSTANCE.paintMetacityElement(context, g, state,
            "metacity-box", x, y, w, h, shadowType, null);
}
 
Example 10
Source File: Metacity.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
protected void drawGTKBox(Node node, Graphics g) {
    NamedNodeMap attrs = node.getAttributes();
    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;
    }
    GTKPainter.INSTANCE.paintMetacityElement(context, g, state,
            "metacity-box", x, y, w, h, shadowType, null);
}
 
Example 11
Source File: Metacity.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
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);
}
 
Example 12
Source File: Metacity.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
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);
}
 
Example 13
Source File: Metacity.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
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);
}
 
Example 14
Source File: Metacity.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
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);
}
 
Example 15
Source File: Metacity.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
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);
}
 
Example 16
Source File: Metacity.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
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);
}
 
Example 17
Source File: Metacity.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
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);
}
 
Example 18
Source File: Metacity.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
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);
}
 
Example 19
Source File: Metacity.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
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);
}
 
Example 20
Source File: Metacity.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
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);
}