Examples of CTColorScheme


Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTColorScheme

    public ThemesTable(ThemeDocument theme) {
        this.theme = theme;
    }

    public XSSFColor getThemeColor(int idx) {
        CTColorScheme colorScheme = theme.getTheme().getThemeElements().getClrScheme();
        CTColor ctColor = null;
        int cnt = 0;
        for (XmlObject obj : colorScheme.selectPath("./*")) {
            if (obj instanceof org.openxmlformats.schemas.drawingml.x2006.main.CTColor) {
                if (cnt == idx) {
                    ctColor = (org.openxmlformats.schemas.drawingml.x2006.main.CTColor) obj;
                   
                    byte[] rgb = null;
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTColorScheme

    public ThemesTable(ThemeDocument theme) {
        this.theme = theme;
    }

    public XSSFColor getThemeColor(int idx) {
        CTColorScheme colorScheme = theme.getTheme().getThemeElements().getClrScheme();
        CTColor ctColor = null;
        int cnt = 0;
        for (XmlObject obj : colorScheme.selectPath("./*")) {
            if (obj instanceof org.openxmlformats.schemas.drawingml.x2006.main.CTColor) {
                if (cnt == idx) {
                    ctColor = (org.openxmlformats.schemas.drawingml.x2006.main.CTColor) obj;
                   
                    byte[] rgb = null;
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTColorScheme

    public ThemesTable(ThemeDocument theme) {
        this.theme = theme;
    }

    public XSSFColor getThemeColor(int idx) {
        CTColorScheme colorScheme = theme.getTheme().getThemeElements().getClrScheme();
        CTColor ctColor = null;
        int cnt = 0;
        for (XmlObject obj : colorScheme.selectPath("./*")) {
            if (obj instanceof org.openxmlformats.schemas.drawingml.x2006.main.CTColor) {
                if (cnt == idx) {
                    ctColor = (org.openxmlformats.schemas.drawingml.x2006.main.CTColor) obj;
                    return new XSSFColor(ctColor.getSrgbClr().getVal());
                }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTColorScheme

    public ThemesTable(ThemeDocument theme) {
        this.theme = theme;
    }

    public XSSFColor getThemeColor(int idx) {
        CTColorScheme colorScheme = theme.getTheme().getThemeElements().getClrScheme();
        CTColor ctColor = null;
        int cnt = 0;
        for (XmlObject obj : colorScheme.selectPath("./*")) {
            if (obj instanceof org.openxmlformats.schemas.drawingml.x2006.main.CTColor) {
                if (cnt == idx) {
                    ctColor = (org.openxmlformats.schemas.drawingml.x2006.main.CTColor) obj;
                   
                    byte[] rgb = null;
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTColorScheme

    public ThemesTable(ThemeDocument theme) {
        this.theme = theme;
    }

    public XSSFColor getThemeColor(int idx) {
        CTColorScheme colorScheme = theme.getTheme().getThemeElements().getClrScheme();
        CTColor ctColor = null;
        int cnt = 0;
        for (XmlObject obj : colorScheme.selectPath("./*")) {
            if (obj instanceof org.openxmlformats.schemas.drawingml.x2006.main.CTColor) {
                if (cnt == idx) {
                    ctColor = (org.openxmlformats.schemas.drawingml.x2006.main.CTColor) obj;
                   
                    byte[] rgb = null;
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTColorScheme

        initialize();
    }

    private void initialize(){
      CTBaseStyles elems = _theme.getThemeElements();
      CTColorScheme scheme = elems.getClrScheme();
      // The color scheme is responsible for defining a list of twelve colors.
      _schemeColors = new HashMap<String, CTColor>(12);
      for(XmlObject o : scheme.selectPath("*")){
        CTColor c = (CTColor)o;
        String name = c.getDomNode().getLocalName();
        _schemeColors.put(name, c);
      }
     }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTColorScheme

     */
    public XSSFColor getThemeColor(int idx) {
        // Theme color references are NOT positional indices into the color scheme,
        // i.e. these keys are NOT the same as the order in which theme colors appear
        // in theme1.xml. They are keys to a mapped color.
        CTColorScheme colorScheme = theme.getTheme().getThemeElements().getClrScheme();
        CTColor ctColor;
        switch (idx) {
            case  0: ctColor = colorScheme.getLt1(); break;
            case  1: ctColor = colorScheme.getDk1(); break;
            case  2: ctColor = colorScheme.getLt2(); break;
            case  3: ctColor = colorScheme.getDk2(); break;
            case  4: ctColor = colorScheme.getAccent1(); break;
            case  5: ctColor = colorScheme.getAccent2(); break;
            case  6: ctColor = colorScheme.getAccent3(); break;
            case  7: ctColor = colorScheme.getAccent4(); break;
            case  8: ctColor = colorScheme.getAccent5(); break;
            case  9: ctColor = colorScheme.getAccent6(); break;
            case 10: ctColor = colorScheme.getHlink(); break;
            case 11: ctColor = colorScheme.getFolHlink(); break;
            default: return null;
        }

        byte[] rgb = null;
        if (ctColor.isSetSrgbClr()) {
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTColorScheme

        _schemeColors = theme._schemeColors;
    }

    private void initialize(){
      CTBaseStyles elems = _theme.getThemeElements();
      CTColorScheme scheme = elems.getClrScheme();
      // The color scheme is responsible for defining a list of twelve colors.
      _schemeColors = new HashMap<String, CTColor>(12);
      for(XmlObject o : scheme.selectPath("*")){
        CTColor c = (CTColor)o;
        String name = c.getDomNode().getLocalName();
        _schemeColors.put(name, c);
      }
     }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.