Package org.jdesktop.beansbinding

Examples of org.jdesktop.beansbinding.BindingGroup


        JTableBinding belves;
        JListBinding bpromos;

        private void initBindings() {

                BindingGroup bg = new BindingGroup();
                bpromos = SwingBindings.createJListBinding(AutoBinding.UpdateStrategy.READ,
                        GestionPromotion.getInstance().getPromotions(), l_promos);
                bg.addBinding(bpromos);

                AutoBinding btextpromo = Bindings.createAutoBinding(AutoBinding.UpdateStrategy.READ, l_promos,
                        (Property) BeanProperty.create("selectedElement.libelle"), tb_libelle_promo, (Property) BeanProperty.create("text"));
                bg.addBinding(btextpromo);
                btextpromo.setSourceUnreadableValue("");

                belves = SwingBindings.createJTableBinding(AutoBinding.UpdateStrategy.READ_WRITE, l_promos, (Property) BeanProperty.create("selectedElement.eleves"), t_eleves);
                belves.addColumnBinding(BeanProperty.create("nom")).setColumnName("Nom").setEditable(false).setColumnClass(String.class);
                belves.addColumnBinding(BeanProperty.create("prenom")).setColumnName("Prénom").setEditable(false).setColumnClass(String.class);
                belves.addColumnBinding(BeanProperty.create("email")).setColumnName("Email").setEditable(false).setColumnClass(String.class);
                belves.addColumnBinding(BeanProperty.create("num")).setColumnName("Numéro").setEditable(false).setColumnClass(String.class);
                bg.addBinding(belves);

                AutoBinding nom_e = Bindings.createAutoBinding(AutoBinding.UpdateStrategy.READ_WRITE, t_eleves,
                        (Property) BeanProperty.create("selectedElement.nom"), tb_nom_eleve, (Property) BeanProperty.create("text"));
                nom_e.setSourceUnreadableValue("");
                AutoBinding prenom_e = Bindings.createAutoBinding(AutoBinding.UpdateStrategy.READ, t_eleves,
                        (Property) BeanProperty.create("selectedElement.prenom"), tb_prenom_eleve, (Property) BeanProperty.create("text"));
                prenom_e.setSourceUnreadableValue("");
                AutoBinding email_e = Bindings.createAutoBinding(AutoBinding.UpdateStrategy.READ, t_eleves,
                        (Property) BeanProperty.create("selectedElement.email"), tb_email_eleve, (Property) BeanProperty.create("text"));
                email_e.setSourceUnreadableValue("");
                AutoBinding num_e = Bindings.createAutoBinding(AutoBinding.UpdateStrategy.READ, t_eleves,
                        (Property) BeanProperty.create("selectedElement.num"), tb_num_eleve, (Property) BeanProperty.create("text"));
                num_e.setSourceUnreadableValue("");

                bg.addBinding(nom_e);
                bg.addBinding(prenom_e);
                bg.addBinding(email_e);
                bg.addBinding(num_e);

                bg.bind();
        }
View Full Code Here


        this.staff = staff;
        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

        this.staff = staff;
        firePropertyChange("staff", oldStaff, staff);
    }

    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);
View Full Code Here

        this.client = client;
        firePropertyChange("client", oldClient, client);
    }

    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);
View Full Code Here

        this.event = event;
        firePropertyChange("event", oldEvent, event);
    }

    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);
View Full Code Here

        this.staff = staff;
        firePropertyChange("staff", oldStaff, staff);
    }

    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);
View Full Code Here

     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        bindingGroup = new BindingGroup();

        updateFrequencyButtonGroup = new ButtonGroup();
        csvExportButtonGroup = new ButtonGroup();
        buttonGroupExtension = new ButtonGroup();
        jPanel4 = new JPanel();
View Full Code Here

     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        bindingGroup = new BindingGroup();

        proxySettingsPanel = new JPanel();
        jLabel8 = new JLabel();
        proxyHostTextBox = new JTextField();
        jLabel9 = new JLabel();
View Full Code Here

TOP

Related Classes of org.jdesktop.beansbinding.BindingGroup

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.