com.aw.swing.mvp.cmp.pick.FrmPickDocVenta.java Source code

Java tutorial

Introduction

Here is the source code for com.aw.swing.mvp.cmp.pick.FrmPickDocVenta.java

Source

/*
 * Copyright (c) 2007 Agile-Works
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Agile-Works. ("Confidential Information").
 * You shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement you
 * entered into with Agile-Works.
 */
package com.aw.swing.mvp.cmp.pick;

import com.aw.swing.mvp.ui.GradientPanel;
import com.aw.swing.mvp.ui.Separator;
import com.jgoodies.forms.layout.CellConstraints;
import com.jgoodies.forms.layout.FormLayout;

import javax.swing.*;
import java.awt.*;

/**
 * User: Julio Gonzales
 * Date: 14-nov-2007
 */
public class FrmPickDocVenta extends FrmPick {

    protected boolean addSupport = false;
    protected boolean editSupport = false;
    private boolean addCRUDAcciones = false;

    public JPanel pnlMain;
    public JTextField txtSearch;
    public JButton btnSearch;
    public JLabel lblSearch;
    public JPanel footerPanel;
    public Separator sepCriterioBusqueda;
    public JPanel pnlTitGrid;
    public JTable tblGrid;
    public JLabel lblTitGrid;
    public JLabel lblNumRegistros;
    public JLabel lblF10;
    public JLabel lblEsc;
    public JCheckBox chkSel;
    public JTextField txtFecIni;
    public JTextField txtFecFin;
    public JLabel lblFecIni;
    public JLabel lblFecFin;
    public JComboBox cmbEntInm;
    public JLabel lblEntInm;
    public JLabel lblSearch2;
    public JComboBox cmbAlmacen;

    public String title = " ";
    public String description = " ";

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    private void createUIComponents() {
        footerPanel = new GradientPanel();
        pnlTitGrid = new GradientPanel();
        sepCriterioBusqueda = new Separator("Criterio de Bsqueda");
    }

    public boolean isAddSupport() {
        return addSupport;
    }

    public void setAddSupport(boolean addSupport) {
        this.addSupport = addSupport;
    }

    public boolean isEditSupport() {
        return editSupport;
    }

    public void setEditSupport(boolean editSupport) {
        this.editSupport = editSupport;
    }

    public boolean isAddCRUDAcciones() {
        return addCRUDAcciones;
    }

    public void setAddCRUDAcciones(boolean addCRUDAcciones) {
        this.addCRUDAcciones = addCRUDAcciones;
    }

    public JPanel getPnlMain() {
        return pnlMain;
    }

    public void setPnlMain(JPanel pnlMain) {
        this.pnlMain = pnlMain;
    }

    public JTextField getTxtSearch() {
        return txtSearch;
    }

    public void setTxtSearch(JTextField txtSearch) {
        this.txtSearch = txtSearch;
    }

    public JButton getBtnSearch() {
        return btnSearch;
    }

    public void setBtnSearch(JButton btnSearch) {
        this.btnSearch = btnSearch;
    }

    public JLabel getLblSearch() {
        return lblSearch;
    }

    public void setLblSearch(JLabel lblSearch) {
        this.lblSearch = lblSearch;
    }

    public JPanel getFooterPanel() {
        return footerPanel;
    }

    public void setFooterPanel(JPanel footerPanel) {
        this.footerPanel = footerPanel;
    }

    public Separator getSepCriterioBusqueda() {
        return sepCriterioBusqueda;
    }

    public void setSepCriterioBusqueda(Separator sepCriterioBusqueda) {
        this.sepCriterioBusqueda = sepCriterioBusqueda;
    }

    public JPanel getPnlTitGrid() {
        return pnlTitGrid;
    }

    public void setPnlTitGrid(JPanel pnlTitGrid) {
        this.pnlTitGrid = pnlTitGrid;
    }

    public JTable getTblGrid() {
        return tblGrid;
    }

    public void setTblGrid(JTable tblGrid) {
        this.tblGrid = tblGrid;
    }

    public JLabel getLblTitGrid() {
        return lblTitGrid;
    }

    public void setLblTitGrid(JLabel lblTitGrid) {
        this.lblTitGrid = lblTitGrid;
    }

    public JLabel getLblNumRegistros() {
        return lblNumRegistros;
    }

    public void setLblNumRegistros(JLabel lblNumRegistros) {
        this.lblNumRegistros = lblNumRegistros;
    }

    public JLabel getLblF10() {
        return lblF10;
    }

    public void setLblF10(JLabel lblF10) {
        this.lblF10 = lblF10;
    }

    public JLabel getLblEsc() {
        return lblEsc;
    }

    public void setLblEsc(JLabel lblEsc) {
        this.lblEsc = lblEsc;
    }

    public JCheckBox getChkSel() {
        return chkSel;
    }

    public void setChkSel(JCheckBox chkSel) {
        this.chkSel = chkSel;
    }

    {
        // GUI initializer generated by IntelliJ IDEA GUI Designer
        // >>> IMPORTANT!! <<<
        // DO NOT EDIT OR ADD ANY CODE HERE!
        $$$setupUI$$$();
    }

    /**
     * Method generated by IntelliJ IDEA GUI Designer
     * >>> IMPORTANT!! <<<
     * DO NOT edit this method OR call it in your code!
     *
     * @noinspection ALL
     */
    private void $$$setupUI$$$() {
        createUIComponents();
        pnlMain = new JPanel();
        pnlMain.setLayout(new FormLayout(
                "left:25dlu:noGrow,fill:52dlu:noGrow,left:8dlu:noGrow,fill:56dlu:noGrow,left:4dlu:noGrow,fill:36px:noGrow,fill:max(d;4px):noGrow,left:57dlu:noGrow,fill:10px:noGrow,fill:54dlu:noGrow,left:16dlu:noGrow",
                "center:12dlu:noGrow,top:4dlu:noGrow,center:12dlu:noGrow,top:6dlu:noGrow,top:12dlu:noGrow,top:4dlu:noGrow,center:12dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,top:12dlu:noGrow,center:146dlu:noGrow,top:4dlu:noGrow,top:12dlu:noGrow,center:max(d;4dlu):noGrow,center:12dlu:noGrow"));
        pnlMain.setMinimumSize(new Dimension(501, 425));
        pnlMain.setOpaque(true);
        pnlMain.setPreferredSize(new Dimension(501, 425));
        lblSearch = new JLabel();
        lblSearch.setHorizontalAlignment(4);
        lblSearch.setText("Descripcin");
        lblSearch.setDisplayedMnemonic('D');
        lblSearch.setDisplayedMnemonicIndex(0);
        CellConstraints cc = new CellConstraints();
        pnlMain.add(lblSearch, cc.xyw(1, 3, 2, CellConstraints.FILL, CellConstraints.DEFAULT));
        btnSearch = new JButton();
        btnSearch.setText("Buscar");
        btnSearch.setMnemonic('B');
        btnSearch.setDisplayedMnemonicIndex(0);
        pnlMain.add(btnSearch, cc.xy(10, 3));
        footerPanel.setLayout(
                new FormLayout("fill:73dlu:noGrow,left:191dlu:noGrow,fill:48dlu:noGrow", "center:12dlu:noGrow"));
        pnlMain.add(footerPanel, cc.xyw(1, 15, 11, CellConstraints.DEFAULT, CellConstraints.FILL));
        lblF10 = new JLabel();
        lblF10.setText(" [F10] Aceptar");
        footerPanel.add(lblF10, cc.xy(1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
        lblEsc = new JLabel();
        lblEsc.setText(" [Esc] Salir");
        footerPanel.add(lblEsc, cc.xy(3, 1));
        sepCriterioBusqueda.setSeparatorTitle("Criterio de Bsqueda");
        pnlMain.add(sepCriterioBusqueda, cc.xyw(1, 1, 11, CellConstraints.FILL, CellConstraints.FILL));
        pnlTitGrid.setLayout(
                new FormLayout("fill:204dlu:noGrow,left:88dlu:noGrow,fill:15dlu:noGrow", "center:12dlu:noGrow"));
        pnlMain.add(pnlTitGrid, cc.xyw(1, 10, 11, CellConstraints.FILL, CellConstraints.FILL));
        lblTitGrid = new JLabel();
        lblTitGrid.setText(" Relacin :");
        lblTitGrid.setDisplayedMnemonic('R');
        lblTitGrid.setDisplayedMnemonicIndex(1);
        pnlTitGrid.add(lblTitGrid, cc.xy(1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
        chkSel = new JCheckBox();
        chkSel.setBackground(new Color(-16747105));
        chkSel.setText("");
        pnlTitGrid.add(chkSel, cc.xy(3, 1));
        final JScrollPane scrollPane1 = new JScrollPane();
        scrollPane1.setMinimumSize(new Dimension(454, 418));
        pnlMain.add(scrollPane1, cc.xyw(1, 11, 11, CellConstraints.FILL, CellConstraints.FILL));
        tblGrid = new JTable();
        tblGrid.setMinimumSize(new Dimension(450, 400));
        scrollPane1.setViewportView(tblGrid);
        final JLabel label1 = new JLabel();
        label1.setText(" Nmero de Registros:");
        pnlMain.add(label1, cc.xyw(1, 13, 3));
        lblNumRegistros = new JLabel();
        lblNumRegistros.setText("Label");
        pnlMain.add(lblNumRegistros, cc.xyw(4, 13, 6));
        txtSearch = new JTextField();
        pnlMain.add(txtSearch, cc.xyw(4, 3, 5, CellConstraints.FILL, CellConstraints.DEFAULT));
        lblFecIni = new JLabel();
        lblFecIni.setText("Fecha del");
        pnlMain.add(lblFecIni, cc.xy(2, 5, CellConstraints.RIGHT, CellConstraints.CENTER));
        lblFecFin = new JLabel();
        lblFecFin.setText("al");
        pnlMain.add(lblFecFin, cc.xy(6, 5, CellConstraints.RIGHT, CellConstraints.CENTER));
        txtFecIni = new JTextField();
        pnlMain.add(txtFecIni, cc.xy(4, 5, CellConstraints.FILL, CellConstraints.DEFAULT));
        txtFecFin = new JTextField();
        pnlMain.add(txtFecFin, cc.xy(8, 5, CellConstraints.FILL, CellConstraints.DEFAULT));
        lblEntInm = new JLabel();
        lblEntInm.setHorizontalAlignment(4);
        lblEntInm.setText("Entrega Inmediata");
        pnlMain.add(lblEntInm, cc.xyw(1, 7, 2, CellConstraints.FILL, CellConstraints.CENTER));
        cmbEntInm = new JComboBox();
        pnlMain.add(cmbEntInm, cc.xy(4, 7));
        lblSearch.setLabelFor(txtSearch);
        lblFecIni.setLabelFor(txtSearch);
        lblFecFin.setLabelFor(txtSearch);
        lblEntInm.setLabelFor(txtSearch);
    }

    /**
     * @noinspection ALL
     */
    public JComponent $$$getRootComponent$$$() {
        return pnlMain;
    }
}