X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fde%2Ftodesbaum%2Fjsite%2Fgui%2FProjectFilesPage.java;h=b5f4a26f6012332b81117c3ed0c1d8c1acd3456a;hb=d049d7bcbe92a886786296496daa3e478d21b98e;hp=872650a8b6b202c488515eaed2ee05a1dfbbd339;hpb=51eada955ac2bb96649d95421704cbbefb639ba3;p=jSite.git diff --git a/src/de/todesbaum/jsite/gui/ProjectFilesPage.java b/src/de/todesbaum/jsite/gui/ProjectFilesPage.java index 872650a..b5f4a26 100644 --- a/src/de/todesbaum/jsite/gui/ProjectFilesPage.java +++ b/src/de/todesbaum/jsite/gui/ProjectFilesPage.java @@ -74,7 +74,7 @@ import de.todesbaum.util.swing.TWizardPage; /** * Wizard page that lets the user manage the files of a project. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class ProjectFilesPage extends TWizardPage implements ActionListener, ListSelectionListener, DocumentListener, FileScannerListener, ChangeListener { @@ -123,7 +123,7 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis /** * Creates a new project file page. - * + * * @param wizard * The wizard the page belongs to */ @@ -214,7 +214,7 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis /** * Creates the panel contains the project file list and options. - * + * * @return The created panel */ private JComponent createProjectFilesPanel() { @@ -267,6 +267,7 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis fileOptionsMIMETypeComboBox.setToolTipText(I18n.getMessage("jsite.project-files.mime-type.tooltip")); fileOptionsMIMETypeComboBox.setName("project-files.mime-type"); fileOptionsMIMETypeComboBox.addActionListener(this); + fileOptionsMIMETypeComboBox.setEditable(true); fileOptionsMIMETypeComboBox.setEnabled(false); final TLabel mimeTypeLabel = new TLabel(I18n.getMessage("jsite.project-files.mime-type") + ":", KeyEvent.VK_M, fileOptionsMIMETypeComboBox); @@ -279,13 +280,21 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis fileOptionsContainerComboBox.setName("project-files.container"); fileOptionsContainerComboBox.addActionListener(this); fileOptionsContainerComboBox.setEnabled(false); + fileOptionsContainerComboBox.setVisible(false); final TLabel containerLabel = new TLabel(I18n.getMessage("jsite.project-files.container") + ":", KeyEvent.VK_C, fileOptionsContainerComboBox); + containerLabel.setVisible(false); + JButton addContainerButton = new JButton(addContainerAction); + addContainerButton.setVisible(false); + JButton editContainerButton = new JButton(editContainerAction); + editContainerButton.setVisible(false); + JButton deleteContainerButton = new JButton(deleteContainerAction); + deleteContainerButton.setVisible(false); fileOptionsPanel.add(containerLabel, new GridBagConstraints(0, 6, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(6, 18, 0, 0), 0, 0)); fileOptionsPanel.add(fileOptionsContainerComboBox, new GridBagConstraints(1, 6, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(6, 6, 0, 0), 0, 0)); - fileOptionsPanel.add(new JButton(addContainerAction), new GridBagConstraints(2, 6, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(6, 6, 0, 0), 0, 0)); - fileOptionsPanel.add(new JButton(editContainerAction), new GridBagConstraints(3, 6, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(6, 6, 0, 0), 0, 0)); - fileOptionsPanel.add(new JButton(deleteContainerAction), new GridBagConstraints(4, 6, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(6, 6, 0, 0), 0, 0)); + fileOptionsPanel.add(addContainerButton, new GridBagConstraints(2, 6, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(6, 6, 0, 0), 0, 0)); + fileOptionsPanel.add(editContainerButton, new GridBagConstraints(3, 6, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(6, 6, 0, 0), 0, 0)); + fileOptionsPanel.add(deleteContainerButton, new GridBagConstraints(4, 6, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(6, 6, 0, 0), 0, 0)); JPanel fileOptionsReplacementPanel = new JPanel(new FlowLayout(FlowLayout.LEADING, 6, 6)); fileOptionsReplacementPanel.setBorder(new EmptyBorder(-6, -6, -6, -6)); @@ -335,7 +344,7 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis /** * Sets the project whose files to manage. - * + * * @param project * The project whose files to manage */ @@ -354,7 +363,7 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis /** * Returns a list of all project files. - * + * * @return All project files */ private List getProjectFiles() { @@ -610,7 +619,7 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis /** * Updates the options of the currently selected file with the changes made * in the “custom key” textfield. - * + * * @param documentEvent * The document event to process */