Package org.jdesktop.beansbinding

Examples of org.jdesktop.beansbinding.Binding.bind()


    public void add(JLabel label, JComponent component) {
        label.setLabelFor(component);
        Binding binding =  Bindings.createAutoBinding(UpdateStrategy.READ_WRITE,
                component, BeanProperty.create("enabled"),
                label, BeanProperty.create("enabled"));
        binding.bind();
    }
}
View Full Code Here


        b.addBindingListener(new BindingAdapter() {
            public void targetChanged(Binding binding, PropertyStateEvent event) {
                binding.refresh();
            }
        });
        b.bind();
       
        ArrayAggregator<Highlighter> activeHighlighters
                = new ArrayAggregator<Highlighter>(Highlighter.class);
        activeHighlighters.addSource(stripingOptions,
                (Property) ELProperty.create("${selectedItem.highlighter}"));
View Full Code Here

    private void bind() {
        Binding b = Bindings.createAutoBinding(READ,
                alphaSlider, BeanProperty.create("value"),
                panel, BeanProperty.create("alpha"));
        b.setConverter(new PercentConverter());
        b.bind();
    }
}
View Full Code Here

    private void bind() {
        Binding b = Bindings.createAutoBinding(READ,
                formula, BeanProperty.create("value"),
                plot, BeanProperty.create("coefficient"));
        b.setConverter(new NumberConverter());
        b.bind();
    }
}
View Full Code Here

    private void bind() {
        Binding b = Bindings.createAutoBinding(READ,
                speedSlider, BeanProperty.create("value"),
                label, BeanProperty.create("delay"));
        b.setConverter(new FactorConverter<Integer>(10));
        b.bind();
       
        Bindings.createAutoBinding(READ,
                pointsSlider, BeanProperty.create("value"),
                label, ELProperty.create("${busyPainter.points}")).bind();
       
View Full Code Here

    private void fillDepartmentList() {
        Binding binding = bindingGroup.getBinding("departmentListBinding");
        binding.unbind();
        departmentList.addAll(allDepartments);
        binding.bind();
        departmentNameComboBox.repaint();
    }

    /** This method is called from within the constructor to
     * initialize the form.
View Full Code Here

    private void displayHouseholdMembers(List<Person> householdMemberList) {
        Binding binding = bindingGroup.getBinding("householdMembersBinding");
        binding.unbind();
        this.householdMemberList.clear();
        this.householdMemberList.addAll(householdMemberList);
        binding.bind();
        householdMembersTable.repaint();
    }

    /** This method is called from within the constructor to
     * initialize the form.
View Full Code Here

    private void refreshDepartmentsTable(List<Department> departmentList) {
        Binding binding = bindingGroup.getBinding("departmentListBinding");
        binding.unbind();
        this.departmentList.clear();
        this.departmentList.addAll(departmentList);
        binding.bind();
        departmentsTable.repaint();
    }

    private void refreshDepartmentsTable(Department department, boolean add) {
        Binding binding = bindingGroup.getBinding("departmentListBinding");
View Full Code Here

        if (add) {
            this.departmentList.add(department);
        } else {
            this.departmentList.remove(department);
        }
        binding.bind();
        departmentsTable.repaint();
    }

    private void showWarningMessage(String message, JComponent toFocus) {
        showMessage(message, toFocus, JOptionPane.WARNING_MESSAGE);
View Full Code Here

            } else {
                binding = bindingGroup.getBinding("mpiBinding");
                binding.unbind();
                mpiSearchResultList.clear();
                mpiSearchResultList.addAll(personList);
                binding.bind();
                mpiResultsTable.repaint();
                TitledBorder mpiResultsPanelBorder = (TitledBorder) mpiResultsPanel.getBorder();
                if (!lastResort) {
                    mpiResultsPanelBorder.setTitle("MPI Results - Regular");
                } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.