1 15 16 package swingwtx.swing.event; 17 18 22 public class ValidationEvent extends java.util.EventObject { 23 24 protected boolean valid = false; 25 protected String errorMessage = ""; 26 27 public ValidationEvent(Object source) { super(source); } 28 29 33 public java.lang.String getErrorMessage() { 34 return errorMessage; 35 } 36 37 42 public void setErrorMessage(java.lang.String errorMessage) { 43 this.errorMessage = errorMessage; 44 } 45 46 50 public boolean isValid() { 51 return valid; 52 } 53 54 59 public void setValid(boolean valid) { 60 this.valid = valid; 61 if (valid) errorMessage = ""; 62 } 63 64 public void setValid(boolean valid, String errorMessage) { 65 this.valid = valid; 66 this.errorMessage = errorMessage; 67 } 68 69 } 70 | Popular Tags |