Mercurial > hg > ltpda
view src/MPipeline2/src/mpipeline/ltpdapreferences/LTPDAPrefsGui.java @ 9:fbbfcd56e449 database-connection-manager
Remove dead code
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Mon, 05 Dec 2011 16:20:06 +0100 |
parents | f0afece42f48 |
children | 03d92954b939 |
line wrap: on
line source
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * LTPDAPrefsGui.java * * Created on Aug 14, 2010, 12:00:59 PM */ package mpipeline.ltpdapreferences; import java.awt.BorderLayout; import java.util.Observable; import java.util.Observer; import java.util.logging.Level; import java.util.logging.Logger; /** * * @author hewitson */ public class LTPDAPrefsGui extends javax.swing.JDialog { private LTPDAPreferences prefs; private LTPDAPrefsTabPane prefsTabPane; /** Creates new form LTPDAPrefsGui */ public LTPDAPrefsGui(java.awt.Frame parent, boolean modal, LTPDAPreferences prefs) { super(parent, modal); this.prefs = prefs; initComponents(); // Add preferences tab prefsTabPane = new LTPDAPrefsTabPane(this.prefs); prefsTabPane.validate(); // prefsTabPane.setSize(this.getPreferredSize()); this.mainPanel.setLayout(new BorderLayout()); this.mainPanel.add(prefsTabPane); this.pack(); // this.prefs.addObserver(this); } public void addAvailableWindow(String win) { prefsTabPane.addAvailableWindow(win); } public LTPDAPrefsTabPane getPrefsTabPane() { return prefsTabPane; } public LTPDAPreferences getPrefs() { return prefs; } public void setPrefs(LTPDAPreferences prefs) { this.prefs = prefs; } @Override protected void finalize() throws Throwable { // System.err.println("finalise"); // prefs = null; super.finalize(); } /** 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(); jPanel2 = new javax.swing.JPanel(); doneBtn = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("LTPDA Preferences"); setLocationByPlatform(true); setResizable(false); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { formWindowClosing(evt); } }); mainPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); org.jdesktop.layout.GroupLayout mainPanelLayout = new org.jdesktop.layout.GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(0, 632, Short.MAX_VALUE) ); mainPanelLayout.setVerticalGroup( mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(0, 411, Short.MAX_VALUE) ); jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder()); doneBtn.setText("Done"); doneBtn.setToolTipText("Close without applying the preferences."); doneBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { doneBtnActionPerformed(evt); } }); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup() .addContainerGap(538, Short.MAX_VALUE) .add(doneBtn) .addContainerGap()) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .addContainerGap() .add(doneBtn) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(mainPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .add(mainPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(18, 18, 18) .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) ); pack(); }// </editor-fold>//GEN-END:initComponents private void doneBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_doneBtnActionPerformed prefs.writeToDisk(); // this.dispose(); this.formWindowClosing(null); }//GEN-LAST:event_doneBtnActionPerformed private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing // System.err.println("Form closing"); this.dispose(); try { // TODO add your handling code here: this.finalize(); } catch (Throwable ex) { Logger.getLogger(LTPDAPrefsGui.class.getName()).log(Level.SEVERE, null, ex); } }//GEN-LAST:event_formWindowClosing // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton doneBtn; private javax.swing.JPanel jPanel2; private javax.swing.JPanel mainPanel; // End of variables declaration//GEN-END:variables // public void update(Observable o, Object arg) { // } }