GREY_3_ARROWS(1, 3, "3ArrowsGray"),\r
/** Green / Yellow / Red flags */\r
GYR_3_FLAGS(2, 3, "3Flags"),\r
- /** Green / Yellow / Red traffic lights (no background) */\r
- GYR_3_TRAFFIC_LIGHTS(3, 3, null),\r
- /** Green Circle / Yellow Triangle / Red Diamond */ \r
- GYR_3_SHAPES(4, 3, "3Signs"),\r
- /** Green / Yellow / Red traffic lights on a black square background */\r
- GYR_3_TRAFFIC_LIGHTS_BOX(5, 3, "3TrafficLights2"),\r
+ /** Green / Yellow / Red traffic lights (no background). Default */\r
+ GYR_3_TRAFFIC_LIGHTS(3, 3, "3TrafficLights1"),\r
+ /** Green / Yellow / Red traffic lights on a black square background. \r
+ * Note, MS-XLS docs v20141018 say this is id=5 but seems to be id=4 */\r
+ GYR_3_TRAFFIC_LIGHTS_BOX(4, 3, "3TrafficLights2"),\r
+ /** Green Circle / Yellow Triangle / Red Diamond.\r
+ * Note, MS-XLS docs v20141018 say this is id=4 but seems to be id=5 */ \r
+ GYR_3_SHAPES(5, 3, "3Signs"),\r
/** Green Tick / Yellow ! / Red Cross on a circle background */\r
GYR_3_SYMBOLS_CIRCLE(6, 3, "3Symbols"),\r
/** Green Tick / Yellow ! / Red Cross (no background) */\r
RATINGS_5(0xF, 5, "5Rating"),\r
QUARTERS_5(0x10, 5, "5Quarters");\r
\r
+ protected static final IconSet DEFAULT_ICONSET = IconSet.GYR_3_TRAFFIC_LIGHTS;\r
+ \r
/** Numeric ID of the icon set */\r
public int id;\r
/** How many icons in the set */\r
public final String name;\r
\r
public String toString() {\r
- return id + " - " + getName();\r
- }\r
- private String getName() {\r
- return (name==null?"default":name);\r
+ return id + " - " + name;\r
}\r
\r
public static IconSet byId(int id) {\r
return values()[id];\r
}\r
+ public static IconSet byName(String name) {\r
+ for (IconSet set : values()) {\r
+ if (set.name.equals(name)) return set;\r
+ }\r
+ return null;\r
+ }\r
\r
private IconSet(int id, int num, String name) {\r
this.id = id; this.num = num; this.name = name;\r
* {@link IconSet#num} for the current {@link #getIconSet()}\r
*/\r
void setThresholds(ConditionalFormattingThreshold[] thresholds);\r
+ /**\r
+ * Creates a new, empty Threshold\r
+ */\r
+ ConditionalFormattingThreshold createThreshold();\r
}\r