From 0347aab6d7792820022b523deb6bc974745c386b Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 1 Dec 2007 12:14:39 +0000 Subject: [PATCH] start new projects with edition 1 add a scrollpane around the project list --- src/de/todesbaum/jsite/gui/ProjectPage.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/de/todesbaum/jsite/gui/ProjectPage.java b/src/de/todesbaum/jsite/gui/ProjectPage.java index 9f5c969..dcef26a 100644 --- a/src/de/todesbaum/jsite/gui/ProjectPage.java +++ b/src/de/todesbaum/jsite/gui/ProjectPage.java @@ -47,6 +47,7 @@ import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextField; import javax.swing.ListSelectionModel; +import javax.swing.ScrollPaneConstants; import javax.swing.border.EmptyBorder; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; @@ -81,6 +82,7 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D private JFileChooser pathChooser; private SortedListModel projectListModel; + private JScrollPane projectScrollPane; private JList projectList; private JTextField projectNameTextField; private JTextField projectDescriptionTextField; @@ -115,7 +117,7 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D projectList.addListSelectionListener(this); projectList.setPreferredSize(new Dimension(150, projectList.getPreferredSize().height)); - add(new JScrollPane(projectList), BorderLayout.LINE_START); + add(projectScrollPane = new JScrollPane(projectList), BorderLayout.LINE_START); add(createInformationPanel(), BorderLayout.CENTER); } @@ -397,8 +399,10 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D newProject.setName(I18n.getMessage("jsite.project.new-project.name")); newProject.setInsertURI(keyPair[0]); newProject.setRequestURI(keyPair[1]); - newProject.setEdition(1); + newProject.setEdition(0); projectListModel.add(newProject); + projectScrollPane.revalidate(); + projectScrollPane.repaint(); projectList.setSelectedIndex(projectListModel.size() - 1); } -- 2.7.4