Package org.jdesktop.beansbinding

Examples of org.jdesktop.beansbinding.Binding


        firePropertyChange("staff", oldStaff, staff);
    }

    private void initBindings() {
        bindingGroup = new BindingGroup();
        Binding binding = FormHelper.createBinding(this, "staff", "username", usernameField, "text");
        bindingGroup.addBinding(binding);
        binding = FormHelper.createBinding(this, "staff", "password", passwordField, "text");
        bindingGroup.addBinding(binding);
        bindingGroup.bind();
    }
View Full Code Here


    private void initBindings() {
        bindingGroup = new BindingGroup();
        minimumLengthValidator = new MinimumLengthValidator(5);

        Binding binding = FormHelper.createBinding(this, "client", "name", nameField, "text");
        binding.setValidator(minimumLengthValidator);
        bindingGroup.addBinding(binding);

        bindingGroup.bind();
        for (Binding b : bindingGroup.getBindings()) {
            if (b.getTargetObject() instanceof JTextField) {
View Full Code Here

    private void initBindings() {
        bindingGroup = new BindingGroup();
        minimumLengthValidator = new MinimumLengthValidator(5);
        numberValidator = new NumberValidator();

        Binding binding = FormHelper.createBinding(this, "event", "name", nameField, "text");
        binding.setValidator(minimumLengthValidator);
        bindingGroup.addBinding(binding);

        binding = FormHelper.createBinding(this, "event", "location", locationField, "text");
        binding.setValidator(minimumLengthValidator);
        bindingGroup.addBinding(binding);

        binding = FormHelper.createBinding(this, "event", "description", descriptionTextArea, "text");
        binding.setValidator(minimumLengthValidator);
        bindingGroup.addBinding(binding);

        binding = FormHelper.createBinding(this, "event", "phoneNo", phoneNumberField, "text");
        binding.setValidator(new PhoneNumberValidator());
        bindingGroup.addBinding(binding);

        binding = FormHelper.createBinding(this, "event", "startDate", startDatePicker, "date");
        bindingGroup.addBinding(binding);

        binding = FormHelper.createBinding(this, "event", "endDate", endDatePicker, "date");
        bindingGroup.addBinding(binding);

        binding = FormHelper.createBinding(this, "event", "totalAmount", totalAmountField, "text");
        binding.setValidator(numberValidator);
        bindingGroup.addBinding(binding);

        binding = FormHelper.createBinding(this, "event", "advance", advanceField, "text");
        binding.setValidator(numberValidator);
        bindingGroup.addBinding(binding);

        binding = FormHelper.createBinding(this, "event", "noOfLabours", noOfLaboursField, "text");
        binding.setValidator(numberValidator);
        bindingGroup.addBinding(binding);

        binding = FormHelper.createBinding(this, "event", "noOfVehicleTrips", noOfVehicleTripsField, "text");
        binding.setValidator(numberValidator);
        bindingGroup.addBinding(binding);

        binding = FormHelper.createBinding(this, "event", "extraExpense", extraExpenseField, "text");
        binding.setValidator(numberValidator);
        bindingGroup.addBinding(binding);

        binding = FormHelper.createBinding(this, "event", "commission", commissionField, "text");
        binding.setValidator(numberValidator);
        bindingGroup.addBinding(binding);
       
        binding = FormHelper.createBinding(this, "event", "vatPercentage", vatPercentageField, "text");
        binding.setValidator(numberValidator);
        bindingGroup.addBinding(binding);

        // Error when event is new (createNew)
        if(event.get("paid") != null) {
            binding = FormHelper.createBinding(this, "event", "paid", paidCheckBox, "selected");
View Full Code Here

    private void initBindings() {
        bindingGroup = new BindingGroup();
        minimumLengthValidator = new MinimumLengthValidator(5);

        Binding binding = FormHelper.createBinding(this, "staff", "username", usernameField, "text");
        binding.setValidator(minimumLengthValidator);
        bindingGroup.addBinding(binding);

        binding = FormHelper.createBinding(this, "staff", "password", passwordField, "text");
        binding.setValidator(minimumLengthValidator);
        bindingGroup.addBinding(binding);

        binding = FormHelper.createBinding(this, "staff", "firstName", firstNameField, "text");
        minimumLengthValidator.setLength(2);
        binding.setValidator(minimumLengthValidator);
        bindingGroup.addBinding(binding);

        binding = FormHelper.createBinding(this, "staff", "lastName", lastNameField, "text");
        binding.setValidator(minimumLengthValidator);
        bindingGroup.addBinding(binding);

        binding = FormHelper.createBinding(this, "staff", "phoneNo", phoneNumberField, "text");
        binding.setValidator(new PhoneNumberValidator());
        bindingGroup.addBinding(binding);

        binding = FormHelper.createBinding(this, "staff", "email", emailField, "text");
        binding.setValidator(new EmailValidator());
        bindingGroup.addBinding(binding);

        binding = FormHelper.createBinding(this, "staff", "joinedDate", joinedDatePicker, "date");
        bindingGroup.addBinding(binding);
View Full Code Here

        jLabel3.setText(NbBundle.getMessage(ConfigDialog.class, "ConfigDialog.jLabel1.text")); // NOI18N

        defaultThrottleTextBox1.setFormatterFactory(new DefaultFormatterFactory(new NumberFormatter(new DecimalFormat("#0"))));

        Binding binding = Bindings.createAutoBinding(UpdateStrategy.READ_WRITE, this, ELProperty.create("${globalConfig[\"profile.defaultThrottle\"]}"), defaultThrottleTextBox1, BeanProperty.create("value"));
        bindingGroup.addBinding(binding);

        jLabel4.setText(NbBundle.getMessage(ConfigDialog.class, "ConfigDialog.jLabel2.text")); // NOI18N

        jLabel11.setLabelFor(defaultSigFileComboBox1);
View Full Code Here

        proxySettingsPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createTitledBorder(null, "", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Tahoma", 0, 11), UIManager.getDefaults().getColor("windowText")), NbBundle.getMessage(UpdateProxyConfigDialog.class, "UpdateProxyConfigDialog.proxySettingsPanel.border.title"), TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Tahoma", 0, 11), UIManager.getDefaults().getColor("textText"))); // NOI18N
        proxySettingsPanel.setEnabled(false);


        jLabel8.setText(NbBundle.getMessage(UpdateProxyConfigDialog.class, "UpdateProxyConfigDialog.jLabel8.text")); // NOI18N
        Binding binding = Bindings.createAutoBinding(UpdateStrategy.READ_WRITE, this, ELProperty.create("${properties[\"update.proxy.host\"]}"), proxyHostTextBox, BeanProperty.create("text_ON_ACTION_OR_FOCUS_LOST"));
        bindingGroup.addBinding(binding);


        jLabel9.setText(NbBundle.getMessage(UpdateProxyConfigDialog.class, "UpdateProxyConfigDialog.jLabel9.text")); // NOI18N
        proxyPortTextBox.setFormatterFactory(new IntegerFormatterFactory());
View Full Code Here

TOP

Related Classes of org.jdesktop.beansbinding.Binding

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.