summaryrefslogtreecommitdiff
path: root/NET/worlds/console/LogMailDialog.java
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-12 22:33:32 -0800
committerFuwn <[email protected]>2026-02-12 22:33:32 -0800
commitc7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9 (patch)
treedf9f48bf128a6c0186a8e91857d6ff30fe0e9f18 /NET/worlds/console/LogMailDialog.java
downloadworldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.tar.xz
worldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.zip
Initial commit
Diffstat (limited to 'NET/worlds/console/LogMailDialog.java')
-rw-r--r--NET/worlds/console/LogMailDialog.java57
1 files changed, 57 insertions, 0 deletions
diff --git a/NET/worlds/console/LogMailDialog.java b/NET/worlds/console/LogMailDialog.java
new file mode 100644
index 0000000..add5948
--- /dev/null
+++ b/NET/worlds/console/LogMailDialog.java
@@ -0,0 +1,57 @@
+package NET.worlds.console;
+
+import java.awt.GridBagConstraints;
+import java.awt.TextArea;
+
+class LogMailDialog extends OkCancelDialog {
+ private static final long serialVersionUID = -6276776216084519247L;
+ private TextArea commentArea;
+ private String tagString;
+
+ public LogMailDialog(DialogReceiver rcvr, String tag) {
+ super(Console.getFrame(), rcvr, Console.message("Log-Mailer"), Console.message("Dont-Report"), Console.message("Report"), null, false);
+ this.tagString = tag;
+ this.commentArea = new TextArea("", 5, 60, 1);
+ this.commentArea.setEditable(true);
+ this.setConfirmKey(-1);
+ }
+
+ @Override
+ protected void build() {
+ GridBagConstraints c = new GridBagConstraints();
+ if (this.tagString != null) {
+ c.weightx = 1.0;
+ c.weighty = 1.0;
+ c.gridwidth = 0;
+ this.add(this.gbag, new MultiLineLabel(this.tagString, 5, 5), c);
+ }
+
+ c.weightx = 1.0;
+ c.weighty = 1.0;
+ c.gridwidth = 0;
+ this.add(this.gbag, this.commentArea, c);
+ int count = 0;
+ if (this.okButton != null) {
+ count++;
+ }
+
+ if (this.cancelButton != null) {
+ count++;
+ }
+
+ c.gridwidth = count;
+ c.weightx = 1.0;
+ c.weighty = 0.0;
+ if (this.okButton != null) {
+ this.add(this.gbag, this.okButton, c);
+ }
+
+ if (this.cancelButton != null) {
+ this.add(this.gbag, this.cancelButton, c);
+ }
+ }
+
+ public String getComment() {
+ return this.commentArea.getText();
+ }
+}