source: vanHelsing/trunk/gui/src/de/dass_it/vanhelsing/gui/ViewItem.java@ 858

Last change on this file since 858 was 858, checked in by tobias, on Apr 9, 2010 at 10:56:07 AM

visual design slightly modified. tree functions extended

File size: 4.1 KB
RevLine 
[848]1package de.dass_it.vanhelsing.gui;
2
[857]3import javax.faces.model.SelectItem;
[848]4import de.dass_it.vanhelsing.gui.items.ItemType;
5import de.dass_it.vanhelsing.gui.items.UserObjectItem;
6
7public class ViewItem extends ItemType implements UserObjectItem {
[858]8 /**
9 * @uml.property name="key"
10 */
[848]11 private String key;
[858]12 /**
13 * @uml.property name="keyValue"
14 */
[849]15 private String keyValue;
[858]16 /**
17 * @uml.property name="inputText"
18 */
[856]19 private String inputText;
[858]20 /**
21 * @uml.property name="selectOneMenu"
22 */
[856]23 private String selectOneMenu;
[858]24 /**
25 * @uml.property name="radioGroup"
26 */
[857]27 private String radioGroup;
[858]28 /**
29 * @uml.property name="required"
30 */
31 private boolean required;
32 /**
33 * @uml.property name="renderer"
34 */
[856]35 private String renderer;
[858]36 /**
37 * @uml.property name="dataType"
38 */
[856]39 private String dataType;
[858]40 /**
41 * @uml.property name="keyValueList"
42 * @uml.associationEnd multiplicity="(0 -1)"
43 */
[857]44 private SelectItem[] keyValueList;
[856]45
[848]46 public ViewItem(){
[856]47 inputText = null;
48 selectOneMenu = null;
[848]49 }
50
[858]51 /**
52 * @return
53 * @uml.property name="required"
54 */
55 public boolean getRequired() {
56 return required;
[856]57 }
58
[858]59 /**
60 * @param necessary
61 * @uml.property name="required"
62 */
63 public void setRequired(boolean required) {
64 this.required = required;
[856]65 }
66
[858]67 /**
68 * @return
69 * @uml.property name="renderer"
70 */
[856]71 public String getRenderer() {
72 return renderer;
73 }
74
[858]75 /**
76 * @param renderer
77 * @uml.property name="renderer"
78 */
[856]79 public void setRenderer(String renderer) {
80 this.renderer = renderer;
81 }
82
[858]83 /**
84 * @return
85 * @uml.property name="dataType"
86 */
[856]87 public String getDataType() {
88 return dataType;
89 }
90
[858]91 /**
92 * @param dataType
93 * @uml.property name="dataType"
94 */
[856]95 public void setDataType(String dataType) {
96 this.dataType = dataType;
97 }
98
99
[848]100 //Methoden aus ItemType für die Zuordnung von Änderungen
101 public int getResId(){
102 return super.getResId();
103 }
104 public void setResId(int id){
105 super.setResId(id);
106 }
107 public String getResType(){
108 return super.getResType();
109 }
110 public void setResType(String resType){
111 super.setResType(resType);
112 }
113 //eigene Felder für die Tabellenspalten
[858]114 /**
115 * @param key
116 * @uml.property name="key"
117 */
[848]118 public void setKey(String key) {
119 this.key = key;
120 }
121
[858]122 /**
123 * @return
124 * @uml.property name="key"
125 */
[848]126 public String getKey() {
127 return key;
128 }
129
[858]130 /**
131 * @return
132 * @uml.property name="keyValue"
133 */
[849]134 public String getKeyValue() {
135 return keyValue;
[848]136 }
137
[858]138 /**
139 * @param keyValue
140 * @uml.property name="keyValue"
141 */
[849]142 public void setKeyValue(String keyValue) {
143 this.keyValue = keyValue;
[848]144 }
[856]145
[858]146 /**
147 * @param inputText
148 * @uml.property name="inputText"
149 */
[856]150 public void setInputText(String inputText) {
151 this.inputText = inputText;
152 }
153
[858]154 /**
155 * @return
156 * @uml.property name="inputText"
157 */
[856]158 public String getInputText() {
159 return inputText;
160 }
161
[858]162 /**
163 * @param selectOneMenu
164 * @uml.property name="selectOneMenu"
165 */
[856]166 public void setSelectOneMenu(String selectOneMenu) {
167 this.selectOneMenu = selectOneMenu;
168 }
169
[858]170 /**
171 * @return
172 * @uml.property name="selectOneMenu"
173 */
[856]174 public String getSelectOneMenu() {
175 return selectOneMenu;
176 }
[857]177
[858]178
[856]179 public void setRendererFlag(String r){
180 if (r.equals("inputText")) {
181 this.inputText = new String("bernd");
182 this.selectOneMenu = null;
[857]183 this.radioGroup = null;
[856]184 }
185 if (r.equals("selectOneMenu")){
[857]186 this.selectOneMenu = new String("bernd"); //null;
187 this.inputText = null; //new String ("bernd");
188 this.radioGroup = null;
189 //KeyValuesList erzeugen
[858]190 /*keyValueList = new SelectItem[3];
191 * keyValueList[0] = new SelectItem("keyBernd","valueBernd");
192 * keyValueList[1] = new SelectItem("keyHorst","valueHorst");
193 * keyValueList[2] = new SelectItem("keyPeter","valuePeter");
194 */
[857]195
196 }
197 if (r.equals("radioGroup")){
198 this.radioGroup = new String("bernd");
199 this.selectOneMenu = null;
[856]200 this.inputText = null;
201 }
202 }
[857]203
[858]204 /**
205 * @return
206 * @uml.property name="keyValueList"
207 */
[857]208 public SelectItem[] getKeyValueList() {
209 return keyValueList;
210 }
211
[858]212 /**
213 * @param keyValueList
214 * @uml.property name="keyValueList"
215 */
[857]216 public void setKeyValueList(SelectItem[] keyValueList) {
217 this.keyValueList = keyValueList;
218 }
[848]219}
Note: See TracBrowser for help on using the repository browser.