You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ab...@apache.org on 2018/01/06 02:51:53 UTC
svn commit: r1820369 [2/3] - in /poi/trunk/src:
examples/src/org/apache/poi/xslf/usermodel/
examples/src/org/apache/poi/xssf/usermodel/examples/
ooxml/java/org/apache/poi/xddf/usermodel/
ooxml/java/org/apache/poi/xddf/usermodel/chart/ ooxml/java/org/ap...
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFColorRgbBinary.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFColorRgbBinary.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFColorRgbBinary.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFColorRgbBinary.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,69 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xddf.usermodel;
+
+import java.util.Locale;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.apache.xmlbeans.XmlObject;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTColor;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTSRgbColor;
+
+@Beta
+public class XDDFColorRgbBinary extends XDDFColor {
+ private CTSRgbColor color;
+
+ public XDDFColorRgbBinary(byte[] color) {
+ this(CTSRgbColor.Factory.newInstance(), CTColor.Factory.newInstance());
+ setValue(color);
+ }
+
+ @Internal
+ protected XDDFColorRgbBinary(CTSRgbColor color) {
+ this(color, null);
+ }
+
+ @Internal
+ protected XDDFColorRgbBinary(CTSRgbColor color, CTColor container) {
+ super(container);
+ this.color = color;
+ }
+
+ @Override
+ @Internal
+ protected XmlObject getXmlObject() {
+ return color;
+ }
+
+ public byte[] getValue() {
+ return color.getVal();
+ }
+
+ public void setValue(byte[] value) {
+ color.setVal(value);
+ }
+
+ public String toRGBHex() {
+ StringBuilder sb = new StringBuilder(6);
+ for (byte b: color.getVal()) {
+ sb.append(String.format(Locale.ROOT, "%02X", b));
+ }
+ return sb.toString().toUpperCase(Locale.ROOT);
+ }
+}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFColorRgbPercent.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFColorRgbPercent.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFColorRgbPercent.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFColorRgbPercent.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,102 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xddf.usermodel;
+
+import java.util.Locale;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.apache.xmlbeans.XmlObject;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTColor;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTScRgbColor;
+
+@Beta
+public class XDDFColorRgbPercent extends XDDFColor {
+ private CTScRgbColor color;
+
+ public XDDFColorRgbPercent(int red, int green, int blue) {
+ this(CTScRgbColor.Factory.newInstance(), CTColor.Factory.newInstance());
+ setRed(red);
+ setGreen(green);
+ setBlue(blue);
+ }
+
+ @Internal
+ protected XDDFColorRgbPercent(CTScRgbColor color) {
+ this(color, null);
+ }
+
+ @Internal
+ protected XDDFColorRgbPercent(CTScRgbColor color, CTColor container) {
+ super(container);
+ this.color = color;
+ }
+
+ @Override
+ @Internal
+ protected XmlObject getXmlObject() {
+ return color;
+ }
+
+ public int getRed() {
+ return color.getR();
+ }
+
+ public void setRed(int red) {
+ color.setR(normalize(red));
+ }
+
+ public int getGreen() {
+ return color.getG();
+ }
+
+ public void setGreen(int green) {
+ color.setG(normalize(green));
+ }
+
+ public int getBlue() {
+ return color.getB();
+ }
+
+ public void setBlue(int blue) {
+ color.setB(normalize(blue));
+ }
+
+ private int normalize(int value) {
+ if (value < 0) {
+ return 0;
+ }
+ if (100_000 < value) {
+ return 100_000;
+ }
+ return value;
+ }
+
+ public String toRGBHex() {
+ StringBuilder sb = new StringBuilder(6);
+ appendHex(sb, color.getR());
+ appendHex(sb, color.getG());
+ appendHex(sb, color.getB());
+ return sb.toString().toUpperCase(Locale.ROOT);
+ }
+
+ private void appendHex(StringBuilder sb, int value) {
+ int b = value * 255 / 100_000;
+ sb.append(String.format(Locale.ROOT, "%02X", b));
+ }
+}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFColorSchemeBased.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFColorSchemeBased.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFColorSchemeBased.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFColorSchemeBased.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,59 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xddf.usermodel;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.apache.xmlbeans.XmlObject;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTColor;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTSchemeColor;
+
+@Beta
+public class XDDFColorSchemeBased extends XDDFColor {
+ private CTSchemeColor color;
+
+ public XDDFColorSchemeBased(SchemeColor color) {
+ this(CTSchemeColor.Factory.newInstance(), CTColor.Factory.newInstance());
+ setValue(color);
+ }
+
+ @Internal
+ protected XDDFColorSchemeBased(CTSchemeColor color) {
+ this(color, null);
+ }
+
+ @Internal
+ protected XDDFColorSchemeBased(CTSchemeColor color, CTColor container) {
+ super(container);
+ this.color = color;
+ }
+
+ @Override
+ @Internal
+ protected XmlObject getXmlObject() {
+ return color;
+ }
+
+ public SchemeColor getValue() {
+ return SchemeColor.valueOf(color.getVal());
+ }
+
+ public void setValue(SchemeColor scheme) {
+ color.setVal(scheme.underlying);
+ }
+}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFColorSystemDefined.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFColorSystemDefined.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFColorSystemDefined.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFColorSystemDefined.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,77 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xddf.usermodel;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.apache.xmlbeans.XmlObject;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTColor;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTSystemColor;
+
+@Beta
+public class XDDFColorSystemDefined extends XDDFColor {
+ private CTSystemColor color;
+
+ public XDDFColorSystemDefined(SystemColor color) {
+ this(CTSystemColor.Factory.newInstance(), CTColor.Factory.newInstance());
+ setValue(color);
+ }
+
+ @Internal
+ protected XDDFColorSystemDefined(CTSystemColor color) {
+ this(color, null);
+ }
+
+ @Internal
+ protected XDDFColorSystemDefined(CTSystemColor color, CTColor container) {
+ super(container);
+ this.color = color;
+ }
+
+ @Override
+ @Internal
+ protected XmlObject getXmlObject() {
+ return color;
+ }
+
+ public SystemColor getValue() {
+ return SystemColor.valueOf(color.getVal());
+ }
+
+ public void setValue(SystemColor value) {
+ color.setVal(value.underlying);
+ }
+
+ public byte[] getLastColor() {
+ if (color.isSetLastClr()) {
+ return color.getLastClr();
+ } else {
+ return null;
+ }
+ }
+
+ public void setLastColor(byte[] last) {
+ if (last == null) {
+ if (color.isSetLastClr()) {
+ color.unsetLastClr();
+ }
+ } else {
+ color.setLastClr(last);
+ }
+ }
+}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFConnectionSite.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFConnectionSite.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFConnectionSite.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFConnectionSite.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,39 @@
+/*
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ====================================================================
+ */
+
+package org.apache.poi.xddf.usermodel;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTConnectionSite;
+
+@Beta
+public class XDDFConnectionSite {
+ private CTConnectionSite site;
+
+ @Internal
+ protected XDDFConnectionSite(CTConnectionSite site) {
+ this.site = site;
+ }
+
+ @Internal
+ public CTConnectionSite getXmlObject() {
+ return site;
+ }
+}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFCustomGeometry2D.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFCustomGeometry2D.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFCustomGeometry2D.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFCustomGeometry2D.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,288 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xddf.usermodel;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTCustomGeometry2D;
+
+@Beta
+public class XDDFCustomGeometry2D {
+ private CTCustomGeometry2D geometry;
+
+ protected XDDFCustomGeometry2D(CTCustomGeometry2D geometry) {
+ this.geometry = geometry;
+ }
+
+ @Internal
+ protected CTCustomGeometry2D getXmlObject() {
+ return geometry;
+ }
+
+ public XDDFGeometryRectangle getRectangle() {
+ if (geometry.isSetRect()) {
+ return new XDDFGeometryRectangle(geometry.getRect());
+ } else {
+ return null;
+ }
+ }
+
+ public void setRectangle(XDDFGeometryRectangle rectangle) {
+ if (rectangle == null) {
+ if (geometry.isSetRect()) {
+ geometry.unsetRect();
+ }
+ } else {
+ geometry.setRect(rectangle.getXmlObject());
+ }
+ }
+
+ public XDDFAdjustHandlePolar addPolarAdjustHandle() {
+ if (!geometry.isSetAhLst()) {
+ geometry.addNewAhLst();
+ }
+ return new XDDFAdjustHandlePolar(geometry.getAhLst().addNewAhPolar());
+ }
+
+ public XDDFAdjustHandlePolar insertPolarAdjustHandle(int index) {
+ if (!geometry.isSetAhLst()) {
+ geometry.addNewAhLst();
+ }
+ return new XDDFAdjustHandlePolar(geometry.getAhLst().insertNewAhPolar(index));
+ }
+
+ public void removePolarAdjustHandle(int index) {
+ if (geometry.isSetAhLst()) {
+ geometry.getAhLst().removeAhPolar(index);
+ }
+ }
+
+ public XDDFAdjustHandlePolar getPolarAdjustHandle(int index) {
+ if (geometry.isSetAhLst()) {
+ return new XDDFAdjustHandlePolar(geometry.getAhLst().getAhPolarArray(index));
+ } else {
+ return null;
+ }
+ }
+
+ public List<XDDFAdjustHandlePolar> getPolarAdjustHandles() {
+ if (geometry.isSetAhLst()) {
+ return Collections.unmodifiableList(geometry
+ .getAhLst()
+ .getAhPolarList()
+ .stream()
+ .map(guide -> new XDDFAdjustHandlePolar(guide))
+ .collect(Collectors.toList()));
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public XDDFAdjustHandleXY addXYAdjustHandle() {
+ if (!geometry.isSetAhLst()) {
+ geometry.addNewAhLst();
+ }
+ return new XDDFAdjustHandleXY(geometry.getAhLst().addNewAhXY());
+ }
+
+ public XDDFAdjustHandleXY insertXYAdjustHandle(int index) {
+ if (!geometry.isSetAhLst()) {
+ geometry.addNewAhLst();
+ }
+ return new XDDFAdjustHandleXY(geometry.getAhLst().insertNewAhXY(index));
+ }
+
+ public void removeXYAdjustHandle(int index) {
+ if (geometry.isSetAhLst()) {
+ geometry.getAhLst().removeAhXY(index);
+ }
+ }
+
+ public XDDFAdjustHandleXY getXYAdjustHandle(int index) {
+ if (geometry.isSetAhLst()) {
+ return new XDDFAdjustHandleXY(geometry.getAhLst().getAhXYArray(index));
+ } else {
+ return null;
+ }
+ }
+
+ public List<XDDFAdjustHandleXY> getXYAdjustHandles() {
+ if (geometry.isSetAhLst()) {
+ return Collections.unmodifiableList(geometry
+ .getAhLst()
+ .getAhXYList()
+ .stream()
+ .map(guide -> new XDDFAdjustHandleXY(guide))
+ .collect(Collectors.toList()));
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public XDDFGeometryGuide addAdjustValue() {
+ if (!geometry.isSetAvLst()) {
+ geometry.addNewAvLst();
+ }
+ return new XDDFGeometryGuide(geometry.getAvLst().addNewGd());
+ }
+
+ public XDDFGeometryGuide insertAdjustValue(int index) {
+ if (!geometry.isSetAvLst()) {
+ geometry.addNewAvLst();
+ }
+ return new XDDFGeometryGuide(geometry.getAvLst().insertNewGd(index));
+ }
+
+ public void removeAdjustValue(int index) {
+ if (geometry.isSetAvLst()) {
+ geometry.getAvLst().removeGd(index);
+ }
+ }
+
+ public XDDFGeometryGuide getAdjustValue(int index) {
+ if (geometry.isSetAvLst()) {
+ return new XDDFGeometryGuide(geometry.getAvLst().getGdArray(index));
+ } else {
+ return null;
+ }
+ }
+
+ public List<XDDFGeometryGuide> getAdjustValues() {
+ if (geometry.isSetAvLst()) {
+ return Collections.unmodifiableList(geometry
+ .getAvLst()
+ .getGdList()
+ .stream()
+ .map(guide -> new XDDFGeometryGuide(guide))
+ .collect(Collectors.toList()));
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public XDDFConnectionSite addConnectionSite() {
+ if (!geometry.isSetCxnLst()) {
+ geometry.addNewCxnLst();
+ }
+ return new XDDFConnectionSite(geometry.getCxnLst().addNewCxn());
+ }
+
+ public XDDFConnectionSite insertConnectionSite(int index) {
+ if (!geometry.isSetCxnLst()) {
+ geometry.addNewCxnLst();
+ }
+ return new XDDFConnectionSite(geometry.getCxnLst().insertNewCxn(index));
+ }
+
+ public void removeConnectionSite(int index) {
+ if (geometry.isSetCxnLst()) {
+ geometry.getCxnLst().removeCxn(index);
+ }
+ }
+
+ public XDDFConnectionSite getConnectionSite(int index) {
+ if (geometry.isSetCxnLst()) {
+ return new XDDFConnectionSite(geometry.getCxnLst().getCxnArray(index));
+ } else {
+ return null;
+ }
+ }
+
+ public List<XDDFConnectionSite> getConnectionSites() {
+ if (geometry.isSetCxnLst()) {
+ return Collections.unmodifiableList(geometry
+ .getCxnLst()
+ .getCxnList()
+ .stream()
+ .map(guide -> new XDDFConnectionSite(guide))
+ .collect(Collectors.toList()));
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public XDDFGeometryGuide addGuide() {
+ if (!geometry.isSetGdLst()) {
+ geometry.addNewGdLst();
+ }
+ return new XDDFGeometryGuide(geometry.getGdLst().addNewGd());
+ }
+
+ public XDDFGeometryGuide insertGuide(int index) {
+ if (!geometry.isSetGdLst()) {
+ geometry.addNewGdLst();
+ }
+ return new XDDFGeometryGuide(geometry.getGdLst().insertNewGd(index));
+ }
+
+ public void removeGuide(int index) {
+ if (geometry.isSetGdLst()) {
+ geometry.getGdLst().removeGd(index);
+ }
+ }
+
+ public XDDFGeometryGuide getGuide(int index) {
+ if (geometry.isSetGdLst()) {
+ return new XDDFGeometryGuide(geometry.getGdLst().getGdArray(index));
+ } else {
+ return null;
+ }
+ }
+
+ public List<XDDFGeometryGuide> getGuides() {
+ if (geometry.isSetGdLst()) {
+ return Collections.unmodifiableList(geometry
+ .getGdLst()
+ .getGdList()
+ .stream()
+ .map(guide -> new XDDFGeometryGuide(guide))
+ .collect(Collectors.toList()));
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public XDDFPath addNewPath() {
+ return new XDDFPath(geometry.getPathLst().addNewPath());
+ }
+
+ public XDDFPath insertNewPath(int index) {
+ return new XDDFPath(geometry.getPathLst().insertNewPath(index));
+ }
+
+ public void removePath(int index) {
+ geometry.getPathLst().removePath(index);
+ }
+
+ public XDDFPath getPath(int index) {
+ return new XDDFPath(geometry.getPathLst().getPathArray(index));
+ }
+
+ public List<XDDFPath> getPaths() {
+ return Collections.unmodifiableList(geometry
+ .getPathLst()
+ .getPathList()
+ .stream()
+ .map(ds -> new XDDFPath(ds))
+ .collect(Collectors.toList()));
+ }
+}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFDashStop.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFDashStop.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFDashStop.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFDashStop.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,53 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xddf.usermodel;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTDashStop;
+
+@Beta
+public class XDDFDashStop {
+ private CTDashStop stop;
+
+ @Internal
+ protected XDDFDashStop(CTDashStop stop) {
+ this.stop = stop;
+ }
+
+ @Internal
+ protected CTDashStop getXmlObject() {
+ return stop;
+ }
+
+ public int getDashLength() {
+ return stop.getD();
+ }
+
+ public void setDashLength(int length) {
+ stop.setD(length);
+ }
+
+ public int getSpaceLength() {
+ return stop.getSp();
+ }
+
+ public void setSpaceLength(int length) {
+ stop.setSp(length);
+ }
+}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFEffectContainer.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFEffectContainer.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFEffectContainer.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFEffectContainer.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,37 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xddf.usermodel;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTEffectContainer;
+
+@Beta
+public class XDDFEffectContainer {
+ private CTEffectContainer container;
+
+ @Internal
+ protected XDDFEffectContainer(CTEffectContainer container) {
+ this.container = container;
+ }
+
+ @Internal
+ public CTEffectContainer getXmlObject() {
+ return container;
+ }
+}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFEffectList.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFEffectList.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFEffectList.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFEffectList.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,37 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xddf.usermodel;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTEffectList;
+
+@Beta
+public class XDDFEffectList {
+ private CTEffectList list;
+
+ @Internal
+ protected XDDFEffectList(CTEffectList list) {
+ this.list = list;
+ }
+
+ @Internal
+ public CTEffectList getXmlObject() {
+ return list;
+ }
+}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFExtensionList.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFExtensionList.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFExtensionList.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFExtensionList.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,37 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xddf.usermodel;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTOfficeArtExtensionList;
+
+@Beta
+public class XDDFExtensionList {
+ private CTOfficeArtExtensionList list;
+
+ @Internal
+ protected XDDFExtensionList(CTOfficeArtExtensionList list) {
+ this.list = list;
+ }
+
+ @Internal
+ public CTOfficeArtExtensionList getXmlObject() {
+ return list;
+ }
+}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFFillProperties.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFFillProperties.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFFillProperties.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFFillProperties.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,24 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xddf.usermodel;
+
+import org.apache.poi.util.Beta;
+
+@Beta
+public interface XDDFFillProperties {
+}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGeometryGuide.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGeometryGuide.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGeometryGuide.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGeometryGuide.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,53 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xddf.usermodel;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTGeomGuide;
+
+@Beta
+public class XDDFGeometryGuide {
+ private CTGeomGuide guide;
+
+ @Internal
+ protected XDDFGeometryGuide(CTGeomGuide guide) {
+ this.guide = guide;
+ }
+
+ @Internal
+ protected CTGeomGuide getXmlObject() {
+ return guide;
+ }
+
+ public String getFormula() {
+ return guide.getFmla();
+ }
+
+ public void setFormula(String formula) {
+ guide.setFmla(formula);
+ }
+
+ public String getName() {
+ return guide.getName();
+ }
+
+ public void setName(String name) {
+ guide.setName(name);
+ }
+}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGeometryRectangle.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGeometryRectangle.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGeometryRectangle.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGeometryRectangle.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,39 @@
+/*
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ====================================================================
+ */
+
+package org.apache.poi.xddf.usermodel;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTGeomRect;
+
+@Beta
+public class XDDFGeometryRectangle {
+ private CTGeomRect rectangle;
+
+ @Internal
+ protected XDDFGeometryRectangle(CTGeomRect rectangle) {
+ this.rectangle = rectangle;
+ }
+
+ @Internal
+ public CTGeomRect getXmlObject() {
+ return rectangle;
+ }
+}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGradientFillProperties.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGradientFillProperties.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGradientFillProperties.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGradientFillProperties.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,182 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xddf.usermodel;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTGradientFillProperties;
+
+@Beta
+public class XDDFGradientFillProperties implements XDDFFillProperties {
+ private CTGradientFillProperties props;
+
+ public XDDFGradientFillProperties() {
+ this(CTGradientFillProperties.Factory.newInstance());
+ }
+
+ protected XDDFGradientFillProperties(CTGradientFillProperties properties) {
+ this.props = properties;
+ }
+
+ @Internal
+ protected CTGradientFillProperties getXmlObject() {
+ return props;
+ }
+
+ public Boolean isRotatingWithShape() {
+ if (props.isSetRotWithShape()) {
+ return props.getRotWithShape();
+ } else {
+ return null;
+ }
+ }
+
+ public void setRotatingWithShape(Boolean rotating) {
+ if (rotating == null) {
+ if (props.isSetRotWithShape()) {
+ props.unsetRotWithShape();
+ }
+ } else {
+ props.setRotWithShape(rotating);
+ }
+ }
+
+ public TileFlipMode getTileFlipMode() {
+ if (props.isSetFlip()) {
+ return TileFlipMode.valueOf(props.getFlip());
+ } else {
+ return null;
+ }
+ }
+
+ public void setTileFlipMode(TileFlipMode mode) {
+ if (mode == null) {
+ if (props.isSetFlip()) {
+ props.unsetFlip();
+ }
+ } else {
+ props.setFlip(mode.underlying);
+ }
+ }
+
+ public XDDFGradientStop addGradientStop() {
+ if (!props.isSetGsLst()) {
+ props.addNewGsLst();
+ }
+ return new XDDFGradientStop(props.getGsLst().addNewGs());
+ }
+
+ public XDDFGradientStop insertGradientStop(int index) {
+ if (!props.isSetGsLst()) {
+ props.addNewGsLst();
+ }
+ return new XDDFGradientStop(props.getGsLst().insertNewGs(index));
+ }
+
+ public void removeGradientStop(int index) {
+ if (props.isSetGsLst()) {
+ props.getGsLst().removeGs(index);
+ }
+ }
+
+ public XDDFGradientStop getGradientStop(int index) {
+ if (props.isSetGsLst()) {
+ return new XDDFGradientStop(props.getGsLst().getGsArray(index));
+ } else {
+ return null;
+ }
+ }
+
+ public List<XDDFGradientStop> getGradientStops() {
+ if (props.isSetGsLst()) {
+ return Collections.unmodifiableList(props
+ .getGsLst()
+ .getGsList()
+ .stream()
+ .map(gs -> new XDDFGradientStop(gs))
+ .collect(Collectors.toList()));
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public int countGradientStops() {
+ if (props.isSetGsLst()) {
+ return props.getGsLst().sizeOfGsArray();
+ } else {
+ return 0;
+ }
+ }
+
+ public XDDFLinearShadeProperties getLinearShadeProperties() {
+ if (props.isSetLin()) {
+ return new XDDFLinearShadeProperties(props.getLin());
+ } else {
+ return null;
+ }
+ }
+
+ public void setLinearShadeProperties(XDDFLinearShadeProperties properties) {
+ if (properties == null) {
+ if (props.isSetLin()) {
+ props.unsetLin();
+ }
+ } else {
+ props.setLin(properties.getXmlObject());
+ }
+ }
+
+ public XDDFPathShadeProperties getPathShadeProperties() {
+ if (props.isSetPath()) {
+ return new XDDFPathShadeProperties(props.getPath());
+ } else {
+ return null;
+ }
+ }
+
+ public void setPathShadeProperties(XDDFPathShadeProperties properties) {
+ if (properties == null) {
+ if (props.isSetPath()) {
+ props.unsetPath();
+ }
+ } else {
+ props.setPath(properties.getXmlObject());
+ }
+ }
+
+ public XDDFRelativeRectangle getTileRectangle() {
+ if (props.isSetTileRect()) {
+ return new XDDFRelativeRectangle(props.getTileRect());
+ } else {
+ return null;
+ }
+ }
+ public void setTileRectangle(XDDFRelativeRectangle rectangle) {
+ if (rectangle == null) {
+ if (props.isSetTileRect()) {
+ props.unsetTileRect();
+ }
+ } else {
+ props.setTileRect(rectangle.getXmlObject());
+ }
+ }
+}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGradientStop.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGradientStop.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGradientStop.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGradientStop.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,105 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xddf.usermodel;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTGradientStop;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTHslColor;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTPresetColor;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTSRgbColor;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTScRgbColor;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTSchemeColor;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTSystemColor;
+
+@Beta
+public class XDDFGradientStop {
+ private CTGradientStop stop;
+
+ @Internal
+ protected XDDFGradientStop(CTGradientStop stop) {
+ this.stop = stop;
+ }
+
+ @Internal
+ protected CTGradientStop getXmlObject() {
+ return stop;
+ }
+
+ public int getPosition() {
+ return stop.getPos();
+ }
+
+ public void setPosition(int position) {
+ stop.setPos(position);
+ }
+
+ public XDDFColor getColor() {
+ if (stop.isSetHslClr()) {
+ return new XDDFColorHsl(stop.getHslClr());
+ } else if (stop.isSetPrstClr()) {
+ return new XDDFColorPreset(stop.getPrstClr());
+ } else if (stop.isSetSchemeClr()) {
+ return new XDDFColorSchemeBased(stop.getSchemeClr());
+ } else if (stop.isSetScrgbClr()) {
+ return new XDDFColorRgbPercent(stop.getScrgbClr());
+ } else if (stop.isSetSrgbClr()) {
+ return new XDDFColorRgbBinary(stop.getSrgbClr());
+ } else if (stop.isSetSysClr()) {
+ return new XDDFColorSystemDefined(stop.getSysClr());
+ }
+ return null;
+ }
+
+ public void setColor(XDDFColor color) {
+ if (stop.isSetHslClr()) {
+ stop.unsetHslClr();
+ }
+ if (stop.isSetPrstClr()) {
+ stop.unsetPrstClr();
+ }
+ if (stop.isSetSchemeClr()) {
+ stop.unsetSchemeClr();
+ }
+ if (stop.isSetScrgbClr()) {
+ stop.unsetScrgbClr();
+ }
+ if (stop.isSetSrgbClr()) {
+ stop.unsetSrgbClr();
+ }
+ if (stop.isSetSysClr()) {
+ stop.unsetSysClr();
+ }
+ if (color == null) {
+ return;
+ }
+ if (color instanceof XDDFColorHsl) {
+ stop.setHslClr((CTHslColor) color.getXmlObject());
+ } else if (color instanceof XDDFColorPreset) {
+ stop.setPrstClr((CTPresetColor) color.getXmlObject());
+ } else if (color instanceof XDDFColorSchemeBased) {
+ stop.setSchemeClr((CTSchemeColor) color.getXmlObject());
+ } else if (color instanceof XDDFColorRgbPercent) {
+ stop.setScrgbClr((CTScRgbColor) color.getXmlObject());
+ } else if (color instanceof XDDFColorRgbBinary) {
+ stop.setSrgbClr((CTSRgbColor) color.getXmlObject());
+ } else if (color instanceof XDDFColorSystemDefined) {
+ stop.setSysClr((CTSystemColor) color.getXmlObject());
+ }
+ }
+}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGroupFillProperties.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGroupFillProperties.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGroupFillProperties.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGroupFillProperties.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,40 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xddf.usermodel;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTGroupFillProperties;
+
+@Beta
+public class XDDFGroupFillProperties implements XDDFFillProperties {
+ private CTGroupFillProperties props;
+
+ public XDDFGroupFillProperties() {
+ this(CTGroupFillProperties.Factory.newInstance());
+ }
+
+ protected XDDFGroupFillProperties(CTGroupFillProperties properties) {
+ this.props = properties;
+ }
+
+ @Internal
+ protected CTGroupFillProperties getXmlObject() {
+ return props;
+ }
+}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineEndProperties.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineEndProperties.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineEndProperties.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineEndProperties.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,60 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xddf.usermodel;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTLineEndProperties;
+
+@Beta
+public class XDDFLineEndProperties {
+ private CTLineEndProperties props;
+
+ protected XDDFLineEndProperties(CTLineEndProperties properties) {
+ this.props = properties;
+ }
+
+ @Internal
+ protected CTLineEndProperties getXmlObject() {
+ return props;
+ }
+
+ public LineEndLength getLength() {
+ return LineEndLength.valueOf(props.getLen());
+ }
+
+ public void setLength(LineEndLength length) {
+ props.setLen(length.underlying);
+ }
+
+ public LineEndType getType() {
+ return LineEndType.valueOf(props.getType());
+ }
+
+ public void setType(LineEndType type) {
+ props.setType(type.underlying);
+ }
+
+ public LineEndWidth getWidth() {
+ return LineEndWidth.valueOf(props.getW());
+ }
+
+ public void setWidth(LineEndWidth width) {
+ props.setW(width.underlying);
+ }
+}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineJoinBevelProperties.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineJoinBevelProperties.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineJoinBevelProperties.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineJoinBevelProperties.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,39 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xddf.usermodel;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTLineJoinBevel;
+
+@Beta
+public class XDDFLineJoinBevelProperties implements XDDFLineJoinProperties {
+ private CTLineJoinBevel join;
+
+ public XDDFLineJoinBevelProperties() {
+ this(CTLineJoinBevel.Factory.newInstance());
+ }
+ protected XDDFLineJoinBevelProperties(CTLineJoinBevel join) {
+ this.join = join;
+ }
+
+ @Internal
+ protected CTLineJoinBevel getXmlObject() {
+ return join;
+ }
+}
Copied: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineJoinMiterProperties.java (from r1820242, poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFLayout.java)
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineJoinMiterProperties.java?p2=poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineJoinMiterProperties.java&p1=poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFLayout.java&r1=1820242&r2=1820369&rev=1820369&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFLayout.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineJoinMiterProperties.java Sat Jan 6 02:51:53 2018
@@ -15,59 +15,44 @@
limitations under the License.
==================================================================== */
-package org.apache.poi.xddf.usermodel.chart;
+package org.apache.poi.xddf.usermodel;
import org.apache.poi.util.Beta;
import org.apache.poi.util.Internal;
-import org.openxmlformats.schemas.drawingml.x2006.chart.CTLayout;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTLineJoinMiterProperties;
@Beta
-public class XDDFLayout {
- private CTLayout layout;
+public class XDDFLineJoinMiterProperties implements XDDFLineJoinProperties {
+ private CTLineJoinMiterProperties join;
- public XDDFLayout() {
- this(CTLayout.Factory.newInstance());
+ public XDDFLineJoinMiterProperties() {
+ this(CTLineJoinMiterProperties.Factory.newInstance());
}
- @Internal
- protected XDDFLayout(CTLayout layout) {
- this.layout = layout;
+ protected XDDFLineJoinMiterProperties(CTLineJoinMiterProperties join) {
+ this.join = join;
}
@Internal
- protected CTLayout getXmlObject() {
- return layout;
- }
-
- public void setExtensionList(XDDFChartExtensionList list) {
- if (list == null) {
- layout.unsetExtLst();
- } else {
- layout.setExtLst(list.getXmlObject());
- }
+ protected CTLineJoinMiterProperties getXmlObject() {
+ return join;
}
- public XDDFChartExtensionList getExtensionList() {
- if (layout.isSetExtLst()) {
- return new XDDFChartExtensionList(layout.getExtLst());
+ public Integer getLimit() {
+ if (join.isSetLim()) {
+ return join.getLim();
} else {
return null;
}
}
- public void setManualLayout(XDDFManualLayout manual) {
- if (manual == null) {
- layout.unsetManualLayout();
+ public void setLimit(Integer limit) {
+ if (limit == null) {
+ if (join.isSetLim()) {
+ join.unsetLim();
+ }
} else {
- layout.setManualLayout(manual.getXmlObject());
- }
- }
-
- public XDDFManualLayout getManualLayout() {
- if (layout.isSetManualLayout()) {
- return new XDDFManualLayout(layout);
- } else {
- return null;
+ join.setLim(limit);
}
}
}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineJoinProperties.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineJoinProperties.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineJoinProperties.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineJoinProperties.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,24 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xddf.usermodel;
+
+import org.apache.poi.util.Beta;
+
+@Beta
+public interface XDDFLineJoinProperties {
+}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineJoinRoundProperties.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineJoinRoundProperties.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineJoinRoundProperties.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineJoinRoundProperties.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,40 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xddf.usermodel;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTLineJoinRound;
+
+@Beta
+public class XDDFLineJoinRoundProperties implements XDDFLineJoinProperties {
+ private CTLineJoinRound join;
+
+ public XDDFLineJoinRoundProperties() {
+ this(CTLineJoinRound.Factory.newInstance());
+ }
+
+ protected XDDFLineJoinRoundProperties(CTLineJoinRound join) {
+ this.join = join;
+ }
+
+ @Internal
+ protected CTLineJoinRound getXmlObject() {
+ return join;
+ }
+}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineProperties.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineProperties.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineProperties.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLineProperties.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,313 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xddf.usermodel;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTLineProperties;
+
+@Beta
+public class XDDFLineProperties {
+ private CTLineProperties props;
+
+ public XDDFLineProperties() {
+ this(CTLineProperties.Factory.newInstance());
+ }
+
+ @Internal
+ protected XDDFLineProperties(CTLineProperties properties) {
+ this.props = properties;
+ }
+
+ @Internal
+ protected CTLineProperties getXmlObject() {
+ return props;
+ }
+
+ public PenAlignment getPenAlignment() {
+ if (props.isSetAlgn()) {
+ return PenAlignment.valueOf(props.getAlgn());
+ } else {
+ return null;
+ }
+ }
+
+ public void setPenAlignment(PenAlignment alignment) {
+ if (alignment == null) {
+ if (props.isSetAlgn()) {
+ props.unsetAlgn();
+ }
+ } else {
+ props.setAlgn(alignment.underlying);
+ }
+ }
+
+ public LineCap getLineCap() {
+ if (props.isSetCap()) {
+ return LineCap.valueOf(props.getCap());
+ } else {
+ return null;
+ }
+ }
+
+ public void setLineCap(LineCap cap) {
+ if (cap == null) {
+ if (props.isSetCap()) {
+ props.unsetCap();
+ }
+ } else {
+ props.setCap(cap.underlying);
+ }
+ }
+
+ public CompoundLine getCompoundLine() {
+ if (props.isSetCmpd()) {
+ return CompoundLine.valueOf(props.getCmpd());
+ } else {
+ return null;
+ }
+ }
+
+ public void setCompoundLine(CompoundLine compound) {
+ if (compound == null) {
+ if (props.isSetCmpd()) {
+ props.unsetCmpd();
+ }
+ } else {
+ props.setCmpd(compound.underlying);
+ }
+ }
+
+ public XDDFDashStop addDashStop() {
+ if (!props.isSetCustDash()) {
+ props.addNewCustDash();
+ }
+ return new XDDFDashStop(props.getCustDash().addNewDs());
+ }
+
+ public XDDFDashStop insertDashStop(int index) {
+ if (!props.isSetCustDash()) {
+ props.addNewCustDash();
+ }
+ return new XDDFDashStop(props.getCustDash().insertNewDs(index));
+ }
+
+ public void removeDashStop(int index) {
+ if (props.isSetCustDash()) {
+ props.getCustDash().removeDs(index);
+ }
+ }
+
+ public XDDFDashStop getDashStop(int index) {
+ if (props.isSetCustDash()) {
+ return new XDDFDashStop(props.getCustDash().getDsArray(index));
+ } else {
+ return null;
+ }
+ }
+
+ public List<XDDFDashStop> getDashStops() {
+ if (props.isSetCustDash()) {
+ return Collections.unmodifiableList(props
+ .getCustDash()
+ .getDsList()
+ .stream()
+ .map(ds -> new XDDFDashStop(ds))
+ .collect(Collectors.toList()));
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public int countDashStops() {
+ if (props.isSetCustDash()) {
+ return props.getCustDash().sizeOfDsArray();
+ } else {
+ return 0;
+ }
+ }
+
+ public XDDFPresetLineDash getPresetDash() {
+ if (props.isSetPrstDash()) {
+ return new XDDFPresetLineDash(props.getPrstDash());
+ } else {
+ return null;
+ }
+ }
+
+ public void setPresetDash(XDDFPresetLineDash properties) {
+ if (properties == null) {
+ if (props.isSetPrstDash()) {
+ props.unsetPrstDash();
+ }
+ } else {
+ props.setPrstDash(properties.getXmlObject());
+ }
+ }
+
+ public XDDFExtensionList getExtensionList() {
+ if (props.isSetExtLst()) {
+ return new XDDFExtensionList(props.getExtLst());
+ } else {
+ return null;
+ }
+ }
+
+ public void setExtensionList(XDDFExtensionList list) {
+ if (list == null) {
+ if (props.isSetExtLst()) {
+ props.unsetExtLst();
+ }
+ } else {
+ props.setExtLst(list.getXmlObject());
+ }
+ }
+
+ public XDDFFillProperties getFillProperties() {
+ if (props.isSetGradFill()) {
+ return new XDDFGradientFillProperties(props.getGradFill());
+ } else if (props.isSetNoFill()) {
+ return new XDDFNoFillProperties(props.getNoFill());
+ } else if (props.isSetPattFill()) {
+ return new XDDFPatternFillProperties(props.getPattFill());
+ } else if (props.isSetSolidFill()) {
+ return new XDDFSolidFillProperties(props.getSolidFill());
+ } else {
+ return null;
+ }
+ }
+
+ public void setFillProperties(XDDFFillProperties properties) {
+ if (props.isSetGradFill()) {
+ props.unsetGradFill();
+ }
+ if (props.isSetNoFill()) {
+ props.unsetNoFill();
+ }
+ if (props.isSetPattFill()) {
+ props.unsetPattFill();
+ }
+ if (props.isSetSolidFill()) {
+ props.unsetSolidFill();
+ }
+ if (properties == null) {
+ return;
+ }
+ if (properties instanceof XDDFGradientFillProperties) {
+ props.setGradFill(((XDDFGradientFillProperties) properties).getXmlObject());
+ } else if (properties instanceof XDDFNoFillProperties) {
+ props.setNoFill(((XDDFNoFillProperties) properties).getXmlObject());
+ } else if (properties instanceof XDDFPatternFillProperties) {
+ props.setPattFill(((XDDFPatternFillProperties) properties).getXmlObject());
+ } else if (properties instanceof XDDFSolidFillProperties) {
+ props.setSolidFill(((XDDFSolidFillProperties) properties).getXmlObject());
+ }
+ }
+
+ public XDDFLineJoinProperties getLineJoinProperties() {
+ if (props.isSetBevel()) {
+ return new XDDFLineJoinBevelProperties(props.getBevel());
+ } else if (props.isSetMiter()) {
+ return new XDDFLineJoinMiterProperties(props.getMiter());
+ } else if (props.isSetRound()) {
+ return new XDDFLineJoinRoundProperties(props.getRound());
+ } else {
+ return null;
+ }
+ }
+
+ public void setLineJoinProperties(XDDFLineJoinProperties properties) {
+ if (props.isSetBevel()) {
+ props.unsetBevel();
+ }
+ if (props.isSetMiter()) {
+ props.unsetMiter();
+ }
+ if (props.isSetRound()) {
+ props.unsetRound();
+ }
+ if (properties == null) {
+ return;
+ }
+ if (properties instanceof XDDFLineJoinBevelProperties) {
+ props.setBevel(((XDDFLineJoinBevelProperties) properties).getXmlObject());
+ } else if (properties instanceof XDDFLineJoinMiterProperties) {
+ props.setMiter(((XDDFLineJoinMiterProperties) properties).getXmlObject());
+ } else if (properties instanceof XDDFLineJoinRoundProperties) {
+ props.setRound(((XDDFLineJoinRoundProperties) properties).getXmlObject());
+ }
+ }
+
+ public XDDFLineEndProperties getHeadEnd() {
+ if (props.isSetHeadEnd()) {
+ return new XDDFLineEndProperties(props.getHeadEnd());
+ } else {
+ return null;
+ }
+ }
+
+ public void setHeadEnd(XDDFLineEndProperties properties) {
+ if (properties == null) {
+ if (props.isSetHeadEnd()) {
+ props.unsetHeadEnd();
+ }
+ } else {
+ props.setHeadEnd(properties.getXmlObject());
+ }
+ }
+
+ public XDDFLineEndProperties getTailEnd() {
+ if (props.isSetTailEnd()) {
+ return new XDDFLineEndProperties(props.getTailEnd());
+ } else {
+ return null;
+ }
+ }
+
+ public void setTailEnd(XDDFLineEndProperties properties) {
+ if (properties == null) {
+ if (props.isSetTailEnd()) {
+ props.unsetTailEnd();
+ }
+ } else {
+ props.setTailEnd(properties.getXmlObject());
+ }
+ }
+
+ public Integer getWidth() {
+ if (props.isSetW()) {
+ return props.getW();
+ } else {
+ return null;
+ }
+ }
+
+ public void setWidth(Integer width) {
+ if (width == null) {
+ if (props.isSetW()) {
+ props.unsetW();
+ }
+ } else {
+ props.setW(width);
+ }
+ }
+}
Copied: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLinearShadeProperties.java (from r1820242, poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFLayout.java)
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLinearShadeProperties.java?p2=poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLinearShadeProperties.java&p1=poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFLayout.java&r1=1820242&r2=1820369&rev=1820369&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFLayout.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFLinearShadeProperties.java Sat Jan 6 02:51:53 2018
@@ -15,59 +15,58 @@
limitations under the License.
==================================================================== */
-package org.apache.poi.xddf.usermodel.chart;
+package org.apache.poi.xddf.usermodel;
import org.apache.poi.util.Beta;
import org.apache.poi.util.Internal;
-import org.openxmlformats.schemas.drawingml.x2006.chart.CTLayout;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTLinearShadeProperties;
@Beta
-public class XDDFLayout {
- private CTLayout layout;
+public class XDDFLinearShadeProperties {
+ private CTLinearShadeProperties props;
- public XDDFLayout() {
- this(CTLayout.Factory.newInstance());
+ protected XDDFLinearShadeProperties(CTLinearShadeProperties properties) {
+ this.props = properties;
}
@Internal
- protected XDDFLayout(CTLayout layout) {
- this.layout = layout;
+ protected CTLinearShadeProperties getXmlObject() {
+ return props;
}
- @Internal
- protected CTLayout getXmlObject() {
- return layout;
- }
-
- public void setExtensionList(XDDFChartExtensionList list) {
- if (list == null) {
- layout.unsetExtLst();
+ public Integer getAngle() {
+ if (props.isSetAng()) {
+ return props.getAng();
} else {
- layout.setExtLst(list.getXmlObject());
+ return null;
}
}
- public XDDFChartExtensionList getExtensionList() {
- if (layout.isSetExtLst()) {
- return new XDDFChartExtensionList(layout.getExtLst());
+ public void setAngle(Integer angle) {
+ if (angle == null) {
+ if (props.isSetAng()) {
+ props.unsetAng();
+ }
} else {
- return null;
+ props.setAng(angle);
}
}
- public void setManualLayout(XDDFManualLayout manual) {
- if (manual == null) {
- layout.unsetManualLayout();
+ public Boolean getScaled() {
+ if (props.isSetScaled()) {
+ return props.getScaled();
} else {
- layout.setManualLayout(manual.getXmlObject());
+ return null;
}
}
- public XDDFManualLayout getManualLayout() {
- if (layout.isSetManualLayout()) {
- return new XDDFManualLayout(layout);
+ public void setScaled(Boolean scaled) {
+ if (scaled == null) {
+ if (props.isSetScaled()) {
+ props.unsetScaled();
+ }
} else {
- return null;
+ props.setScaled(scaled);
}
}
}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFNoFillProperties.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFNoFillProperties.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFNoFillProperties.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFNoFillProperties.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,40 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xddf.usermodel;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTNoFillProperties;
+
+@Beta
+public class XDDFNoFillProperties implements XDDFFillProperties {
+ private CTNoFillProperties props;
+
+ public XDDFNoFillProperties() {
+ this(CTNoFillProperties.Factory.newInstance());
+ }
+
+ protected XDDFNoFillProperties(CTNoFillProperties properties) {
+ this.props = properties;
+ }
+
+ @Internal
+ protected CTNoFillProperties getXmlObject() {
+ return props;
+ }
+}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFPath.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFPath.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFPath.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFPath.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,39 @@
+/*
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ====================================================================
+ */
+
+package org.apache.poi.xddf.usermodel;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTPath2D;
+
+@Beta
+public class XDDFPath {
+ private CTPath2D path;
+
+ @Internal
+ protected XDDFPath(CTPath2D path) {
+ this.path = path;
+ }
+
+ @Internal
+ public CTPath2D getXmlObject() {
+ return path;
+ }
+}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFPathShadeProperties.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFPathShadeProperties.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFPathShadeProperties.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFPathShadeProperties.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,76 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xddf.usermodel;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTPathShadeProperties;
+
+@Beta
+public class XDDFPathShadeProperties {
+ private CTPathShadeProperties props;
+
+ public XDDFPathShadeProperties() {
+ this(CTPathShadeProperties.Factory.newInstance());
+ }
+
+ protected XDDFPathShadeProperties(CTPathShadeProperties properties) {
+ this.props = properties;
+ }
+
+ @Internal
+ protected CTPathShadeProperties getXmlObject() {
+ return props;
+ }
+
+ public XDDFRelativeRectangle getFillToRectangle() {
+ if (props.isSetFillToRect()) {
+ return new XDDFRelativeRectangle(props.getFillToRect());
+ } else {
+ return null;
+ }
+ }
+
+ public void setFillToRectangle(XDDFRelativeRectangle rectangle) {
+ if (rectangle == null) {
+ if (props.isSetFillToRect()) {
+ props.unsetFillToRect();
+ }
+ } else {
+ props.setFillToRect(rectangle.getXmlObject());
+ }
+ }
+
+ public PathShadeType getPathShadeType() {
+ if (props.isSetPath()) {
+ return PathShadeType.valueOf(props.getPath());
+ } else {
+ return null;
+ }
+ }
+
+ public void setPathShadeType(PathShadeType path) {
+ if (path == null) {
+ if (props.isSetPath()) {
+ props.unsetPath();
+ }
+ } else {
+ props.setPath(path.underlying);
+ }
+ }
+}
Added: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFPatternFillProperties.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFPatternFillProperties.java?rev=1820369&view=auto
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFPatternFillProperties.java (added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFPatternFillProperties.java Sat Jan 6 02:51:53 2018
@@ -0,0 +1,94 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xddf.usermodel;
+
+import org.apache.poi.util.Beta;
+import org.apache.poi.util.Internal;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTPatternFillProperties;
+
+@Beta
+public class XDDFPatternFillProperties implements XDDFFillProperties {
+ private CTPatternFillProperties props;
+
+ public XDDFPatternFillProperties() {
+ this(CTPatternFillProperties.Factory.newInstance());
+ }
+
+ protected XDDFPatternFillProperties(CTPatternFillProperties properties) {
+ this.props = properties;
+ }
+
+ @Internal
+ protected CTPatternFillProperties getXmlObject() {
+ return props;
+ }
+
+ public PresetPattern getPresetPattern() {
+ if (props.isSetPrst()) {
+ return PresetPattern.valueOf(props.getPrst());
+ } else {
+ return null;
+ }
+ }
+
+ public void setPresetPattern(PresetPattern pattern) {
+ if (pattern == null) {
+ if (props.isSetPrst()) {
+ props.unsetPrst();
+ }
+ } else {
+ props.setPrst(pattern.underlying);
+ }
+ }
+
+ public XDDFColor getBackgroundColor() {
+ if (props.isSetBgClr()) {
+ return XDDFColor.forColorContainer(props.getBgClr());
+ } else {
+ return null;
+ }
+ }
+
+ public void setBackgroundColor(XDDFColor color) {
+ if (color == null) {
+ if (props.isSetBgClr()) {
+ props.unsetBgClr();
+ }
+ } else {
+ props.setBgClr(color.getColorContainer());
+ }
+ }
+
+ public XDDFColor getForegroundColor() {
+ if (props.isSetFgClr()) {
+ return XDDFColor.forColorContainer(props.getFgClr());
+ } else {
+ return null;
+ }
+ }
+
+ public void setForegroundColor(XDDFColor color) {
+ if (color == null) {
+ if (props.isSetFgClr()) {
+ props.unsetFgClr();
+ }
+ } else {
+ props.setFgClr(color.getColorContainer());
+ }
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org