1 7 8 package org.jdesktop.swing.binding; 9 10 import org.jdesktop.swing.data.Converters; 11 import org.jdesktop.swing.data.Converter; 12 import org.jdesktop.swing.data.DataModel; 13 import org.jdesktop.swing.data.MetaData; 14 import org.jdesktop.swing.data.Validator; 15 16 import org.jdesktop.swing.form.JForm; 17 18 import java.util.ArrayList ; 19 import java.util.List ; 20 21 import javax.swing.InputVerifier ; 22 import javax.swing.JComponent ; 23 24 31 32 public class FormBinding extends AbstractBinding { 33 protected JForm form; 34 35 public FormBinding(JForm form, DataModel dataModel, String fieldName) { 36 super(form, dataModel, fieldName, Binding.AUTO_VALIDATE_NONE); 37 } 38 39 public boolean pull() { 40 return form.pull(); 41 } 42 43 public boolean isModified() { 44 return form.isModified(); 45 } 46 47 50 public boolean isValid() { 51 return form.isFormValid(); 52 } 53 54 public JComponent getComponent() { 55 return form; 56 } 57 58 protected void setComponent(JComponent component) { 59 form = (JForm)component; 60 } 61 62 protected Object getComponentValue() { 63 return null; 65 } 66 67 protected void setComponentValue(Object value) { 68 } 70 71 public boolean push() { 72 return form.push(); 73 } 74 } 75 | Popular Tags |