/* */ package NET.worlds.scape; /* */ /* */ import NET.worlds.console.Console; /* */ import NET.worlds.console.OkCancelDialog; /* */ import java.awt.Font; /* */ import java.awt.GridBagConstraints; /* */ import java.awt.TextField; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public abstract class FieldEditorDialog /* */ extends OkCancelDialog /* */ { /* */ private static final long serialVersionUID = 1L; /* 23 */ private TextField strField = new TextField(40); /* */ /* */ protected EditTile parent; /* 26 */ private static Font font = new Font(Console.message("GammaTextFont"), 0, 12); /* */ /* */ protected FieldEditorDialog(EditTile parent, String title) { /* 29 */ super(Console.getFrame(), parent, title); /* 30 */ this.parent = parent; /* */ } /* */ /* */ protected void build() { /* 34 */ GridBagConstraints c = new GridBagConstraints(); /* 35 */ c.fill = 2; /* 36 */ c.weightx = 1.0D; /* 37 */ c.weighty = 1.0D; /* 38 */ c.gridwidth = 0; /* 39 */ this.strField.setFont(font); /* 40 */ add(this.gbag, this.strField, c); /* 41 */ super.build(); /* */ } /* */ /* */ protected abstract String getValue(); /* */ /* */ protected abstract boolean setValue(String paramString); /* */ /* */ protected boolean setValue() { /* 49 */ return setValue(this.strField.getText().trim()); /* */ } /* */ /* */ /* */ /* */ public void setVisible(boolean visible) /* */ { /* 56 */ super.setVisible(visible); /* 57 */ if (visible) { /* 58 */ this.strField.setText(getValue()); /* 59 */ this.strField.requestFocus(); /* 60 */ this.strField.selectAll(); /* */ } /* */ } /* */ } /* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\FieldEditorDialog.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */