From: David ‘Bombe’ Roden Date: Sat, 24 May 2008 21:33:02 +0000 (+0200) Subject: initialize base path information label X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=a2bc5cc3fa7c6d2324b1d9297d77eb79a237fb6e;p=jSite2.git initialize base path information label disable button while scanning --- diff --git a/src/net/pterodactylus/jsite/gui/ProjectPanel.java b/src/net/pterodactylus/jsite/gui/ProjectPanel.java index 03f91cc..cf53482 100644 --- a/src/net/pterodactylus/jsite/gui/ProjectPanel.java +++ b/src/net/pterodactylus/jsite/gui/ProjectPanel.java @@ -174,12 +174,12 @@ public class ProjectPanel extends JPanel implements DocumentListener, I18nable { basePathTextField = new JTextField(project.getBasePath()); basePathTextField.setEditable(false); basePathLabel = new I18nLabel("projectPanel.label.basePath"); - basePathInformationLabel = new JLabel(""); + basePathInformationLabel = new JLabel(I18n.get("projectPanel.basePathInformation.fileCount", project.getBasePathEntries().size())); JButton changeBasePathButton = new JButton(changeBasePathAction); propertiesPanel.add(basePathLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(6, 0, 0, 0), 0, 0)); propertiesPanel.add(basePathTextField, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(6, 6, 0, 0), 0, 0)); propertiesPanel.add(changeBasePathButton, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(6, 6, 0, 0), 0, 0)); - propertiesPanel.add(basePathInformationLabel, new GridBagConstraints(1, 3, 2, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(6, 6, 0, 0), 0, 0)); + propertiesPanel.add(basePathInformationLabel, new GridBagConstraints(1, 3, 2, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(0, 6, 0, 0), 0, 0)); propertiesPanel.add(new JPanel(), new GridBagConstraints(0, 4, 3, 1, 1.0, 1.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); @@ -232,6 +232,7 @@ public class ProjectPanel extends JPanel implements DocumentListener, I18nable { basePathTextField.setText(newBasePath); basePathInformationLabel.setText(I18n.get("projectPanel.basePathInformation.scanning")); project.setBasePath(newBasePath); + changeBasePathAction.setEnabled(false); swingInterface.getThreadPool().execute(new Runnable() { /** @@ -242,6 +243,7 @@ public class ProjectPanel extends JPanel implements DocumentListener, I18nable { project.rescanBasePath(); List projectEntries = project.getBasePathEntries(); basePathInformationLabel.setText(I18n.get("projectPanel.basePathInformation.fileCount", projectEntries.size())); + changeBasePathAction.setEnabled(true); } }); }