[Squirrel-sql-commits] sql12/plugins/postgres/src/net/sourceforge/squirrel_sql/plugins/postgres/gui
A Java SQL client for any JDBC compliant database
Brought to you by:
colbell,
gerdwagner
From: Rob M. <man...@us...> - 2008-11-17 04:21:14
|
Update of /cvsroot/squirrel-sql/sql12/plugins/postgres/src/net/sourceforge/squirrel_sql/plugins/postgres/gui In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9441/plugins/postgres/src/net/sourceforge/squirrel_sql/plugins/postgres/gui Modified Files: VacuumDatabaseDialog.java Log Message: removed dead code. Index: VacuumDatabaseDialog.java =================================================================== RCS file: /cvsroot/squirrel-sql/sql12/plugins/postgres/src/net/sourceforge/squirrel_sql/plugins/postgres/gui/VacuumDatabaseDialog.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** VacuumDatabaseDialog.java 29 Dec 2007 15:13:41 -0000 1.1 --- VacuumDatabaseDialog.java 17 Nov 2008 04:21:08 -0000 1.2 *************** *** 1,3 **** --- 1,4 ---- package net.sourceforge.squirrel_sql.plugins.postgres.gui; + /* * Copyright (C) 2007 Daniel Regli & Yannick Winiger *************** *** 19,108 **** */ ! import net.sourceforge.squirrel_sql.fw.sql.ITableInfo; import net.sourceforge.squirrel_sql.fw.util.StringManager; import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory; ! import javax.swing.*; ! import java.awt.*; ! public class VacuumDatabaseDialog extends AbstractPostgresDialog { ! /** Name of the database/catalog. */ ! protected String _catalogName; ! /** Some GUI elements */ ! protected JCheckBox _fullCheckBox; ! protected JCheckBox _analyzeCheckBox; ! /** Internationalized strings for this class */ ! private static final StringManager s_stringMgr = StringManagerFactory.getStringManager(VacuumDatabaseDialog.class); ! static interface i18n { ! String TITLE = s_stringMgr.getString("VacuumDatabaseDialog.title"); ! String CATALOG_LABEL = s_stringMgr.getString("VacuumDatabaseDialog.catalogLabel"); ! String FULL_LABEL = s_stringMgr.getString("VacuumDatabaseDialog.fullLabel"); ! String FULL_TOOLTIP = s_stringMgr.getString("VacuumDatabaseDialog.fullTooltip"); ! String ANALYZE_LABEL = s_stringMgr.getString("VacuumDatabaseDialog.analyzeLabel"); ! String ANALYZE_TOOLTIP = s_stringMgr.getString("VacuumDatabaseDialog.analyzeTooltip"); ! } ! public VacuumDatabaseDialog(String catalogName) { ! _catalogName = catalogName; ! setTitle(VacuumDatabaseDialog.i18n.TITLE); ! init(); ! } ! protected void init() { ! defaultInit(); ! // Catalog ! JLabel catalogLabel = getBorderedLabel(VacuumDatabaseDialog.i18n.CATALOG_LABEL + " ", _emptyBorder); ! _panel.add(catalogLabel, getLabelConstraints(_gbc)); ! JTextField catalogTextField = getSizedTextField(_mediumField); ! catalogTextField.setEditable(false); ! if (_catalogName != null) catalogTextField.setText(_catalogName); ! _panel.add(catalogTextField, getFieldConstraints(_gbc)); ! // Options: ! // FULL Checkbox ! JLabel fullLabel = new JLabel(VacuumDatabaseDialog.i18n.FULL_LABEL); ! fullLabel.setBorder(_emptyBorder); ! _panel.add(fullLabel, getLabelConstraints(_gbc)); ! _fullCheckBox = new JCheckBox(); ! _fullCheckBox.setToolTipText(VacuumDatabaseDialog.i18n.FULL_TOOLTIP); ! _fullCheckBox.setPreferredSize(_mediumField); ! _panel.add(_fullCheckBox, getFieldConstraints(_gbc)); ! // ANALYZE Checkbox ! JLabel analyzeLabel = new JLabel(VacuumDatabaseDialog.i18n.ANALYZE_LABEL); ! analyzeLabel.setBorder(_emptyBorder); ! _panel.add(analyzeLabel, getLabelConstraints(_gbc)); ! _analyzeCheckBox = new JCheckBox(); ! _analyzeCheckBox.setToolTipText(VacuumDatabaseDialog.i18n.ANALYZE_TOOLTIP); ! _analyzeCheckBox.setPreferredSize(_mediumField); ! _panel.add(_analyzeCheckBox, getFieldConstraints(_gbc)); ! } ! private String[] getSimpleNames(ITableInfo[] infos) { ! String[] result = new String[infos.length]; ! for (int i = 0; i < result.length; i++) { ! result[i] = infos[i].getSimpleName(); ! } ! return result; ! } ! public boolean getFullOption() { ! return _fullCheckBox.isSelected(); ! } ! public boolean getAnalyzeOption() { ! return _analyzeCheckBox.isSelected(); ! } } --- 20,112 ---- */ ! import javax.swing.JCheckBox; ! import javax.swing.JLabel; ! import javax.swing.JTextField; ! import net.sourceforge.squirrel_sql.fw.util.StringManager; import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory; ! public class VacuumDatabaseDialog extends AbstractPostgresDialog ! { ! private static final long serialVersionUID = 1L; ! /** Name of the database/catalog. */ ! protected String _catalogName; ! /** Some GUI elements */ ! protected JCheckBox _fullCheckBox; ! protected JCheckBox _analyzeCheckBox; + /** Internationalized strings for this class */ + private static final StringManager s_stringMgr = + StringManagerFactory.getStringManager(VacuumDatabaseDialog.class); ! static interface i18n ! { ! String TITLE = s_stringMgr.getString("VacuumDatabaseDialog.title"); + String CATALOG_LABEL = s_stringMgr.getString("VacuumDatabaseDialog.catalogLabel"); ! String FULL_LABEL = s_stringMgr.getString("VacuumDatabaseDialog.fullLabel"); ! String FULL_TOOLTIP = s_stringMgr.getString("VacuumDatabaseDialog.fullTooltip"); ! String ANALYZE_LABEL = s_stringMgr.getString("VacuumDatabaseDialog.analyzeLabel"); ! String ANALYZE_TOOLTIP = s_stringMgr.getString("VacuumDatabaseDialog.analyzeTooltip"); ! } ! public VacuumDatabaseDialog(String catalogName) ! { ! _catalogName = catalogName; ! setTitle(VacuumDatabaseDialog.i18n.TITLE); ! init(); ! } ! protected void init() ! { ! defaultInit(); ! // Catalog ! JLabel catalogLabel = getBorderedLabel(VacuumDatabaseDialog.i18n.CATALOG_LABEL + " ", _emptyBorder); ! _panel.add(catalogLabel, getLabelConstraints(_gbc)); + JTextField catalogTextField = getSizedTextField(_mediumField); + catalogTextField.setEditable(false); + if (_catalogName != null) catalogTextField.setText(_catalogName); + _panel.add(catalogTextField, getFieldConstraints(_gbc)); ! // Options: ! // FULL Checkbox ! JLabel fullLabel = new JLabel(VacuumDatabaseDialog.i18n.FULL_LABEL); ! fullLabel.setBorder(_emptyBorder); ! _panel.add(fullLabel, getLabelConstraints(_gbc)); + _fullCheckBox = new JCheckBox(); + _fullCheckBox.setToolTipText(VacuumDatabaseDialog.i18n.FULL_TOOLTIP); + _fullCheckBox.setPreferredSize(_mediumField); + _panel.add(_fullCheckBox, getFieldConstraints(_gbc)); ! // ANALYZE Checkbox ! JLabel analyzeLabel = new JLabel(VacuumDatabaseDialog.i18n.ANALYZE_LABEL); ! analyzeLabel.setBorder(_emptyBorder); ! _panel.add(analyzeLabel, getLabelConstraints(_gbc)); + _analyzeCheckBox = new JCheckBox(); + _analyzeCheckBox.setToolTipText(VacuumDatabaseDialog.i18n.ANALYZE_TOOLTIP); + _analyzeCheckBox.setPreferredSize(_mediumField); + _panel.add(_analyzeCheckBox, getFieldConstraints(_gbc)); + } ! public boolean getFullOption() ! { ! return _fullCheckBox.isSelected(); ! } ! ! public boolean getAnalyzeOption() ! { ! return _analyzeCheckBox.isSelected(); ! } } |