added terminal title

This commit is contained in:
hneemann 2016-12-13 13:49:10 +01:00
parent 41f055fc2e
commit eadc8950f3

View File

@ -21,13 +21,21 @@ public class TerminalDialog extends JDialog {
private final int width;
private int pos;
private static String getDialogTitle(ElementAttributes attr) {
String t = attr.getCleanLabel();
if (t.length() > 0) return t;
return Lang.get("elem_Terminal");
}
/**
* Creates a new instance
*
* @param attr the terminals attributes
*/
public TerminalDialog(ElementAttributes attr) {
super((JFrame) null, attr.getLabel(), false);
super((JFrame) null, getDialogTitle(attr), false);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setAlwaysOnTop(true);
width = attr.get(Keys.TERM_WIDTH);