Examples of CTSystemColor


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

            } else if (ch instanceof CTSRgbColor) {
                CTSRgbColor srgb = (CTSRgbColor)ch;
                byte[] val = srgb.getVal();
                color = new Color(0xFF & val[0], 0xFF & val[1], 0xFF & val[2]);
            } else if (ch instanceof CTSystemColor) {
                CTSystemColor sys = (CTSystemColor)ch;
                if(sys.isSetLastClr()) {
                    byte[] val = sys.getLastClr();
                    color = new Color(0xFF & val[0], 0xFF & val[1], 0xFF & val[2]);
                } else {
                    // YK: color is a string like "menuText" or "windowText", we return black for such cases
                    String colorName = sys.getVal().toString();
                    color = Color.black;
                }
            } else {
                throw new IllegalArgumentException("Unexpected color choice: " + ch.getClass());
            }
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.