Package nu.lazy8.ledger.jdbc

Source Code of nu.lazy8.ledger.jdbc.CompanyDialog

/*
* :tabSize=2:indentSize=2:noTabs=true:
* :folding=explicit:collapseFolds=1:
*
*  Copyright (C) 2009 Chaniel AB, Thomas Dilts This program is free
*  software; you can redistribute it and/or modify it under the terms of the
*  GNU General Public License as published by the Free Software Foundation;
*  either version 2 of the License, or (at your option) any later version. This
*  program is distributed in the hope that it will be useful, but WITHOUT ANY
*  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
*  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
*  details. You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software Foundation,
*  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA For more
*  information, surf to www.lazy8.nu or email support@lazy8.nu
*/
package nu.lazy8.ledger.jdbc;
//{{{ imports
import java.awt.GridLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import nu.lazy8.ledger.forms.CompanyComponents;
import nu.lazy8.util.gen.Translator;
//}}}

/**
*  Description of the Class
*
* @author     thomas
* @created    den 2 juli 2004
*/
public class CompanyDialog extends JDialog {
  public boolean bIsCancel = false;
  public CompanyComponents cc;

  //{{{ +CompanyDialog(javax.swing.JFrame, String) : <init>
  /**
   *  Constructor for the CompanyDialog object
   *
   * @param  frame  Description of the Parameter
   * @param  sText  Description of the Parameter
   */
  public CompanyDialog(javax.swing.JFrame frame, String sText) {
    super(frame, "", true);

    getContentPane().setLayout(new GridLayout(1, 1));
    JPanel jp1 = new JPanel();
    jp1.setLayout(new GridLayout(4, 2));
    getContentPane().add(jp1);
    jp1.add(new JPanel());
    jp1.add(new JPanel());
    cc = new CompanyComponents(jp1, sText, true, "", null);
    jp1.add(new JPanel());
    jp1.add(new JPanel());

    JButton button3 = new JButton(Translator.getTranslation("OK"));
    button3.addActionListener(
      new java.awt.event.ActionListener() {
        //{{{ +actionPerformed(java.awt.event.ActionEvent) : void
        public void actionPerformed(java.awt.event.ActionEvent evt) {
          buttonOK();
        }//}}}
      }
        );
    jp1.add(button3);
    JButton button4 = new JButton(Translator.getTranslation("Cancel"));
    button4.addActionListener(
      new java.awt.event.ActionListener() {
        //{{{ +actionPerformed(java.awt.event.ActionEvent) : void
        public void actionPerformed(java.awt.event.ActionEvent evt) {
          buttonCancel();
        }//}}}
      }
        );
    jp1.add(button4);

    pack();
    setLocationRelativeTo(frame);
    setVisible(true);
  }//}}}

  //{{{ +buttonCancel() : void
  /**
   *  Description of the Method
   */
  public void buttonCancel() {
    bIsCancel = true;
    setVisible(false);
  }//}}}

  //{{{ +buttonOK() : void
  /**
   *  Description of the Method
   */
  public void buttonOK() {
    bIsCancel = false;
    setVisible(false);
  }//}}}
}


TOP

Related Classes of nu.lazy8.ledger.jdbc.CompanyDialog

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.