Changes between Version 31 and Version 32 of BASE_BOUND_CONTROLS_R0
- Timestamp:
- 09/30/08 15:42:35 (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BASE_BOUND_CONTROLS_R0
v31 v32 74 74 * NOTE: Since the JComboBox uses an array of Objects to display and choose from, for the implementation of !BoundComboBox one should also implement 'protected abstract String[] computeModelItems()' which should return the items in the combo box. 75 75 * In order to create a bound control different from these described above, one should also implement 'protected abstract JComponent computeDataInputUI()' to return the graphical representation of the component which is used for user input. 76 * REMEMBER to provide a method to synchronize the model and validation with the corresponding data value. 76 77 78 {{{ 79 Example: private void syncInputToModel(Object input) { 80 this.settingModel = true; 81 String inputValue = (String)input; 82 83 validation().set(validate(inputValue)); 84 if(validation().get().getStatus().shouldSubmit()){ 85 submitData(inputValue); 86 } 87 this.settingModel = false; 88 } 89 }}} 77 90 78 91 = Implementation = … … 80 93 * For more information see documentation and classes locate at: 'net.asteasolutions.veda.gui.util.boundcontrols' 81 94 * For Unit tests and Demo see 'net.asteasolutions.veda.gui.util.boundcontrols'. One can also see and test the bound controls manually by running !BoundControlsDemoTest as a Java Application. 82 83 source:trunk/sophie2-platform/modules/org.sophie2.messy/src/main/java/net/asteasolutions/veda/gui/util/boundcontrols 95 * [source:trunk/sophie2-platform/modules/org.sophie2.messy/src/main/java/net/asteasolutions/veda/gui/util/boundcontrols Bound Controls Source Code] 96 * [source:trunk/sophie2-platform/modules/org.sophie2.messy/src/test/java/net/asteasolutions/veda/gui/util/boundcontrols Bound Controls Unit Tests and Demo Code] 84 97 85 98 = Log =