You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ni...@apache.org on 2015/07/15 00:43:22 UTC
svn commit: r1691101 -
/poi/trunk/src/java/org/apache/poi/ss/usermodel/IconMultiStateFormatting.java
Author: nick
Date: Tue Jul 14 22:43:22 2015
New Revision: 1691101
URL: http://svn.apache.org/r1691101
Log:
More CF Icon descriptions and interfaces #58130
Modified:
poi/trunk/src/java/org/apache/poi/ss/usermodel/IconMultiStateFormatting.java
Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/IconMultiStateFormatting.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/IconMultiStateFormatting.java?rev=1691101&r1=1691100&r2=1691101&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/IconMultiStateFormatting.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/IconMultiStateFormatting.java Tue Jul 14 22:43:22 2015
@@ -25,42 +25,74 @@ package org.apache.poi.ss.usermodel;
*/
public interface IconMultiStateFormatting {
class IconSet {
+ /** Numeric ID of the icon set */
public final int id;
+ /** How many icons in the set */
+ public final int num;
+ /** Name (system) of the set */
public final String name;
public String toString() {
return id + " - " + (name==null?"default":name);
}
- private IconSet(int id, String name) {
- this.id = id; this.name = name;
+ private IconSet(int id, int num, String name) {
+ this.id = id; this.num = num; this.name = name;
}
}
/** Green Up / Yellow Side / Red Down arrows */
- static final IconSet GYR_3_ARROWS = new IconSet(0, "3Arrows");
+ static final IconSet GYR_3_ARROWS = new IconSet(0, 3, "3Arrows");
/** Grey Up / Side / Down arrows */
- static final IconSet GREY_3_ARROWS = new IconSet(1, "3ArrowsGray");
+ static final IconSet GREY_3_ARROWS = new IconSet(1, 3, "3ArrowsGray");
/** Green / Yellow / Red flags */
- static final IconSet GYR_3_FLAGS = new IconSet(2, "3Flags");
+ static final IconSet GYR_3_FLAGS = new IconSet(2, 3, "3Flags");
/** Green / Yellow / Red traffic lights (no background) */
- static final IconSet GYR_3_TRAFFIC_LIGHTS = new IconSet(3, null);
+ static final IconSet GYR_3_TRAFFIC_LIGHTS = new IconSet(3, 3, null);
/** Green Circle / Yellow Triangle / Red Diamond */
- static final IconSet GYR_3_SHAPES = new IconSet(4, "3Signs");
+ static final IconSet GYR_3_SHAPES = new IconSet(4, 3, "3Signs");
/** Green / Yellow / Red traffic lights on a black square background */
- static final IconSet GYR_3_TRAFFIC_LIGHTS_BOX = new IconSet(5, "3TrafficLights2");
+ static final IconSet GYR_3_TRAFFIC_LIGHTS_BOX = new IconSet(5, 3, "3TrafficLights2");
/** Green Tick / Yellow ! / Red Cross on a circle background */
- static final IconSet GYR_3_SYMBOLS_CIRCLE = new IconSet(6, "3Symbols");
+ static final IconSet GYR_3_SYMBOLS_CIRCLE = new IconSet(6, 3, "3Symbols");
/** Green Tick / Yellow ! / Red Cross (no background) */
- static final IconSet GYR_3_SYMBOLS = new IconSet(7, "3Symbols2");
+ static final IconSet GYR_3_SYMBOLS = new IconSet(7, 3, "3Symbols2");
/** Green Up / Yellow NE / Yellow SE / Red Down arrows */
- static final IconSet GYR_4_ARROWS = new IconSet(8, "4Arrows");
+ static final IconSet GYR_4_ARROWS = new IconSet(8, 4, "4Arrows");
/** Grey Up / NE / SE / Down arrows */
- static final IconSet GREY_4_ARROWS = new IconSet(9, "4ArrowsGray");
+ static final IconSet GREY_4_ARROWS = new IconSet(9, 4, "4ArrowsGray");
/** Red / Light Red / Grey / Black traffic lights */
- static final IconSet RB_4_TRAFFIC_LIGHTS = new IconSet(0xA, "4RedToBlack");
- static final IconSet RATINGS_4 = new IconSet(0xB, "4Rating");
+ static final IconSet RB_4_TRAFFIC_LIGHTS = new IconSet(0xA, 4, "4RedToBlack");
+ static final IconSet RATINGS_4 = new IconSet(0xB, 4, "4Rating");
/** Green / Yellow / Red / Black traffic lights */
- static final IconSet GYRB_4_TRAFFIC_LIGHTS = new IconSet(0xC, "4TrafficLights");
- static final IconSet GYYYR_5_ARROWS = new IconSet(0xD, "5Arrows");
- static final IconSet GREY_5_ARROWS = new IconSet(0xE, "5ArrowsGray");
- static final IconSet RATINGS_5 = new IconSet(0xF, "5Rating");
- static final IconSet QUARTERS_5 = new IconSet(0x10, "5Quarters");
+ static final IconSet GYRB_4_TRAFFIC_LIGHTS = new IconSet(0xC, 4, "4TrafficLights");
+ static final IconSet GYYYR_5_ARROWS = new IconSet(0xD, 5, "5Arrows");
+ static final IconSet GREY_5_ARROWS = new IconSet(0xE, 5, "5ArrowsGray");
+ static final IconSet RATINGS_5 = new IconSet(0xF, 5, "5Rating");
+ static final IconSet QUARTERS_5 = new IconSet(0x10, 5, "5Quarters");
+
+ /**
+ * Get the Icon Set used
+ */
+ IconSet getIconSet();
+
+ /**
+ * Changes the Icon Set used
+ *
+ * <p>If the new Icon Set has a different number of
+ * icons to the old one, you <em>must</em> update the
+ * thresholds before saving!</p>
+ */
+ void setIconSet(IconSet set);
+
+ /**
+ * Should Icon + Value be displayed, or only the Icon?
+ */
+ boolean isIconOnly();
+ /**
+ * Control if only the Icon is shown, or Icon + Value
+ */
+ void setIconOnly(boolean only);
+
+ boolean isReversed();
+ void setReversed();
+
+ // TODO States
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org