--- /dev/null
+/*\r
+ * ====================================================================\r
+ * Licensed to the Apache Software Foundation (ASF) under one or more\r
+ * contributor license agreements. See the NOTICE file distributed with\r
+ * this work for additional information regarding copyright ownership.\r
+ * The ASF licenses this file to You under the Apache License, Version 2.0\r
+ * (the "License"); you may not use this file except in compliance with\r
+ * the License. You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * ====================================================================\r
+ */\r
+\r
+package org.apache.poi.ss.usermodel;\r
+\r
+import org.apache.poi.hssf.record.cf.Threshold;\r
+\r
+/**\r
+ * High level representation for the Color Scale / Colour Scale /\r
+ * Color Gradient Formatting component of Conditional Formatting settings\r
+ */\r
+public interface ColorScaleFormatting {\r
+ /**\r
+ * How many control points should be used to map \r
+ * the colours? Normally 2 or 3\r
+ */\r
+ int getNumControlPoints();\r
+ /**\r
+ * Sets the number of control points to use to map\r
+ * the colours. Should normally be 2 or 3.\r
+ * <p>After updating, you need to ensure that the\r
+ * {@link Threshold} count and Color count match\r
+ */\r
+ void setNumControlPoints(int num);\r
+\r
+ /**\r
+ * Gets the list of colours that are interpolated\r
+ * between.\r
+ */\r
+ Color[] getColors();\r
+ /**\r
+ * Sets the list of colours that are interpolated\r
+ * between. The number must match {@link #getNumControlPoints()}\r
+ */\r
+ void setColors(Color[] colors);\r
+ \r
+ /**\r
+ * Gets the list of thresholds\r
+ */\r
+ ConditionalFormattingThreshold[] getThresholds();\r
+ /**\r
+ * Sets the of thresholds. The number must match\r
+ * {@link #getNumControlPoints()}\r
+ */\r
+ void setThresholds(ConditionalFormattingThreshold[] thresholds);\r
+ /**\r
+ * Creates a new, empty Threshold\r
+ */\r
+ ConditionalFormattingThreshold createThreshold();\r
+}\r
--- /dev/null
+/*\r
+ * ====================================================================\r
+ * Licensed to the Apache Software Foundation (ASF) under one or more\r
+ * contributor license agreements. See the NOTICE file distributed with\r
+ * this work for additional information regarding copyright ownership.\r
+ * The ASF licenses this file to You under the Apache License, Version 2.0\r
+ * (the "License"); you may not use this file except in compliance with\r
+ * the License. You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * ====================================================================\r
+ */\r
+\r
+package org.apache.poi.ss.usermodel;\r
+\r
+/**\r
+ * High level representation for the DataBar Formatting \r
+ * component of Conditional Formatting settings\r
+ */\r
+public interface DataBarFormatting {\r
+ /**\r
+ * Is the bar drawn from Left-to-Right, or from\r
+ * Right-to-Left\r
+ */\r
+ boolean isLeftToRight();\r
+ /**\r
+ * Control if the bar is drawn from Left-to-Right,\r
+ * or from Right-to-Left\r
+ */\r
+ void setLeftToRight(boolean ltr);\r
+ \r
+ /**\r
+ * Should Icon + Value be displayed, or only the Icon?\r
+ */\r
+ boolean isIconOnly();\r
+ /**\r
+ * Control if only the Icon is shown, or Icon + Value\r
+ */\r
+ void setIconOnly(boolean only);\r
+ \r
+ /**\r
+ * How much of the cell width, in %, should be given to\r
+ * the min value?\r
+ */\r
+ int getWidthMin();\r
+ void setWidthMin(int width);\r
+ \r
+ /**\r
+ * How much of the cell width, in %, should be given to\r
+ * the max value?\r
+ */\r
+ int getWidthMax();\r
+ void setWidthMax(int width);\r
+ \r
+ Color getColor();\r
+ void setColor(Color color);\r
+ \r
+ /**\r
+ * The threshold that defines "everything from here down is minimum"\r
+ */\r
+ ConditionalFormattingThreshold getMinThreshold();\r
+ /**\r
+ * The threshold that defines "everything from here up is maximum"\r
+ */\r
+ ConditionalFormattingThreshold getMaxThreshold();\r
+}\r