1 7 8 package org.jdesktop.swing.data; 9 10 26 27 public class StringMetaData extends MetaData { 28 private boolean multiLine = false; 29 protected int minLength = 0; 30 protected int maxLength = Integer.MAX_VALUE; 31 32 public StringMetaData() { 33 super("stringvalue"); 34 } 35 36 public StringMetaData(String name) { 37 super(name); 38 } 39 40 public StringMetaData(String name, String label) { 41 super(name, String .class, label); 42 } 43 44 52 public int getMinLength() { 53 return minLength; 54 } 55 56 61 public void setMinLength(int minLength) { 62 int oldMinLength = this.minLength; 63 this.minLength = minLength; 64 firePropertyChange("minLength", oldMinLength, minLength); 65 } 66 67 75 public int getMaxLength() { 76 return maxLength; 77 } 78 79 84 public void setMaxLength(int maxLength) { 85 int oldMaxLength = this.maxLength; 86 this.maxLength = maxLength; 87 firePropertyChange("maxLength", oldMaxLength, maxLength); 88 } 89 90 94 public boolean isMultiLine() { 95 return multiLine; 96 } 97 98 103 public void setMultiLine(boolean multiLine) { 104 boolean oldMultiLine = this.multiLine; 105 this.multiLine = multiLine; 106 firePropertyChange("multiLine", oldMultiLine, multiLine); 107 } 108 } | Popular Tags |