protected void initDataBindings() { BeanProperty<Settings, List<String>> settingsBeanProperty_4 = BeanProperty.create("tvShowSettings.tvShowDataSource"); JTableBinding<String, Settings, JTable> jTableBinding = SwingBindings.createJTableBinding( UpdateStrategy.READ, settings, settingsBeanProperty_4, tableTvShowSources); // ObjectProperty<String> stringObjectProperty = ObjectProperty.create(); jTableBinding.addColumnBinding(stringObjectProperty); // jTableBinding.bind(); // BeanProperty<Settings, Boolean> settingsBeanProperty = BeanProperty.create("tvShowSettings.syncTrakt"); BeanProperty<JCheckBox, Boolean> jCheckBoxBeanProperty = BeanProperty.create("selected"); AutoBinding<Settings, Boolean, JCheckBox, Boolean> autoBinding = Bindings.createAutoBinding( UpdateStrategy.READ_WRITE, settings, settingsBeanProperty, chckbxTraktTv, jCheckBoxBeanProperty); autoBinding.bind(); // BeanProperty<Settings, Boolean> settingsBeanProperty_1 = BeanProperty.create("tvShowSettings.dvdOrder"); AutoBinding<Settings, Boolean, JCheckBox, Boolean> autoBinding_1 = Bindings.createAutoBinding( UpdateStrategy.READ_WRITE, settings, settingsBeanProperty_1, cbDvdOrder, jCheckBoxBeanProperty); autoBinding_1.bind(); }
// <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { bindingGroup = new org.jdesktop.beansbinding.BindingGroup(); jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jComboBox1 = new javax.swing.JComboBox(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); startPos = new javax.swing.JTextField(); jLabel4 = new javax.swing.JLabel(); endPos = new javax.swing.JTextField(); startBigEnd = new javax.swing.JLabel(); filter = new javax.swing.JButton(); setTitle("Chromosome-position filter"); setBackground(new java.awt.Color(204, 204, 255)); setLocationByPlatform(true); setName("fra"); // NOI18N org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ObjectProperty.create(), this, org.jdesktop.beansbinding.BeanProperty.create("defaultCloseOperation")); bindingGroup.addBinding(binding); addWindowListener( new java.awt.event.WindowAdapter() { public void windowClosed(java.awt.event.WindowEvent evt) { formWindowClosed(evt); } }); jPanel1.setBackground(new java.awt.Color(153, 204, 255)); jLabel1.setText("Chromosome-position filter"); jComboBox1.setEditable(true); jComboBox1.setModel( new javax.swing.DefaultComboBoxModel( new String[] { "chr1", "chr2", "chr3", "chr4", "chr4", "chr6", "chr7", "chr8", "chr9", "chr10", "chr11", "chr12", "chr13", "chr14", "chr15", "chr16", "chr17", "chr19", "chr20", "chr21", "chr22", "chr23", "chrX", "chrY" })); jLabel2.setText("Please select the chromosome: "); jLabel3.setText("Enter start position:"); jLabel4.setText("Enter the end position:"); startBigEnd.setForeground(new java.awt.Color(204, 0, 0)); startBigEnd.setText("Please enter start position bigger then end position!"); filter.setText("Filter File"); org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add( jPanel1Layout .createSequentialGroup() .add(26, 26, 26) .add( jPanel1Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add( jLabel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 183, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add( jLabel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 152, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add( jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 219, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add( jPanel1Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) .add(jComboBox1, 0, 183, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, endPos) .add(org.jdesktop.layout.GroupLayout.TRAILING, startPos)) .add(35, 35, 35)) .add( org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout .createSequentialGroup() .addContainerGap(99, Short.MAX_VALUE) .add( startBigEnd, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 341, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(84, 84, 84)) .add( jPanel1Layout .createSequentialGroup() .add( jPanel1Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add( jPanel1Layout .createSequentialGroup() .add(163, 163, 163) .add( jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 197, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add( jPanel1Layout .createSequentialGroup() .add(205, 205, 205) .add(filter))) .addContainerGap( org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel1Layout.setVerticalGroup( jPanel1Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add( jPanel1Layout .createSequentialGroup() .add(14, 14, 14) .add( jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 26, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(startBigEnd) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add( jPanel1Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add( jComboBox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add( jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 27, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(36, 36, 36) .add( jPanel1Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add( jLabel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 26, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add( startPos, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(42, 42, 42) .add( jPanel1Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add( jLabel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add( endPos, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(18, 18, 18) .add(filter) .addContainerGap(23, Short.MAX_VALUE))); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add( org.jdesktop.layout.GroupLayout.TRAILING, jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); layout.setVerticalGroup( layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add( org.jdesktop.layout.GroupLayout.TRAILING, jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); getAccessibleContext().setAccessibleName("fra"); bindingGroup.bind(); pack(); } // </editor-fold>
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { bindingGroup = new org.jdesktop.beansbinding.BindingGroup(); addNewTitleButton = new javax.swing.JButton(); inCOkButton2 = new javax.swing.JButton(); EditNewButton = new javax.swing.JButton(); EditRentalButton = new javax.swing.JButton(); inCIdField2 = new javax.swing.JTextField(); inCIdLabel2 = new javax.swing.JLabel(); jScrollPane6 = new javax.swing.JScrollPane(); jTable5 = new javax.swing.JTable(); jComboBox4 = new javax.swing.JComboBox(); jScrollPane2 = new javax.swing.JScrollPane(); jTable2 = new javax.swing.JTable(); rentalNewAddButton = new javax.swing.JButton(); searchField2 = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); searchField1 = new javax.swing.JLabel(); addNewTitleButton.setText("Add New Video"); addNewTitleButton.setActionCommand("Add new Rental"); addNewTitleButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { addNewTitleButtonActionPerformed(evt); } }); inCOkButton2.setText("OK"); EditNewButton.setText("Edit Selected"); EditNewButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { EditNewButtonActionPerformed(evt); } }); EditRentalButton.setText("Edit Selected"); EditRentalButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { EditRentalButtonActionPerformed(evt); } }); inCIdLabel2.setFont(new java.awt.Font("Tahoma", 1, 11)); inCIdLabel2.setText("General Movie:"); jTable5.setModel(new javax.swing.table.DefaultTableModel(tableContent, header)); org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, EditNewButton, org.jdesktop.beansbinding.ObjectProperty.create(), jTable5, org.jdesktop.beansbinding.BeanProperty.create("rowSelectionAllowed")); bindingGroup.addBinding(binding); jScrollPane6.setViewportView(jTable5); jComboBox4.setModel(new javax.swing.DefaultComboBoxModel(new String[] {"Title", "SKU"})); jTable2.setModel(new javax.swing.table.DefaultTableModel(tableContent2, header)); jScrollPane2.setViewportView(jTable2); rentalNewAddButton.setText("Add New Rental"); rentalNewAddButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { rentalNewAddButtonActionPerformed(evt); } }); searchField2.setFont(new java.awt.Font("Tahoma", 1, 14)); searchField2.setForeground(new java.awt.Color(255, 0, 0)); searchField2.setText("Movie Not Found"); jLabel1.setText("Rental Movie"); jLabel2.setText("General Inventory"); searchField1.setFont(new java.awt.Font("Tahoma", 1, 14)); searchField1.setForeground(new java.awt.Color(255, 0, 0)); searchField1.setText("Movie Not Found"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addComponent(inCIdLabel2) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent( inCIdField2, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent( jComboBox4, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( inCOkButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup( layout .createSequentialGroup() .addGap(259, 259, 259) .addComponent( rentalNewAddButton, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(EditRentalButton)) .addGroup( layout .createSequentialGroup() .addContainerGap() .addComponent( jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 677, Short.MAX_VALUE)) .addGroup( layout .createSequentialGroup() .addContainerGap() .addComponent( jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 677, Short.MAX_VALUE)) .addGroup( layout .createSequentialGroup() .addContainerGap() .addComponent(jLabel2)) .addGroup( layout .createSequentialGroup() .addContainerGap() .addComponent(jLabel1) .addGap(186, 186, 186) .addComponent(addNewTitleButton) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( EditNewButton, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 104, Short.MAX_VALUE) .addComponent(searchField2))) .addContainerGap()) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout .createSequentialGroup() .addContainerGap(573, Short.MAX_VALUE) .addComponent(searchField1) .addGap(6, 6, 6)))); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(inCIdLabel2) .addComponent( inCIdField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( jComboBox4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(inCOkButton2)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGap(29, 29, 29) .addComponent(jLabel1) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED)) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout .createSequentialGroup() .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(addNewTitleButton) .addComponent(EditNewButton) .addComponent( searchField2, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(15, 15, 15))) .addComponent( jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(EditRentalButton) .addComponent(rentalNewAddButton)) .addContainerGap(28, Short.MAX_VALUE)) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGap(21, 21, 21) .addComponent( searchField1, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(488, Short.MAX_VALUE)))); bindingGroup.bind(); } // </editor-fold>//GEN-END:initComponents
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { bindingGroup = new org.jdesktop.beansbinding.BindingGroup(); jLabel2 = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); nameField = new javax.swing.JTextField(); cityField = new javax.swing.JTextField(); jLabel3 = new javax.swing.JLabel(); org.openide.awt.Mnemonics.setLocalizedText( jLabel2, org.openide.util.NbBundle.getMessage( CustomerEditorTopComponent.class, "CustomerEditorTopComponent.jLabel2.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText( jLabel1, org.openide.util.NbBundle.getMessage( CustomerEditorTopComponent.class, "CustomerEditorTopComponent.jLabel1.text")); // NOI18N org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, nameField, org.jdesktop.beansbinding.ObjectProperty.create(), jLabel1, org.jdesktop.beansbinding.BeanProperty.create("labelFor")); bindingGroup.addBinding(binding); nameField.setText( org.openide.util.NbBundle.getMessage( CustomerEditorTopComponent.class, "CustomerEditorTopComponent.nameField.text")); // NOI18N cityField.setText( org.openide.util.NbBundle.getMessage( CustomerEditorTopComponent.class, "CustomerEditorTopComponent.cityField.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText( jLabel3, org.openide.util.NbBundle.getMessage( CustomerEditorTopComponent.class, "CustomerEditorTopComponent.jLabel3.text")); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, cityField, org.jdesktop.beansbinding.ObjectProperty.create(), jLabel3, org.jdesktop.beansbinding.BeanProperty.create("labelFor")); bindingGroup.addBinding(binding); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1) .addComponent(jLabel3)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( cityField, javax.swing.GroupLayout.DEFAULT_SIZE, 319, Short.MAX_VALUE) .addComponent(nameField)) .addContainerGap())); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent( nameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( cityField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3)) .addContainerGap(228, Short.MAX_VALUE))); bindingGroup.bind(); } // </editor-fold>//GEN-END:initComponents