示例#1
0
  // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
  private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    linesLayer =
        new JPanel() {
          protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            drawLines(g);
          }
        };
    CPanel = new javax.swing.JPanel();
    CLabel = new javax.swing.JLabel();
    towerLayer = new javax.swing.JPanel();
    ZQPanel = new javax.swing.JPanel();
    QLabel = new javax.swing.JLabel();

    setLayout(new java.awt.BorderLayout());

    setFocusable(false);
    linesLayer.setLayout(new java.awt.BorderLayout());

    linesLayer.setFocusable(false);
    linesLayer.setName("linesLayer");
    linesLayer.setOpaque(false);
    CPanel.setLayout(new java.awt.GridBagLayout());

    CPanel.setFocusable(false);
    CPanel.setOpaque(false);
    CLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    CLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/C.png")));
    CLabel.setToolTipText("Complex Field");
    CLabel.setAlignmentX(0.5F);
    CLabel.setAlignmentY(0.0F);
    CLabel.setFocusable(false);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 0);
    CPanel.add(CLabel, gridBagConstraints);

    linesLayer.add(CPanel, java.awt.BorderLayout.NORTH);

    towerLayer.setLayout(new java.awt.GridBagLayout());

    towerLayer.setFocusable(false);
    towerLayer.setName("towerLayer");
    towerLayer.setOpaque(false);
    linesLayer.add(towerLayer, java.awt.BorderLayout.CENTER);

    ZQPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 0, 0));

    ZQPanel.setFocusable(false);
    ZQPanel.setOpaque(false);
    QLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Q.png")));
    QLabel.setToolTipText("Rational Field");
    QLabel.setFocusable(false);
    QLabel.setIconTextGap(0);
    ZQPanel.add(QLabel);

    linesLayer.add(ZQPanel, java.awt.BorderLayout.SOUTH);

    add(linesLayer, java.awt.BorderLayout.CENTER);
  }
  /**
   * Static Init.
   *
   * <pre>
   *  mainPanel
   *      northPanel
   *      centerPanel
   *          xMatched
   *          xPanel
   *          xMathedTo
   *      southPanel
   *  </pre>
   *
   * @throws Exception
   */
  private void jbInit() throws Exception {
    mainPanel.setLayout(mainLayout);
    northPanel.setLayout(northLayout);

    // LineRefProv_Label.setText(Msg.getMsg(Env.getCtx(), "RecordNo",new String[]
    // {""+LineRefProv.getXX_VMR_PO_LineRefProv_ID()}));
    LineRefProv_Label.setText("");
    southPanel.setLayout(southLayout);
    bNewProduct.setText(Msg.translate(Env.getCtx(), "NewProduct"));
    bNewProduct.setEnabled(true);
    bDisassociate.setText(Msg.translate(Env.getCtx(), "Disassociate"));
    bDisassociate.setEnabled(false);
    centerPanel.setLayout(centerLayout);
    xProductScrollPane.setBorder(xProductBorder);
    xProductScrollPane.setPreferredSize(new Dimension(450, 150));
    xAssociateScrollPane.setBorder(xAssociateBorder);
    xAssociateScrollPane.setPreferredSize(new Dimension(450, 58));

    xPanel.setLayout(xLayout);
    mainPanel.add(northPanel, BorderLayout.NORTH);
    northPanel.add(
        LineRefProv_Label,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(12, 12, 5, 5),
            0,
            0));

    mainPanel.add(southPanel, BorderLayout.SOUTH);

    mainPanel.add(centerPanel, BorderLayout.CENTER);
    centerPanel.add(xProductScrollPane, BorderLayout.NORTH);
    xProductScrollPane.getViewport().add(xProductTable, null);
    centerPanel.add(xAssociateScrollPane, BorderLayout.SOUTH);
    centerPanel.add(xPanel, BorderLayout.CENTER);
    xAssociateScrollPane.getViewport().add(xAssociateTable, null);

    southPanel.add(
        bDisassociate,
        new GridBagConstraints(
            2,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(5, 12, 5, 12),
            0,
            0));
    southPanel.add(
        bNewProduct,
        new GridBagConstraints(
            8,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 12, 5, 12),
            0,
            0));
  } //  jbInit