1 6 7 package org.netbeans.test.editor.app.core.properties; 8 9 13 public class ArrayProperty implements Property { 14 15 private Object value; 16 17 private Object [] values; 18 19 20 public ArrayProperty(Object val,Object [] vals) { 21 value=val; 22 values=vals; 23 } 24 25 public String getProperty() { 26 return value.toString(); 27 } 28 29 public void setProperty(String value) { 30 boolean found=false; 31 for (int i=0;i < values.length;i++) { 32 if (values[i].toString().compareTo(value) == 0) { 33 this.value=values[i]; 34 found=true; 35 break; 36 } 37 } 38 } 39 40 public Object [] getValues() { 41 return values; 42 } 43 44 public Object getValue() { 45 return value; 46 } 47 48 } 49 | Popular Tags |