コード例 #1
0
 public BndIJTextField bind(JTextComponent component, String fieldName, Validator validator) {
   BndIJTextField inputComponent = new BndIJTextField(currentInputCmpMgr, component, fieldName);
   inputComponent.registerValidator(validator);
   presenter.getValidatorMgr().registerBasicValidator(validator);
   currentInputCmpMgr.initComponent(inputComponent);
   return inputComponent;
 }
コード例 #2
0
 public BndIJComboBox bind(
     JComboBox component, List dropDownValues, String fieldName, String rule) {
   BndIJComboBox inputComponent =
       new BndIJComboBox(currentInputCmpMgr, component, dropDownValues, fieldName);
   presenter.getValidatorMgr().registerBasicRule(inputComponent, rule);
   currentInputCmpMgr.initComponent(inputComponent);
   return inputComponent;
 }
コード例 #3
0
 public BndIJComboBox bind(
     JComboBox component, MetaLoader metaLoader, String fieldName, String rule) {
   BndIJComboBox inputComponent =
       new BndIJComboBox(currentInputCmpMgr, component, decorateMetaLoader(metaLoader), fieldName);
   presenter.getValidatorMgr().registerBasicRule(inputComponent, rule);
   currentInputCmpMgr.initComponent(inputComponent);
   return inputComponent;
 }
コード例 #4
0
 protected MetaLoader decorateMetaLoader(MetaLoader metaLoader) {
   String pstViewMode = presenter.getViewMode();
   if (presenter instanceof FindPresenter || ViewMode.MODE_PICK.equals(pstViewMode)) {
     if (!metaLoader.isTopRowSet()) {
       metaLoader = metaLoader.addTodosNRow();
     }
   } else {
     if (!metaLoader.isTopRowSet()) {
       metaLoader = metaLoader.addSeleccioneNRow();
     }
   }
   if (!ViewMode.MODE_READONLY.equals(pstViewMode)) {
     metaLoader = metaLoader.activeRows();
   }
   return metaLoader;
 }
コード例 #5
0
 public BndIJTextField bind(JTextComponent component) {
   BndIJTextField inputComponent = new BndIJTextField(currentInputCmpMgr, component);
   presenter.getValidatorMgr().registerBasicRule(inputComponent, "");
   currentInputCmpMgr.initComponent(inputComponent);
   return inputComponent;
 }