コード例 #1
0
 public void setDefaultBean(Object bean) {
   for (InputCmpMgr inputCmpMgr : inputsCmpMgrs) {
     if (inputCmpMgr.useMainDomain()) {
       inputCmpMgr.setDefaultBean(bean);
     }
   }
 }
コード例 #2
0
 public Component[] buildSortedCmp() {
   List<Component> cmp = new ArrayList<Component>();
   for (InputCmpMgr inputCmpMgr : inputsCmpMgrs) {
     cmp.addAll(inputCmpMgr.getJComponents());
   }
   return cmp.toArray(new Component[cmp.size()]);
 }
コード例 #3
0
 public void setValuesToJComponent() {
   for (int i = 0; i < inputsCmpMgrs.size(); i++) {
     InputCmpMgr inputCmpMgr = (InputCmpMgr) inputsCmpMgrs.get(i);
     if (inputCmpMgr.getDefaultBeanWrapper() != null) {
       inputCmpMgr.setValueToJComponent();
     }
   }
 }
コード例 #4
0
 public void init() {
   for (Iterator iterator = inputsCmpMgrs.iterator(); iterator.hasNext(); ) {
     InputCmpMgr inputCmpMgr = (InputCmpMgr) iterator.next();
     for (Iterator iterator1 = inputCmpMgr.getComponents().iterator(); iterator1.hasNext(); ) {
       BindingComponent bindingComponent = (BindingComponent) iterator1.next();
       bindingComponent.init();
     }
   }
 }
コード例 #5
0
 public void updateDomain(Object bean) {
   for (InputCmpMgr inputCmpMgr : inputsCmpMgrs) {
     inputCmpMgr.setDefaultBean(bean);
     List components = inputCmpMgr.getComponents();
     for (Iterator iterator = components.iterator(); iterator.hasNext(); ) {
       BindingComponent bindingComponent = (BindingComponent) iterator.next();
       bindingComponent.setBeanWrapper(bean);
     }
   }
 }
コード例 #6
0
 public List<BindingComponent> getAllBindings() {
   List<BindingComponent> bindingComponents = new ArrayList();
   List inputsCmpMgrs = getInputsCmpMgrs();
   logger.debug("searching bindings registers ...");
   for (Iterator iterator = inputsCmpMgrs.iterator(); iterator.hasNext(); ) {
     InputCmpMgr inputCmpMgr = (InputCmpMgr) iterator.next();
     for (Iterator iterator1 = inputCmpMgr.getComponents().iterator(); iterator1.hasNext(); ) {
       BindingComponent bindingComponent = (BindingComponent) iterator1.next();
       logger.debug("bindingComponent <" + bindingComponent + ">");
       bindingComponents.add(bindingComponent);
     }
   }
   return bindingComponents;
 }
コード例 #7
0
 public List getAllBindingsName() {
   List bindingComponents = new ArrayList();
   List inputsCmpMgrs = getInputsCmpMgrs();
   logger.debug("searching bindings registers ...");
   for (Iterator iterator = inputsCmpMgrs.iterator(); iterator.hasNext(); ) {
     InputCmpMgr inputCmpMgr = (InputCmpMgr) iterator.next();
     for (Iterator iterator1 = inputCmpMgr.getComponents().iterator(); iterator1.hasNext(); ) {
       BindingComponent bindingComponent = (BindingComponent) iterator1.next();
       logger.debug("bindingComponent <" + bindingComponent + ">");
       bindingComponent.getJComponent().getClientProperty(BindingComponent.ATTR_BND);
       bindingComponents.add(bindingComponent.getFieldName());
     }
   }
   return bindingComponents;
 }
コード例 #8
0
 public BndIJLabelField bind(JLabel component, MetaLoader metaLoader, String fieldName) {
   BndIJLabelField inputComponent =
       new BndIJLabelField(
           currentInputCmpMgr, component, decorateMetaLoader(metaLoader), fieldName);
   currentInputCmpMgr.initComponent(inputComponent);
   return inputComponent;
 }
コード例 #9
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;
 }
コード例 #10
0
 public BndIJComboBox bind(
     JComboBox component, MetaLoader metaLoader, Object bean, String fieldName) {
   BndIJComboBox inputComponent =
       new BndIJComboBox(
           currentInputCmpMgr, component, decorateMetaLoader(metaLoader), bean, fieldName);
   currentInputCmpMgr.initComponent(inputComponent);
   return inputComponent;
 }
コード例 #11
0
 private BndIJRadioButton bindIntern(
     JRadioButton component, String fieldName, Object selectedValue, ButtonGroup buttonGroup) {
   BndIJRadioButton inputComponent =
       new BndIJRadioButton(currentInputCmpMgr, component, fieldName, selectedValue);
   currentInputCmpMgr.initComponent(inputComponent);
   buttonGroup.add(component);
   return inputComponent;
 }
コード例 #12
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;
 }
コード例 #13
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;
 }
コード例 #14
0
 /**
  * Set the model to the JComboBox. Use the defaultBeanWrapper to do the binding.
  *
  * @param component
  * @param fieldName
  */
 public BndIJComboBox bind(JComboBox component, List dropDownValues, String fieldName) {
   BndIJComboBox inputComponent =
       new BndIJComboBox(currentInputCmpMgr, component, dropDownValues, fieldName);
   currentInputCmpMgr.initComponent(inputComponent);
   return inputComponent;
 }
コード例 #15
0
 public void setValuesToBean() {
   for (int i = 0; i < inputsCmpMgrs.size(); i++) {
     InputCmpMgr inputCmpMgr = (InputCmpMgr) inputsCmpMgrs.get(i);
     inputCmpMgr.setValuesToBean();
   }
 }
コード例 #16
0
 public BndIJLabelField bind(JLabel component) {
   BndIJLabelField inputComponent = new BndIJLabelField(currentInputCmpMgr, component);
   currentInputCmpMgr.initComponent(inputComponent);
   return inputComponent;
 }
コード例 #17
0
 public BndIJTextField bind(JTextComponent component) {
   BndIJTextField inputComponent = new BndIJTextField(currentInputCmpMgr, component);
   presenter.getValidatorMgr().registerBasicRule(inputComponent, "");
   currentInputCmpMgr.initComponent(inputComponent);
   return inputComponent;
 }
コード例 #18
0
 public BndIJLabelField bind(JLabel component, List dropDownValues, String fieldName) {
   BndIJLabelField inputComponent =
       new BndIJLabelField(currentInputCmpMgr, component, dropDownValues, fieldName);
   currentInputCmpMgr.initComponent(inputComponent);
   return inputComponent;
 }
コード例 #19
0
 public void setAllAsReadOnly() {
   for (int i = 0; i < inputsCmpMgrs.size(); i++) {
     InputCmpMgr inputCmpMgr = (InputCmpMgr) inputsCmpMgrs.get(i);
     inputCmpMgr.setAllCmpsAsUIReadOnly();
   }
 }
コード例 #20
0
 public BndICheckBox bind(JCheckBox component) {
   BndICheckBox inputComponent = new BndICheckBox(currentInputCmpMgr, component);
   currentInputCmpMgr.initComponent(inputComponent);
   return inputComponent;
 }