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(); } }