diff options
| author | Fuwn <[email protected]> | 2026-02-12 22:33:32 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-12 22:33:32 -0800 |
| commit | c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9 (patch) | |
| tree | df9f48bf128a6c0186a8e91857d6ff30fe0e9f18 /NET/worlds/console/LogMailDialog.java | |
| download | worldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.tar.xz worldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.zip | |
Initial commit
Diffstat (limited to 'NET/worlds/console/LogMailDialog.java')
| -rw-r--r-- | NET/worlds/console/LogMailDialog.java | 57 |
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(); + } +} |