Пример #1
0
  /**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT
   * modify this code. The content of this method is always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    jPanel1 = new javax.swing.JPanel();
    jButton1 = new javax.swing.JButton();
    orderPanel = new javax.swing.JPanel();
    filler2 =
        new javax.swing.Box.Filler(
            new java.awt.Dimension(10, 0),
            new java.awt.Dimension(10, 0),
            new java.awt.Dimension(10, 0));
    orderLabel = new javax.swing.JLabel();
    filler3 =
        new javax.swing.Box.Filler(
            new java.awt.Dimension(0, 0),
            new java.awt.Dimension(0, 0),
            new java.awt.Dimension(32767, 0));
    filler1 =
        new javax.swing.Box.Filler(
            new java.awt.Dimension(5, 0),
            new java.awt.Dimension(5, 0),
            new java.awt.Dimension(5, 0));
    datePanel = new javax.swing.JPanel();
    dateLabel = new javax.swing.JLabel();
    detailButton = new javax.swing.JButton();

    jPanel1.setName("jPanel1"); // NOI18N

    org.jdesktop.application.ResourceMap resourceMap =
        org.jdesktop.application.Application.getInstance(imat.IMatApp.class)
            .getContext()
            .getResourceMap(OrderPanel.class);
    jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
    jButton1.setName("jButton1"); // NOI18N

    setBackground(resourceMap.getColor("Form.background")); // NOI18N
    setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
    setMaximumSize(new java.awt.Dimension(32767, 55));
    setMinimumSize(new java.awt.Dimension(0, 55));
    setName("Form"); // NOI18N

    orderPanel.setBackground(resourceMap.getColor("orderPanel.background")); // NOI18N
    orderPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    orderPanel.setMinimumSize(new java.awt.Dimension(0, 30));
    orderPanel.setName("orderPanel"); // NOI18N
    orderPanel.setLayout(new javax.swing.BoxLayout(orderPanel, javax.swing.BoxLayout.LINE_AXIS));

    filler2.setName("filler2"); // NOI18N
    orderPanel.add(filler2);

    orderLabel.setFont(resourceMap.getFont("orderLabel.font")); // NOI18N
    orderLabel.setText(resourceMap.getString("orderLabel.text")); // NOI18N
    orderLabel.setName("orderLabel"); // NOI18N
    orderPanel.add(orderLabel);

    filler3.setName("filler3"); // NOI18N
    orderPanel.add(filler3);

    filler1.setName("filler1"); // NOI18N
    orderPanel.add(filler1);

    datePanel.setBackground(resourceMap.getColor("datePanel.background")); // NOI18N
    datePanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    datePanel.setName("datePanel"); // NOI18N

    dateLabel.setBackground(resourceMap.getColor("dateLabel.background")); // NOI18N
    dateLabel.setFont(resourceMap.getFont("dateLabel.font")); // NOI18N
    dateLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    dateLabel.setText(resourceMap.getString("dateLabel.text")); // NOI18N
    dateLabel.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    dateLabel.setName("dateLabel"); // NOI18N

    detailButton.setText(resourceMap.getString("detailButton.text")); // NOI18N
    detailButton.setName("detailButton"); // NOI18N

    javax.swing.GroupLayout datePanelLayout = new javax.swing.GroupLayout(datePanel);
    datePanel.setLayout(datePanelLayout);
    datePanelLayout.setHorizontalGroup(
        datePanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                datePanelLayout
                    .createSequentialGroup()
                    .addComponent(
                        dateLabel,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        196,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(
                        javax.swing.LayoutStyle.ComponentPlacement.RELATED, 72, Short.MAX_VALUE)
                    .addComponent(detailButton)
                    .addContainerGap()));
    datePanelLayout.setVerticalGroup(
        datePanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                datePanelLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(
                        dateLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE)
                    .addComponent(detailButton)));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addComponent(
                        orderPanel,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        256,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        datePanel,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE)));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(
                orderPanel,
                javax.swing.GroupLayout.Alignment.TRAILING,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                53,
                Short.MAX_VALUE)
            .addComponent(
                datePanel,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                Short.MAX_VALUE));
  } // </editor-fold>//GEN-END:initComponents
Пример #2
0
  /**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT
   * modify this code. The content of this method is always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
  // <draw-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    name = new javax.swing.JLabel();
    lastOrderNumberInfoPanel = new by.dak.cutting.swing.order.LastOrderNumberInfoPanel();
    number = new javax.swing.JLabel();
    customer = new javax.swing.JLabel();
    date = new javax.swing.JLabel();
    ready = new javax.swing.JLabel();
    cost = new javax.swing.JLabel();
    designer = new javax.swing.JLabel();
    numberValue = new by.dak.cutting.swing.component.OrderNumberField();
    nameValue = new javax.swing.JTextField();
    addSelectAllListener(nameValue);
    customerValue = new by.dak.cutting.swing.ItemSelector();
    designerValue = new by.dak.cutting.swing.ItemSelector();
    readyValue = new com.toedter.calendar.JDateChooser();
    dateValue = new javax.swing.JTextField();
    addSelectAllListener(dateValue);
    costValue = new by.dak.cutting.swing.component.MaskTextField();
    addSelectAllListener(costValue);
    setName("Form"); // NOI18N

    name.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    org.jdesktop.application.ResourceMap resourceMap =
        org.jdesktop.application.Application.getInstance()
            .getContext()
            .getResourceMap(OrderInfoTab.class);
    name.setText(resourceMap.getString("name.text")); // NOI18N
    name.setName("name"); // NOI18N

    lastOrderNumberInfoPanel.setName("lastOrderNumberInfoPanel"); // NOI18N

    number.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    number.setText(resourceMap.getString("number.text")); // NOI18N
    number.setName("number"); // NOI18N

    customer.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    customer.setText(resourceMap.getString("customer.text")); // NOI18N
    customer.setName("customer"); // NOI18N

    date.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    date.setText(resourceMap.getString("date.text")); // NOI18N
    date.setName("date"); // NOI18N

    ready.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    ready.setText(resourceMap.getString("ready.text")); // NOI18N
    ready.setName("ready"); // NOI18N

    cost.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    cost.setText(resourceMap.getString("cost.text")); // NOI18N
    cost.setName("cost"); // NOI18N

    designer.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    designer.setText(resourceMap.getString("designer.text")); // NOI18N
    designer.setName("designer"); // NOI18N

    numberValue.setName("numberValue"); // NOI18N

    nameValue.setText(resourceMap.getString("nameValue.text")); // NOI18N
    nameValue.setName("nameValue"); // NOI18N

    customerValue.setName("customerValue"); // NOI18N
    javax.swing.ActionMap actionMap =
        org.jdesktop.application.Application.getInstance()
            .getContext()
            .getActionMap(OrderInfoTab.class, this);
    customerValue.setNewAction(actionMap.get("showNewCustomerDialog")); // NOI18N

    designerValue.setName("designerValue"); // NOI18N
    designerValue.setNewAction(actionMap.get("showNewDesignerDialog")); // NOI18N

    readyValue.setName("readyValue"); // NOI18N

    dateValue.setEditable(false);
    dateValue.setText(resourceMap.getString("dateValue.text")); // NOI18N
    dateValue.setName("dateValue"); // NOI18N

    costValue.setText(resourceMap.getString("costValue.text")); // NOI18N
    costValue.setName("costValue"); // NOI18N

    cbOrderMiscalculation = new JCheckBox(resourceMap.getString("cbOrderMiscalculation.text"));

    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()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addGroup(
                                                layout
                                                    .createParallelGroup(
                                                        javax.swing.GroupLayout.Alignment.TRAILING,
                                                        false)
                                                    .addComponent(
                                                        name,
                                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                                        59,
                                                        Short.MAX_VALUE)
                                                    .addGroup(
                                                        layout
                                                            .createSequentialGroup()
                                                            .addPreferredGap(
                                                                javax.swing.LayoutStyle
                                                                    .ComponentPlacement.RELATED,
                                                                11,
                                                                Short.MAX_VALUE)
                                                            .addComponent(number)))
                                            .addComponent(customer))
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(
                                                customerValue,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                559,
                                                Short.MAX_VALUE)
                                            .addComponent(
                                                nameValue,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                559,
                                                Short.MAX_VALUE)
                                            .addComponent(
                                                numberValue,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                559,
                                                Short.MAX_VALUE)))
                            .addGroup(
                                javax.swing.GroupLayout.Alignment.TRAILING,
                                layout
                                    .createSequentialGroup()
                                    .addGap(43, 43, 43)
                                    .addComponent(date)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        dateValue,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        559,
                                        Short.MAX_VALUE))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGap(20, 20, 20)
                                    .addComponent(designer)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        designerValue,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        559,
                                        Short.MAX_VALUE))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.TRAILING, false)
                                            .addGroup(
                                                layout
                                                    .createSequentialGroup()
                                                    .addGap(15, 15, 15)
                                                    .addComponent(cost))
                                            .addComponent(
                                                ready,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                Short.MAX_VALUE))
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(
                                                readyValue,
                                                javax.swing.GroupLayout.Alignment.TRAILING,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                559,
                                                Short.MAX_VALUE)
                                            .addComponent(
                                                costValue,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                559,
                                                Short.MAX_VALUE)))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(
                                        lastOrderNumberInfoPanel,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        622,
                                        Short.MAX_VALUE))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(
                                        cbOrderMiscalculation,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        622,
                                        Short.MAX_VALUE)))
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(
                                name,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(
                                numberValue,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                nameValue,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                number,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                19,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(
                                customerValue,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(
                                customer,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                22,
                                Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                date,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                22,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                dateValue,
                                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.LEADING)
                            .addComponent(
                                readyValue,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                ready,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                20,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                cost,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                19,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                costValue,
                                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.LEADING, false)
                            .addComponent(
                                designerValue,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(
                                designer,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                23,
                                Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        lastOrderNumberInfoPanel,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(
                        cbOrderMiscalculation,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(11, Short.MAX_VALUE)));
  } // </draw-fold>//GEN-END:initComponents
Пример #3
0
  /**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT
   * modify this code. The content of this method is always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    jPanel1 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jPanel2 = new javax.swing.JPanel();
    jLabel2 = new javax.swing.JLabel();
    jTextField1 = new javax.swing.JTextField();
    jLabel3 = new javax.swing.JLabel();
    jTextField2 = new javax.swing.JTextField();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTextPane1 = new javax.swing.JTextPane();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jLabel4 = new javax.swing.JLabel();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    org.jdesktop.application.ResourceMap resourceMap =
        org.jdesktop.application.Application.getInstance(simuldp.SimulDPApp.class)
            .getContext()
            .getResourceMap(ExpDialog.class);
    setTitle(resourceMap.getString("Form.title")); // NOI18N
    setName("Form"); // NOI18N
    setResizable(false);

    jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jPanel1.setName("jPanel1"); // NOI18N

    jLabel1.setFont(resourceMap.getFont("jLabel1.font")); // NOI18N
    jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
    jLabel1.setName("jLabel1"); // NOI18N

    jPanel2.setBorder(
        javax.swing.BorderFactory.createTitledBorder(
            resourceMap.getString("jPanel2.border.title"))); // NOI18N
    jPanel2.setName("jPanel2"); // NOI18N

    jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
    jLabel2.setName("jLabel2"); // NOI18N

    jTextField1.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
    jTextField1.setText(resourceMap.getString("jTextField1.text")); // NOI18N
    jTextField1.setName("jTextField1"); // NOI18N

    jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
    jLabel3.setName("jLabel3"); // NOI18N

    jTextField2.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
    jTextField2.setText(resourceMap.getString("jTextField2.text")); // NOI18N
    jTextField2.setName("jTextField2"); // NOI18N

    org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
        jPanel2Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                jPanel2Layout
                    .createSequentialGroup()
                    .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(
                        jPanel2Layout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jLabel3)
                            .add(jLabel2))
                    .add(35, 35, 35)
                    .add(
                        jPanel2Layout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                            .add(jTextField1)
                            .add(
                                jTextField2,
                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                57,
                                Short.MAX_VALUE))
                    .addContainerGap()));
    jPanel2Layout.setVerticalGroup(
        jPanel2Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                jPanel2Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .add(
                        jPanel2Layout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jLabel2)
                            .add(
                                jTextField1,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(18, 18, 18)
                    .add(
                        jPanel2Layout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jLabel3)
                            .add(
                                jTextField2,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(
                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    jScrollPane1.setName("jScrollPane1"); // NOI18N

    jTextPane1.setEditable(false);
    jTextPane1.setText(resourceMap.getString("jTextPane1.text")); // NOI18N
    jTextPane1.setName("jTextPane1"); // NOI18N
    jScrollPane1.setViewportView(jTextPane1);

    jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
    jButton1.setName("jButton1"); // NOI18N
    jButton1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
          }
        });

    jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
    jButton2.setName("jButton2"); // NOI18N
    jButton2.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton2ActionPerformed(evt);
          }
        });

    jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    jLabel4.setIcon(resourceMap.getIcon("jLabel4.icon")); // NOI18N
    jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
    jLabel4.setName("jLabel4"); // NOI18N
    jLabel4.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

    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()
                    .addContainerGap()
                    .add(
                        jPanel1Layout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .add(
                                        jScrollPane1,
                                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                        744,
                                        Short.MAX_VALUE)
                                    .addContainerGap())
                            .add(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .add(jLabel1)
                                    .addContainerGap(553, Short.MAX_VALUE))
                            .add(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .add(
                                        jPanel1Layout
                                            .createParallelGroup(
                                                org.jdesktop.layout.GroupLayout.LEADING)
                                            .add(
                                                jPanel2,
                                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                            .add(
                                                jPanel1Layout
                                                    .createSequentialGroup()
                                                    .add(49, 49, 49)
                                                    .add(jButton1)
                                                    .add(61, 61, 61)
                                                    .add(jButton2)))
                                    .addPreferredGap(
                                        org.jdesktop.layout.LayoutStyle.RELATED,
                                        91,
                                        Short.MAX_VALUE)
                                    .add(jLabel4)
                                    .add(47, 47, 47)))));
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                jPanel1Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .add(jLabel1)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 11, Short.MAX_VALUE)
                    .add(
                        jScrollPane1,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(
                        jPanel1Layout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .add(
                                        jPanel2,
                                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .add(18, 18, 18)
                                    .add(
                                        jPanel1Layout
                                            .createParallelGroup(
                                                org.jdesktop.layout.GroupLayout.BASELINE)
                                            .add(jButton1)
                                            .add(jButton2)))
                            .add(jLabel4))
                    .add(20, 20, 20)));

    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .add(
                        jPanel1,
                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE)
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .add(
                        jPanel1,
                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE)
                    .addContainerGap()));

    pack();
  } // </editor-fold>//GEN-END:initComponents
Пример #4
0
  /**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT
   * modify this code. The content of this method is always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    mainPanel = new javax.swing.JPanel();
    gamesPane = new jchess.display.windows.JChessTabbedPane();
    menuBar = new javax.swing.JMenuBar();
    javax.swing.JMenu fileMenu = new javax.swing.JMenu();
    newGameItem = new javax.swing.JMenuItem();
    // loadGameItem = new javax.swing.JMenuItem();
    // saveGameItem = new javax.swing.JMenuItem();
    javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();
    gameMenu = new javax.swing.JMenu();
    moveBackItem = new javax.swing.JMenuItem();
    moveForwardItem = new javax.swing.JMenuItem();
    rewindToBegin = new javax.swing.JMenuItem();
    rewindToEnd = new javax.swing.JMenuItem();
    // optionsMenu = new javax.swing.JMenu();
    // themeSettingsMenu = new javax.swing.JMenuItem();
    // javax.swing.JMenu helpMenu = new javax.swing.JMenu();
    javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();
    statusPanel = new javax.swing.JPanel();
    javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator();
    statusMessageLabel = new javax.swing.JLabel();
    statusAnimationLabel = new javax.swing.JLabel();
    progressBar = new javax.swing.JProgressBar();

    mainPanel.setMaximumSize(new java.awt.Dimension(800, 600));
    mainPanel.setMinimumSize(new java.awt.Dimension(800, 600));
    mainPanel.setName("mainPanel"); // NOI18N
    mainPanel.setPreferredSize(new java.awt.Dimension(800, 600));

    gamesPane.setName("gamesPane"); // NOI18N

    javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);
    mainPanel.setLayout(mainPanelLayout);
    mainPanelLayout.setHorizontalGroup(
        mainPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                mainPanelLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(
                        gamesPane, javax.swing.GroupLayout.DEFAULT_SIZE, 776, Short.MAX_VALUE)
                    .addContainerGap()));
    mainPanelLayout.setVerticalGroup(
        mainPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                mainPanelLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(
                        gamesPane, javax.swing.GroupLayout.DEFAULT_SIZE, 580, Short.MAX_VALUE)));

    menuBar.setName("menuBar"); // NOI18N

    org.jdesktop.application.ResourceMap resourceMap =
        org.jdesktop.application.Application.getInstance(jchess.JChessApp.class)
            .getContext()
            .getResourceMap(JChessView.class);
    fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N
    fileMenu.setName("fileMenu"); // NOI18N

    newGameItem.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK));
    newGameItem.setText(resourceMap.getString("newGameItem.text")); // NOI18N
    newGameItem.setName("newGameItem"); // NOI18N
    fileMenu.add(newGameItem);
    newGameItem.addActionListener(this);

    /*
    loadGameItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.CTRL_MASK));
    loadGameItem.setText(resourceMap.getString("loadGameItem.text")); // NOI18N
    loadGameItem.setName("loadGameItem"); // NOI18N
    fileMenu.add(loadGameItem);
    loadGameItem.addActionListener(this);
    */

    /*
    saveGameItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));
    saveGameItem.setText(resourceMap.getString("saveGameItem.text")); // NOI18N
    saveGameItem.setName("saveGameItem"); // NOI18N
    fileMenu.add(saveGameItem);
    saveGameItem.addActionListener(this);
    */

    javax.swing.ActionMap actionMap =
        org.jdesktop.application.Application.getInstance(jchess.JChessApp.class)
            .getContext()
            .getActionMap(JChessView.class, this);
    exitMenuItem.setAction(actionMap.get("quit")); // NOI18N
    exitMenuItem.setName("exitMenuItem"); // NOI18N
    fileMenu.add(exitMenuItem);

    menuBar.add(fileMenu);

    gameMenu.setText(resourceMap.getString("gameMenu.text")); // NOI18N
    gameMenu.setName("gameMenu"); // NOI18N

    moveBackItem.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_Z, java.awt.event.InputEvent.CTRL_MASK));
    moveBackItem.setText(resourceMap.getString("moveBackItem.text")); // NOI18N
    moveBackItem.setName("moveBackItem"); // NOI18N
    moveBackItem.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            moveBackItemMouseClicked(evt);
          }
        });
    moveBackItem.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            moveBackItemActionPerformed(evt);
          }
        });
    gameMenu.add(moveBackItem);

    moveForwardItem.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_Y, java.awt.event.InputEvent.CTRL_MASK));
    moveForwardItem.setText(resourceMap.getString("moveForwardItem.text")); // NOI18N
    moveForwardItem.setName("moveForwardItem"); // NOI18N
    moveForwardItem.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            moveForwardItemMouseClicked(evt);
          }
        });
    moveForwardItem.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            moveForwardItemActionPerformed(evt);
          }
        });
    gameMenu.add(moveForwardItem);

    rewindToBegin.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_Z,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    rewindToBegin.setText(resourceMap.getString("rewindToBegin.text")); // NOI18N
    rewindToBegin.setName("rewindToBegin"); // NOI18N
    rewindToBegin.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            rewindToBeginActionPerformed(evt);
          }
        });
    gameMenu.add(rewindToBegin);

    rewindToEnd.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_Y,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    rewindToEnd.setText(resourceMap.getString("rewindToEnd.text")); // NOI18N
    rewindToEnd.setName("rewindToEnd"); // NOI18N
    rewindToEnd.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            rewindToEndActionPerformed(evt);
          }
        });
    gameMenu.add(rewindToEnd);

    menuBar.add(gameMenu);

    /*
    optionsMenu.setText(resourceMap.getString("optionsMenu.text")); // NOI18N
    optionsMenu.setName("optionsMenu"); // NOI18N

    themeSettingsMenu.setText(resourceMap.getString("themeSettingsMenu.text")); // NOI18N
    themeSettingsMenu.setName("themeSettingsMenu"); // NOI18N
    optionsMenu.add(themeSettingsMenu);
    themeSettingsMenu.addActionListener(this);

    menuBar.add(optionsMenu);*/

    /*
    helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N
    helpMenu.setName("helpMenu"); // NOI18N

    aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N
    aboutMenuItem.setName("aboutMenuItem"); // NOI18N
    helpMenu.add(aboutMenuItem);

    menuBar.add(helpMenu);*/

    statusPanel.setName("statusPanel"); // NOI18N

    statusPanelSeparator.setName("statusPanelSeparator"); // NOI18N

    statusMessageLabel.setName("statusMessageLabel"); // NOI18N

    statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N

    progressBar.setName("progressBar"); // NOI18N

    javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel);
    statusPanel.setLayout(statusPanelLayout);
    statusPanelLayout.setHorizontalGroup(
        statusPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(
                statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 800, Short.MAX_VALUE)
            .addGroup(
                statusPanelLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(statusMessageLabel)
                    .addPreferredGap(
                        javax.swing.LayoutStyle.ComponentPlacement.RELATED, 616, Short.MAX_VALUE)
                    .addComponent(
                        progressBar,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(statusAnimationLabel)
                    .addContainerGap()));
    statusPanelLayout.setVerticalGroup(
        statusPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                statusPanelLayout
                    .createSequentialGroup()
                    .addComponent(
                        statusPanelSeparator,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        2,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(
                        javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE)
                    .addGroup(
                        statusPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(statusMessageLabel)
                            .addComponent(statusAnimationLabel)
                            .addComponent(
                                progressBar,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(3, 3, 3)));

    setComponent(mainPanel);
    setMenuBar(menuBar);
    setStatusBar(statusPanel);
  } // </editor-fold>//GEN-END:initComponents