diff options
author | Stephan Schwaer | 2015-08-03 16:43:29 +0200 |
---|---|---|
committer | Stephan Schwaer | 2015-08-03 16:43:29 +0200 |
commit | aa86c52338a0739d312bed03f5c9076225c474f1 (patch) | |
tree | 7a8e6abb2a57fe3b4a02265e492ac72224d275e4 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java | |
parent | [client] Minor tweaks (diff) | |
download | tutor-module-aa86c52338a0739d312bed03f5c9076225c474f1.tar.gz tutor-module-aa86c52338a0739d312bed03f5c9076225c474f1.tar.xz tutor-module-aa86c52338a0739d312bed03f5c9076225c474f1.zip |
[client] Removed the image details panel and added some info in image details window.
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java | 50 |
1 files changed, 7 insertions, 43 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java index 438e9795..1c21dbe2 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java @@ -1,19 +1,14 @@ package org.openslx.dozmod.gui.window.layout; import java.awt.BorderLayout; -import java.awt.Dimension; import java.awt.Font; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; -import javax.swing.JSplitPane; import javax.swing.JTextField; -import javax.swing.border.TitledBorder; import org.apache.log4j.Logger; import org.openslx.dozmod.gui.control.table.ImageTable; @@ -33,11 +28,10 @@ public abstract class ImageListWindowLayout extends CompositePage { protected final static String downloadButtonLabel = "Download"; protected final static String backButtonLabel = "Zurück"; protected final static String tableGroupLabel = "Images"; - protected final static String vmInfoGroupLabel = "Detailinformationen"; protected final static String filterGroupLabel = "Filter"; // -------------------------------------- - // Left panel: search field, table and buttons + // search field, table and buttons protected JTextField searchTextField; protected ImageTable imageTable; protected JButton newButton; @@ -45,15 +39,7 @@ public abstract class ImageListWindowLayout extends CompositePage { protected JButton downloadButton; protected JButton backButton; - // -------------------------------------- - // Right panel: image details information - protected JTextField imageSelectedNameLabel; - protected JTextField idInfo; - protected JTextField versionInfo; - protected JTextField lastUpdateInfo; - protected JTextField permissionInfo; - protected JTextField ownerInfo; - protected JTextField templateInfo; + public ImageListWindowLayout() { super(new BorderLayout()); @@ -69,7 +55,7 @@ public abstract class ImageListWindowLayout extends CompositePage { add(infoPanel, BorderLayout.NORTH); // -------------------------------------- - // LEFT: List panel with the list of the images + // the panel for the table and search field JPanel listPanel = new JPanel(new BorderLayout()); // the search field searchTextField = new JTextField(); @@ -77,6 +63,9 @@ public abstract class ImageListWindowLayout extends CompositePage { // the actual table imageTable = new ImageTable(); listPanel.add(new JScrollPane(imageTable), BorderLayout.CENTER); + add(listPanel, BorderLayout.CENTER); + + // -------------------------------------- // the buttons at the bottom JPanel buttonPanel = new JPanel(); buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS)); @@ -90,32 +79,7 @@ public abstract class ImageListWindowLayout extends CompositePage { buttonPanel.add(backButton); listPanel.add(buttonPanel, BorderLayout.PAGE_END); - // -------------------------------------- - // RIGHT: Details panel for the selected image - final JPanel detailsPane = new JPanel(); - detailsPane.setLayout(new GridBagLayout()); - detailsPane.setBorder(new TitledBorder(vmInfoGroupLabel)); - detailsPane.setMaximumSize(new Dimension(400, Integer.MAX_VALUE)); - detailsPane.setMinimumSize(new Dimension(350, 0)); - detailsPane.setPreferredSize(detailsPane.getMinimumSize()); - // image name info - int row = 0; - imageSelectedNameLabel = createCaptionAndTextfield("Name", detailsPane, row++); - idInfo = createCaptionAndTextfield("ID", detailsPane, row++); - versionInfo = createCaptionAndTextfield("Version", detailsPane, row++); - lastUpdateInfo = createCaptionAndTextfield("Letztes Update", detailsPane, row++); - permissionInfo = createCaptionAndTextfield("Berechtigungen", detailsPane, row++); - ownerInfo = createCaptionAndTextfield("Besitzer", detailsPane, row++); - templateInfo = createCaptionAndTextfield("Vorlage", detailsPane, row++); - // For some reason without this the controls above are centered vertically - detailsPane.add(new JPanel(), GridPos.get(0, row++, 2, 1, true, true)); - // the actual layout of the whole window - JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); - splitPane.setLeftComponent(listPanel); - splitPane.setRightComponent(detailsPane); - // make the left panel grab the excess space - splitPane.setResizeWeight(1); - add(splitPane); + } public JTextField createCaptionAndTextfield(String captionString, JPanel group, int row) { JLabel caption = new JLabel(captionString); |