gbc_lblDesignDate.insets = new Insets(0, 0, 5, 5);
gbc_lblDesignDate.gridx = 2;
gbc_lblDesignDate.gridy = 0;
getFormPanel().add(this.lblDesignDate, gbc_lblDesignDate);
this.hijriDateTextField = new HijriDateTextField();
this.hijriDateTextField.setDate(new Date());
GridBagConstraints gbc_hijriDateTextField = new GridBagConstraints();
gbc_hijriDateTextField.anchor = GridBagConstraints.LINE_START;
gbc_hijriDateTextField.insets = new Insets(0, 0, 5, 0);
gbc_hijriDateTextField.gridx = 3;
gbc_hijriDateTextField.gridy = 0;
getFormPanel().add(this.hijriDateTextField, gbc_hijriDateTextField);
this.thoubCustomerPanel = new ThoubCustomerPanel();
this.thoubCustomerPanel
.addPropertyChangeListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
if ("customerUpdated".equals(evt.getPropertyName()))
try {
prepareData();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
this.thoubCustomerPanel.setBorder(new TitledBorder(null, "Main Info",
TitledBorder.LEADING, TitledBorder.TOP, null, null));
GridBagConstraints gbc_thoubCustomerPanel = new GridBagConstraints();
gbc_thoubCustomerPanel.gridwidth = 3;
gbc_thoubCustomerPanel.insets = new Insets(0, 0, 5, 5);
gbc_thoubCustomerPanel.fill = GridBagConstraints.BOTH;
gbc_thoubCustomerPanel.gridx = 0;
gbc_thoubCustomerPanel.gridy = 1;
getFormPanel().add(this.thoubCustomerPanel, gbc_thoubCustomerPanel);
this.thoubeMesuresPanel = new ThoubeMesuresPanel();
this.thoubeMesuresPanel.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Mesures", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 70, 213)));
GridBagConstraints gbc_thoubeMesuresPanel = new GridBagConstraints();
gbc_thoubeMesuresPanel.insets = new Insets(0, 0, 5, 0);
gbc_thoubeMesuresPanel.fill = GridBagConstraints.BOTH;
gbc_thoubeMesuresPanel.gridx = 3;
gbc_thoubeMesuresPanel.gridy = 1;
getFormPanel().add(this.thoubeMesuresPanel, gbc_thoubeMesuresPanel);
this.ThoubsPanel = new JPanel();
this.ThoubsPanel.setBorder(new TitledBorder(null, "Thoubs",
TitledBorder.LEADING, TitledBorder.TOP, null, null));
GridBagConstraints gbc_ThoubsPanel = new GridBagConstraints();
gbc_ThoubsPanel.ipady = -300;
gbc_ThoubsPanel.gridwidth = 4;
gbc_ThoubsPanel.insets = new Insets(0, 0, 5, 0);
gbc_ThoubsPanel.fill = GridBagConstraints.BOTH;
gbc_ThoubsPanel.gridx = 0;
gbc_ThoubsPanel.gridy = 2;
getFormPanel().add(this.ThoubsPanel, gbc_ThoubsPanel);
this.ThoubsPanel.setLayout(new BorderLayout(0, 0));
this.toolBar = new JToolBar();
this.ThoubsPanel.add(this.toolBar, BorderLayout.NORTH);
this.toolBar.setFloatable(false);
this.toolBar.setRollover(true);
this.btnAddSpic = new JButton(BUNDLE_THOUB_DESIGN.getString("CustomerThoubDesign.btnAddSpic.text")); //$NON-NLS-1$
this.btnAddSpic
.setIcon(new ImageIcon(
CustomerThoubDesign.class
.getResource("/com/rakaiz/tailorbills/view/icons/plus_orange.png")));
this.btnAddSpic.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent e) {
doBtnAddSpicActionPerformed(e);
}
});
this.toolBar.add(this.btnAddSpic);
this.btnRemoveSpic = new JButton(BUNDLE_THOUB_DESIGN.getString("CustomerThoubDesign.btnRemoveSpic.text")); //$NON-NLS-1$
this.btnRemoveSpic.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent e) {
doBtnRemoveSpicActionPerformed(e);
}
});
this.btnRemoveSpic
.setIcon(new ImageIcon(
CustomerThoubDesign.class
.getResource("/com/rakaiz/tailorbills/view/icons/edit_remove.png")));
this.toolBar.add(this.btnRemoveSpic);
this.btnEditSpic = new JButton(BUNDLE_THOUB_DESIGN.getString("CustomerThoubDesign.btnEditSpic.text")); //$NON-NLS-1$
this.btnEditSpic.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent e) {
doBtnEditSpicActionPerformed(e);
}
});
this.btnEditSpic
.setIcon(new ImageIcon(
CustomerThoubDesign.class
.getResource("/com/rakaiz/tailorbills/view/icons/layout_design.png")));
this.toolBar.add(this.btnEditSpic);
this.scrollPane = new JScrollPane();
this.ThoubsPanel.add(this.scrollPane, BorderLayout.CENTER);
this.thoubsTable = new JTable();
this.thoubsTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
this.thoubsTable.setModel(new CustomerThoubSpicTableModel());
this.scrollPane.setViewportView(this.thoubsTable);
this.lblTotalPrice = new JLabel(BUNDLE_THOUB_DESIGN.getString("CustomerThoubDesign.lblTotalPrice.text")); //$NON-NLS-1$
GridBagConstraints gbc_lblTotalPrice = new GridBagConstraints();
gbc_lblTotalPrice.insets = new Insets(0, 0, 5, 5);
gbc_lblTotalPrice.gridx = 0;
gbc_lblTotalPrice.gridy = 3;
getFormPanel().add(this.lblTotalPrice, gbc_lblTotalPrice);
this.txtTotalPrice = new JFormattedTextField(DecimalFormat.getInstance());
this.txtTotalPrice.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
doTxtTotalPriceActionPerformed(e);
}
});
this.txtTotalPrice.setValue(0);
this.txtTotalPrice.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
doTxtTotalPriceFocusLost(e);
}
@Override
public void focusGained(FocusEvent e) {
doTxtTotalPriceFocusGained(e);
}
});
GridBagConstraints gbc_txtTotalPrice = new GridBagConstraints();
gbc_txtTotalPrice.anchor = GridBagConstraints.LINE_START;
gbc_txtTotalPrice.insets = new Insets(0, 0, 5, 5);
gbc_txtTotalPrice.gridx = 1;
gbc_txtTotalPrice.gridy = 3;
getFormPanel().add(this.txtTotalPrice, gbc_txtTotalPrice);
this.txtTotalPrice.setColumns(10);
this.lblPaid = new JLabel(BUNDLE_THOUB_DESIGN.getString("CustomerThoubDesign.lblPaid.text")); //$NON-NLS-1$
GridBagConstraints gbc_lblPaid = new GridBagConstraints();
gbc_lblPaid.insets = new Insets(0, 0, 5, 5);
gbc_lblPaid.gridx = 0;
gbc_lblPaid.gridy = 4;
getFormPanel().add(this.lblPaid, gbc_lblPaid);
this.txtPaid = new JFormattedTextField(DecimalFormat.getInstance());
this.txtPaid.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
doTxtPaidActionPerformed(e);
}
});
this.txtPaid.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
doTxtPaidFocusLost(e);
}
@Override
public void focusGained(FocusEvent e) {
doTxtPaidFocusGained(e);
}
});
this.txtPaid.setValue(0);
GridBagConstraints gbc_txtPaid = new GridBagConstraints();
gbc_txtPaid.anchor = GridBagConstraints.LINE_START;
gbc_txtPaid.insets = new Insets(0, 0, 5, 5);
gbc_txtPaid.gridx = 1;
gbc_txtPaid.gridy = 4;
getFormPanel().add(this.txtPaid, gbc_txtPaid);
this.txtPaid.setColumns(10);
this.lblRemain = new JLabel(BUNDLE_THOUB_DESIGN.getString("CustomerThoubDesign.lblRemain.text")); //$NON-NLS-1$
GridBagConstraints gbc_lblRemain = new GridBagConstraints();
gbc_lblRemain.insets = new Insets(0, 0, 5, 5);
gbc_lblRemain.gridx = 0;
gbc_lblRemain.gridy = 5;
getFormPanel().add(this.lblRemain, gbc_lblRemain);
this.txtRemain = new JFormattedTextField(DecimalFormat.getInstance());
GridBagConstraints gbc_txtRemain = new GridBagConstraints();
gbc_txtRemain.anchor = GridBagConstraints.LINE_START;
gbc_txtRemain.insets = new Insets(0, 0, 5, 5);
gbc_txtRemain.gridx = 1;
gbc_txtRemain.gridy = 5;
getFormPanel().add(this.txtRemain, gbc_txtRemain);
this.txtRemain.setColumns(10);
this.lblDeliveryDate = new JLabel(BUNDLE_THOUB_DESIGN.getString("CustomerThoubDesign.lblDeliveryDate.text")); //$NON-NLS-1$
GridBagConstraints gbc_lblDeliveryDate = new GridBagConstraints();
gbc_lblDeliveryDate.insets = new Insets(0, 0, 5, 5);
gbc_lblDeliveryDate.gridx = 0;
gbc_lblDeliveryDate.gridy = 6;
getFormPanel().add(this.lblDeliveryDate, gbc_lblDeliveryDate);
this.hijriDateTextField_1 = new HijriDateTextField();
this.hijriDateTextField_1.setDate(new Date());
GridBagConstraints gbc_hijriDateTextField_1 = new GridBagConstraints();
gbc_hijriDateTextField_1.insets = new Insets(0, 0, 5, 5);
gbc_hijriDateTextField_1.gridx = 1;
gbc_hijriDateTextField_1.gridy = 6;