public void setDefaultBean(Object bean) { for (InputCmpMgr inputCmpMgr : inputsCmpMgrs) { if (inputCmpMgr.useMainDomain()) { inputCmpMgr.setDefaultBean(bean); } } }
public Component[] buildSortedCmp() { List<Component> cmp = new ArrayList<Component>(); for (InputCmpMgr inputCmpMgr : inputsCmpMgrs) { cmp.addAll(inputCmpMgr.getJComponents()); } return cmp.toArray(new Component[cmp.size()]); }
public void setValuesToJComponent() { for (int i = 0; i < inputsCmpMgrs.size(); i++) { InputCmpMgr inputCmpMgr = (InputCmpMgr) inputsCmpMgrs.get(i); if (inputCmpMgr.getDefaultBeanWrapper() != null) { inputCmpMgr.setValueToJComponent(); } } }
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(); } } }
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); } } }
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; }
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; }
public BndIJLabelField bind(JLabel component, MetaLoader metaLoader, String fieldName) { BndIJLabelField inputComponent = new BndIJLabelField( currentInputCmpMgr, component, decorateMetaLoader(metaLoader), fieldName); currentInputCmpMgr.initComponent(inputComponent); return inputComponent; }
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; }
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; }
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; }
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; }
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; }
/** * 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; }
public void setValuesToBean() { for (int i = 0; i < inputsCmpMgrs.size(); i++) { InputCmpMgr inputCmpMgr = (InputCmpMgr) inputsCmpMgrs.get(i); inputCmpMgr.setValuesToBean(); } }
public BndIJLabelField bind(JLabel component) { BndIJLabelField inputComponent = new BndIJLabelField(currentInputCmpMgr, component); currentInputCmpMgr.initComponent(inputComponent); return inputComponent; }
public BndIJTextField bind(JTextComponent component) { BndIJTextField inputComponent = new BndIJTextField(currentInputCmpMgr, component); presenter.getValidatorMgr().registerBasicRule(inputComponent, ""); currentInputCmpMgr.initComponent(inputComponent); return inputComponent; }
public BndIJLabelField bind(JLabel component, List dropDownValues, String fieldName) { BndIJLabelField inputComponent = new BndIJLabelField(currentInputCmpMgr, component, dropDownValues, fieldName); currentInputCmpMgr.initComponent(inputComponent); return inputComponent; }
public void setAllAsReadOnly() { for (int i = 0; i < inputsCmpMgrs.size(); i++) { InputCmpMgr inputCmpMgr = (InputCmpMgr) inputsCmpMgrs.get(i); inputCmpMgr.setAllCmpsAsUIReadOnly(); } }
public BndICheckBox bind(JCheckBox component) { BndICheckBox inputComponent = new BndICheckBox(currentInputCmpMgr, component); currentInputCmpMgr.initComponent(inputComponent); return inputComponent; }