root / branches / v2_0_0_prep / libraries / libFMap_mapcontext / src / org / gvsig / fmap / mapcontext / layers / MappingAnnotation.java @ 38605
History | View | Annotate | Download (3.01 KB)
1 |
package org.gvsig.fmap.mapcontext.layers; |
---|---|
2 |
|
3 |
import org.gvsig.tools.ToolsLocator; |
4 |
import org.gvsig.tools.dynobject.DynStruct; |
5 |
import org.gvsig.tools.persistence.PersistenceManager; |
6 |
import org.gvsig.tools.persistence.Persistent; |
7 |
import org.gvsig.tools.persistence.PersistentState; |
8 |
import org.gvsig.tools.persistence.exception.PersistenceException; |
9 |
|
10 |
/**
|
11 |
*
|
12 |
* @deprecated
|
13 |
*
|
14 |
*/
|
15 |
public class MappingAnnotation implements Persistent { |
16 |
|
17 |
private int columnText = -1; |
18 |
private int columnRotate = -1; |
19 |
private int columnColor = -1; |
20 |
private int columnHeight = -1; |
21 |
private int columnTypeFont = -1; |
22 |
private int columnStyleFont = -1; |
23 |
|
24 |
public MappingAnnotation() {
|
25 |
|
26 |
} |
27 |
|
28 |
public int getColumnColor() { |
29 |
return columnColor;
|
30 |
} |
31 |
|
32 |
public void setColumnColor(int columnColor) { |
33 |
this.columnColor = columnColor;
|
34 |
} |
35 |
|
36 |
public int getColumnHeight() { |
37 |
return columnHeight;
|
38 |
} |
39 |
|
40 |
public void setColumnHeight(int columnHeight) { |
41 |
this.columnHeight = columnHeight;
|
42 |
} |
43 |
|
44 |
public int getColumnRotate() { |
45 |
return columnRotate;
|
46 |
} |
47 |
|
48 |
public void setColumnRotate(int columnRotate) { |
49 |
this.columnRotate = columnRotate;
|
50 |
} |
51 |
|
52 |
public int getColumnStyleFont() { |
53 |
return columnStyleFont;
|
54 |
} |
55 |
|
56 |
public void setColumnStyleFont(int columnStyleFont) { |
57 |
this.columnStyleFont = columnStyleFont;
|
58 |
} |
59 |
|
60 |
public int getColumnText() { |
61 |
return columnText;
|
62 |
} |
63 |
|
64 |
public void setColumnText(int columnText) { |
65 |
this.columnText = columnText;
|
66 |
} |
67 |
|
68 |
public int getColumnTypeFont() { |
69 |
return columnTypeFont;
|
70 |
} |
71 |
|
72 |
public void setColumnTypeFont(int columnTypeFont) { |
73 |
this.columnTypeFont = columnTypeFont;
|
74 |
} |
75 |
|
76 |
public void loadFromState(PersistentState state) |
77 |
throws PersistenceException {
|
78 |
|
79 |
columnText = state.getInt("columnText");
|
80 |
columnRotate = state.getInt("columnRotate");
|
81 |
columnColor = state.getInt("columnColor");
|
82 |
columnHeight = state.getInt("columnHeight");
|
83 |
columnTypeFont = state.getInt("columnTypeFont");
|
84 |
columnStyleFont = state.getInt("columnStyleFont");
|
85 |
} |
86 |
|
87 |
public void saveToState(PersistentState state) throws PersistenceException { |
88 |
|
89 |
state.set("columnText", columnText);
|
90 |
state.set("columnRotate", columnRotate);
|
91 |
state.set("columnColor", columnColor);
|
92 |
state.set("columnHeight", columnHeight);
|
93 |
state.set("columnTypeFont", columnTypeFont);
|
94 |
state.set("columnStyleFont", columnStyleFont);
|
95 |
|
96 |
} |
97 |
|
98 |
public static void registerPersistent() { |
99 |
PersistenceManager manager = ToolsLocator.getPersistenceManager(); |
100 |
DynStruct definition = manager.addDefinition( |
101 |
MappingAnnotation.class, |
102 |
"MappingAnnotation",
|
103 |
"MappingAnnotation Persistence definition",
|
104 |
null,
|
105 |
null
|
106 |
); |
107 |
definition.addDynFieldInt("columnText").setMandatory(true); |
108 |
definition.addDynFieldInt("columnRotate").setMandatory(true); |
109 |
definition.addDynFieldInt("columnColor").setMandatory(true); |
110 |
definition.addDynFieldInt("columnHeight").setMandatory(true); |
111 |
definition.addDynFieldInt("columnTypeFont").setMandatory(true); |
112 |
definition.addDynFieldInt("columnStyleFont").setMandatory(true); |
113 |
} |
114 |
|
115 |
|
116 |
} |