[Schmitzm-commits] r890 - in trunk/src/schmitzm/swing: . resource/locales
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jun 3 14:11:03 CEST 2010
Author: mojays
Date: 2010-06-03 14:11:01 +0200 (Thu, 03 Jun 2010)
New Revision: 890
Modified:
trunk/src/schmitzm/swing/ResourceProviderManagerFrame.java
trunk/src/schmitzm/swing/resource/locales/SwingResourceBundle.properties
trunk/src/schmitzm/swing/resource/locales/SwingResourceBundle_de.properties
Log:
ResourceProviderManagerFrame extended with "Open folder" button.
Modified: trunk/src/schmitzm/swing/ResourceProviderManagerFrame.java
===================================================================
--- trunk/src/schmitzm/swing/ResourceProviderManagerFrame.java 2010-06-03 11:16:04 UTC (rev 889)
+++ trunk/src/schmitzm/swing/ResourceProviderManagerFrame.java 2010-06-03 12:11:01 UTC (rev 890)
@@ -64,11 +64,12 @@
* @version 1.0
*/
public class ResourceProviderManagerFrame extends JDialog implements ActionListener {
- private JLabel infoText = null; // use JLabel to interpret HTML
- private JButton cancelButton = null;
- private JButton newLangButton = null;
- private JTable bundleTable = null;
- private JPanel controlPanel = null;
+ private JLabel infoText = null; // use JLabel to interpret HTML
+ private JButton cancelButton = null;
+ private JButton newLangButton = null;
+ private JButton openFolderButton = null;
+ private JTable bundleTable = null;
+ private JPanel controlPanel = null;
private SelectionInputOption newLangDialog_LangDesc = null;
private ManualInputOption newLangDialog_LangCode = null;
@@ -96,6 +97,7 @@
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
initGUI(infoText);
+ setRootPath(null);
initNewLanguageDialog();
}
catch(Exception e) {
@@ -140,11 +142,14 @@
cancelButton.addActionListener(this);
newLangButton = new JButton(getResource("NewLang"));
newLangButton.addActionListener(this);
+ openFolderButton = new JButton(SwingUtil.R("OpenFolder"));
+ openFolderButton.addActionListener(this);
controlPanel = new JPanel();
controlPanel.setLayout( new FlowLayout(FlowLayout.CENTER) );
controlPanel.add( cancelButton );
controlPanel.add( newLangButton );
+ controlPanel.add( openFolderButton );
if ( infoText != null )
this.getContentPane().add(infoText, BorderLayout.NORTH);
@@ -163,6 +168,7 @@
*/
public void setRootPath(File rootPath) {
this.rootPath = rootPath;
+ openFolderButton.setEnabled( rootPath != null );
}
/**
@@ -301,6 +307,8 @@
cancel();
if (e.getSource() == newLangButton)
createNewLanguage();
+ if (e.getSource() == openFolderButton)
+ SwingUtil.openOSFolder(getRootPath());
}
/**
Modified: trunk/src/schmitzm/swing/resource/locales/SwingResourceBundle.properties
===================================================================
--- trunk/src/schmitzm/swing/resource/locales/SwingResourceBundle.properties 2010-06-03 11:16:04 UTC (rev 889)
+++ trunk/src/schmitzm/swing/resource/locales/SwingResourceBundle.properties 2010-06-03 12:11:01 UTC (rev 890)
@@ -63,6 +63,7 @@
Apply=Apply
Ready=Ready
Open=Open
+OpenFolder=Open folder
Close=Close
Save=Save
WaitMess=Please wait...
Modified: trunk/src/schmitzm/swing/resource/locales/SwingResourceBundle_de.properties
===================================================================
--- trunk/src/schmitzm/swing/resource/locales/SwingResourceBundle_de.properties 2010-06-03 11:16:04 UTC (rev 889)
+++ trunk/src/schmitzm/swing/resource/locales/SwingResourceBundle_de.properties 2010-06-03 12:11:01 UTC (rev 890)
@@ -62,6 +62,7 @@
Apply=\u00DCbernehmen
Ready=Fertig
Open=\u00D6ffnen
+OpenFolder=Ordner öffnen
Close=Schliessen
Save=Speichern
WaitMess=Bitte warten...
More information about the Schmitzm-commits
mailing list