summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/util/ContainerUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/util/ContainerUtils.java')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/util/ContainerUtils.java28
1 files changed, 27 insertions, 1 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/util/ContainerUtils.java b/dozentenmodul/src/main/java/org/openslx/dozmod/util/ContainerUtils.java
index 571b9c44..3d65ea5d 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/util/ContainerUtils.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/util/ContainerUtils.java
@@ -10,6 +10,7 @@ import org.kamranzafar.jtar.TarInputStream;
import org.openslx.bwlp.thrift.iface.ImageSummaryRead;
import org.openslx.bwlp.thrift.iface.LectureSummary;
import org.openslx.dozmod.gui.Gui;
+import org.openslx.dozmod.gui.helper.GridManager;
import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.gui.helper.MessageType;
import org.openslx.dozmod.model.ContainerDefinition;
@@ -18,7 +19,7 @@ import org.openslx.thrifthelper.TConst;
import org.openslx.thrifthelper.ThriftManager;
import org.openslx.util.ThriftUtil;
-
+import javax.swing.*;
import java.awt.*;
import java.io.*;
import java.nio.ByteBuffer;
@@ -143,4 +144,29 @@ public class ContainerUtils {
}
return isValid;
}
+
+ public static JPanel createDownloadContainerInfo(String imageRepo, String infoText) {
+ JPanel pnlUserInfo = new JPanel();
+ GridManager grid = new GridManager(pnlUserInfo, 1, true);
+
+ JTextArea txtInfoText = new JTextArea();
+ txtInfoText.setBorder(BorderFactory.createTitledBorder(
+ I18n.PAGE_LAYOUT.getString("Info")));
+ txtInfoText.setLineWrap(true);
+ txtInfoText.setWrapStyleWord(true);
+ txtInfoText.setEditable(false);
+ txtInfoText.setFocusable(false);
+ txtInfoText.setOpaque(false);
+ txtInfoText.setText(infoText);
+ grid.add(txtInfoText).fill(true,true);
+ grid.nextRow();
+
+ JTextField txtUserInfo = new JTextField();
+ txtUserInfo.setText(imageRepo);
+ grid.add(txtUserInfo).fill(true,true);
+ grid.finish(true);
+
+ return pnlUserInfo;
+ }
+
}