01: package org.airtodo.gui_common.components.lookup_data;
02:
03: import javax.swing.Icon;
04:
05: import org.air.framework.gui.lookup.ILookupData;
06: import org.air.framework.i18n.NlsMessages;
07: import org.air.framework.properties.Icons;
08: import org.airtodo.db.types.Priority;
09:
10: public abstract class LookupDataPriority implements ILookupData {
11: public static enum NLS {
12: PRIORITY_1, //
13: PRIORITY_2, //
14: PRIORITY_3, //
15: PRIORITY_4, //
16: PRIORITY_5
17: }
18:
19: private static final String NLS_PRIORITY_1 = NlsMessages
20: .getString(NLS.PRIORITY_1);
21: private static final String NLS_PRIORITY_2 = NlsMessages
22: .getString(NLS.PRIORITY_2);
23: private static final String NLS_PRIORITY_3 = NlsMessages
24: .getString(NLS.PRIORITY_3);
25: private static final String NLS_PRIORITY_4 = NlsMessages
26: .getString(NLS.PRIORITY_4);
27: private static final String NLS_PRIORITY_5 = NlsMessages
28: .getString(NLS.PRIORITY_5);
29: //
30: private static final Icon ICON_PRIORITY_1 = Icons.STARS_1;
31: private static final Icon ICON_PRIORITY_2 = Icons.STARS_2;
32: private static final Icon ICON_PRIORITY_3 = Icons.STARS_3;
33: private static final Icon ICON_PRIORITY_4 = Icons.STARS_4;
34: private static final Icon ICON_PRIORITY_5 = Icons.STARS_5;
35: //
36: private static final Object[][] TEXTS_ICONS = new Object[][] { //
37: { NLS_PRIORITY_1, ICON_PRIORITY_1 }, //
38: { NLS_PRIORITY_2, ICON_PRIORITY_2 }, //
39: { NLS_PRIORITY_3, ICON_PRIORITY_3 }, //
40: { NLS_PRIORITY_4, ICON_PRIORITY_4 }, //
41: { NLS_PRIORITY_5, ICON_PRIORITY_5 } //
42: };
43:
44: public Class getLookupObjectClass() {
45: return Priority.class;
46: }
47:
48: public Object[][] getTextsAndIcons() {
49: return TEXTS_ICONS;
50: }
51:
52: }
|