PageRenderTime 82ms CodeModel.GetById 40ms app.highlight 6ms RepoModel.GetById 35ms app.codeStats 0ms

/src/mpv5/ui/frames/MPCalculator2.java

http://mp-rechnungs-und-kundenverwaltung.googlecode.com/
Java | 100 lines | 47 code | 16 blank | 37 comment | 2 complexity | 633aa5a1c86edf3a1b0fef0546d9b7a8 MD5 | raw file
  1/*
  2 *  This file is part of YaBS.
  3 *
  4 *      YaBS is free software: you can redistribute it and/or modify
  5 *      it under the terms of the GNU General Public License as published by
  6 *      the Free Software Foundation, either version 3 of the License, or
  7 *      (at your option) any later version.
  8 *
  9 *      YaBS is distributed in the hope that it will be useful,
 10 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 11 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 12 *      GNU General Public License for more details.
 13 *
 14 *      You should have received a copy of the GNU General Public License
 15 *      along with YaBS.  If not, see <http://www.gnu.org/licenses/>.
 16 */
 17/*
 18 * MPCalculator2.java
 19 *
 20 * Created on 12.02.2009, 14:30:32
 21 */
 22package mpv5.ui.frames;
 23
 24import java.awt.BorderLayout;
 25import mpv5.ui.misc.Position;
 26import mpv5.ui.misc.Calc;
 27
 28/**
 29 *
 30 *  
 31 */
 32public class MPCalculator2 extends javax.swing.JFrame {
 33
 34    private static MPCalculator2 calc;
 35    private static final long serialVersionUID = 1L;
 36
 37    /** Creates new form MPCalculator2 */
 38    private MPCalculator2() {
 39        initComponents();
 40        jPanel1.add(new Calc(), BorderLayout.CENTER);
 41        setSize(340, 300);
 42        setResizable(false);
 43        new Position(this);
 44    }
 45
 46    public static MPCalculator2 instanceOf() {
 47        if (calc == null) {
 48            calc = new MPCalculator2();
 49        }
 50        calc.setVisible(true);
 51        return calc;
 52    }
 53
 54    /**
 55     *
 56     */
 57    @Override
 58    public void dispose() {
 59        setVisible(false);
 60
 61    }
 62
 63    /** This method is called from within the constructor to
 64     * initialize the form.
 65     * WARNING: Do NOT modify this code. The content of this method is
 66     * always regenerated by the Form Editor.
 67     */
 68    @SuppressWarnings("unchecked")
 69    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
 70    private void initComponents() {
 71
 72        jPanel1 = new javax.swing.JPanel();
 73
 74        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
 75        setTitle("Yabs Calc");
 76        setName("Form"); // NOI18N
 77
 78        jPanel1.setName("jPanel1"); // NOI18N
 79        jPanel1.setLayout(new java.awt.BorderLayout());
 80
 81        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
 82        getContentPane().setLayout(layout);
 83        layout.setHorizontalGroup(
 84            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 85            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 277, Short.MAX_VALUE)
 86        );
 87        layout.setVerticalGroup(
 88            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 89            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE)
 90        );
 91
 92        pack();
 93    }// </editor-fold>//GEN-END:initComponents
 94
 95
 96
 97    // Variables declaration - do not modify//GEN-BEGIN:variables
 98    private javax.swing.JPanel jPanel1;
 99    // End of variables declaration//GEN-END:variables
100}