1 19 20 package jxl.biff.drawing; 21 22 25 final class EscherRecordType 26 { 27 30 private int value; 31 32 35 private static EscherRecordType[] types = new EscherRecordType[0]; 36 37 42 private EscherRecordType(int val) 43 { 44 value = val; 45 46 EscherRecordType[] newtypes = new EscherRecordType[types.length+1]; 47 System.arraycopy(types, 0, newtypes, 0, types.length); 48 newtypes[types.length] = this; 49 types = newtypes; 50 } 51 52 57 public int getValue() 58 { 59 return value; 60 } 61 62 69 public static EscherRecordType getType(int val) 70 { 71 EscherRecordType type = UNKNOWN; 72 73 for (int i = 0; i < types.length; i++) 74 { 75 if (val == types[i].value) 76 { 77 type = types[i]; 78 break; 79 } 80 } 81 82 return type; 83 } 84 85 public static final EscherRecordType UNKNOWN = new EscherRecordType(0x0); 86 public static final EscherRecordType DGG_CONTAINER = 87 new EscherRecordType(0xf000); 88 public static final EscherRecordType BSTORE_CONTAINER = 89 new EscherRecordType(0xf001); 90 public static final EscherRecordType DG_CONTAINER = 91 new EscherRecordType(0xf002); 92 public static final EscherRecordType SPGR_CONTAINER = 93 new EscherRecordType(0xf003); 94 public static final EscherRecordType SP_CONTAINER = 95 new EscherRecordType(0xf004); 96 97 public static final EscherRecordType DGG = new EscherRecordType(0xf006); 98 public static final EscherRecordType BSE = new EscherRecordType(0xf007); 99 public static final EscherRecordType DG = new EscherRecordType(0xf008); 100 public static final EscherRecordType SPGR = new EscherRecordType(0xf009); 101 public static final EscherRecordType SP = new EscherRecordType(0xf00a); 102 public static final EscherRecordType OPT = new EscherRecordType(0xf00b); 103 public static final EscherRecordType CLIENT_ANCHOR = 104 new EscherRecordType(0xf010); 105 public static final EscherRecordType CLIENT_DATA = 106 new EscherRecordType(0xf011); 107 public static final EscherRecordType CLIENT_TEXT_BOX = 108 new EscherRecordType(0xf00d); 109 public static final EscherRecordType SPLIT_MENU_COLORS = 110 new EscherRecordType(0xf11e); 111 } 112 | Popular Tags |