[848] | 1 | package de.dass_it.vanhelsing.gui;
|
---|
| 2 |
|
---|
| 3 | import de.dass_it.vanhelsing.gui.items.ItemType;
|
---|
| 4 | import de.dass_it.vanhelsing.gui.items.UserObjectItem;
|
---|
[856] | 5 | import de.dass_it.vanhelsing.gui.ValidationItem.*;
|
---|
[848] | 6 |
|
---|
| 7 | public class ViewItem extends ItemType implements UserObjectItem {
|
---|
| 8 | private String key;
|
---|
[849] | 9 | private String keyValue;
|
---|
[856] | 10 | private String inputText;
|
---|
| 11 | private String selectOneMenu;
|
---|
| 12 | private boolean necessary;
|
---|
| 13 | private String renderer;
|
---|
| 14 | private String dataType;
|
---|
| 15 |
|
---|
[848] | 16 | public ViewItem(){
|
---|
[856] | 17 | inputText = null;
|
---|
| 18 | selectOneMenu = null;
|
---|
[848] | 19 | }
|
---|
| 20 |
|
---|
[856] | 21 | public boolean isNecessary() {
|
---|
| 22 | return necessary;
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | public void setNecessary(boolean necessary) {
|
---|
| 26 | this.necessary = necessary;
|
---|
| 27 | }
|
---|
| 28 |
|
---|
| 29 | public String getRenderer() {
|
---|
| 30 | return renderer;
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | public void setRenderer(String renderer) {
|
---|
| 34 | this.renderer = renderer;
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | public String getDataType() {
|
---|
| 38 | return dataType;
|
---|
| 39 | }
|
---|
| 40 |
|
---|
| 41 | public void setDataType(String dataType) {
|
---|
| 42 | this.dataType = dataType;
|
---|
| 43 | }
|
---|
| 44 |
|
---|
| 45 |
|
---|
[848] | 46 | //Methoden aus ItemType für die Zuordnung von Änderungen
|
---|
| 47 | public int getResId(){
|
---|
| 48 | return super.getResId();
|
---|
| 49 | }
|
---|
| 50 | public void setResId(int id){
|
---|
| 51 | super.setResId(id);
|
---|
| 52 | }
|
---|
| 53 | public String getResType(){
|
---|
| 54 | return super.getResType();
|
---|
| 55 | }
|
---|
| 56 | public void setResType(String resType){
|
---|
| 57 | super.setResType(resType);
|
---|
| 58 | }
|
---|
| 59 | //eigene Felder für die Tabellenspalten
|
---|
| 60 | public void setKey(String key) {
|
---|
| 61 | this.key = key;
|
---|
| 62 | }
|
---|
| 63 |
|
---|
| 64 | public String getKey() {
|
---|
| 65 | return key;
|
---|
| 66 | }
|
---|
| 67 |
|
---|
[849] | 68 | public String getKeyValue() {
|
---|
| 69 | return keyValue;
|
---|
[848] | 70 | }
|
---|
| 71 |
|
---|
[849] | 72 | public void setKeyValue(String keyValue) {
|
---|
| 73 | this.keyValue = keyValue;
|
---|
[848] | 74 | }
|
---|
[856] | 75 |
|
---|
| 76 | public void setInputText(String inputText) {
|
---|
| 77 | this.inputText = inputText;
|
---|
| 78 | }
|
---|
| 79 |
|
---|
| 80 | public String getInputText() {
|
---|
| 81 | return inputText;
|
---|
| 82 | }
|
---|
| 83 |
|
---|
| 84 | public void setSelectOneMenu(String selectOneMenu) {
|
---|
| 85 | this.selectOneMenu = selectOneMenu;
|
---|
| 86 | }
|
---|
| 87 |
|
---|
| 88 | public String getSelectOneMenu() {
|
---|
| 89 | return selectOneMenu;
|
---|
| 90 | }
|
---|
| 91 | public void setRendererFlag(String r){
|
---|
| 92 | if (r.equals("inputText")) {
|
---|
| 93 | this.inputText = new String("bernd");
|
---|
| 94 | this.selectOneMenu = null;
|
---|
| 95 | }
|
---|
| 96 | if (r.equals("selectOneMenu")){
|
---|
| 97 | this.selectOneMenu = new String ("bernd");
|
---|
| 98 | this.inputText = null;
|
---|
| 99 | }
|
---|
| 100 | }
|
---|
[848] | 101 | }
|
---|