use of org.beanfabrics.swing.BnButton in project grafikon by jub77.
the class NewModelDialog method initComponents.
private void initComponents() {
ActionListener closeAction = e -> setVisible(false);
java.awt.GridBagConstraints gridBagConstraints;
javax.swing.JLabel jLabel1 = new javax.swing.JLabel();
BnComboBox scaleComboBox = new BnComboBox();
javax.swing.JLabel jLabel2 = new javax.swing.JLabel();
BnComboBox ratioComboBox = new BnComboBox();
javax.swing.JPanel panel1 = new javax.swing.JPanel();
BnButton okButton = new BnButton();
okButton.addActionListener(closeAction);
JButton cancelButton = new JButton();
cancelButton.addActionListener(closeAction);
javax.swing.JLabel jLabel3 = new javax.swing.JLabel();
BnComboBox templatesComboBox = new BnComboBox();
// NOI18N
setTitle(ResourceLoader.getString("newmodel"));
setResizable(false);
getContentPane().setLayout(new java.awt.GridBagLayout());
// NOI18N
jLabel1.setText(ResourceLoader.getString("modelinfo.scales"));
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 0);
getContentPane().add(jLabel1, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(10, 2, 10, 10);
getContentPane().add(scaleComboBox, gridBagConstraints);
// NOI18N
jLabel2.setText(ResourceLoader.getString("modelinfo.ratio"));
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(0, 10, 10, 0);
getContentPane().add(jLabel2, gridBagConstraints);
ratioComboBox.setEditable(true);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 1;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(0, 2, 10, 10);
getContentPane().add(ratioComboBox, gridBagConstraints);
// NOI18N
okButton.setText(ResourceLoader.getString("button.ok"));
panel1.add(okButton);
// NOI18N
cancelButton.setText(ResourceLoader.getString("button.cancel"));
panel1.add(cancelButton);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 3;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 5);
getContentPane().add(panel1, gridBagConstraints);
// NOI18N
jLabel3.setText(ResourceLoader.getString("newmodel.template"));
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(0, 10, 10, 0);
getContentPane().add(jLabel3, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(0, 2, 10, 10);
getContentPane().add(templatesComboBox, gridBagConstraints);
// binding
scaleComboBox.setModelProvider(provider);
scaleComboBox.setPath(new Path("scale"));
ratioComboBox.setModelProvider(provider);
ratioComboBox.setPath(new Path("timeScale"));
templatesComboBox.setModelProvider(provider);
templatesComboBox.setPath(new Path("template"));
okButton.setModelProvider(provider);
okButton.setPath(new Path("ok"));
pack();
}
Aggregations