From c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 12 Feb 2026 22:33:32 -0800 Subject: Initial commit --- NET/worlds/console/LogMailDialog.java | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 NET/worlds/console/LogMailDialog.java (limited to 'NET/worlds/console/LogMailDialog.java') 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(); + } +} -- cgit v1.2.3