/* */ package NET.worlds.scape; /* */ /* */ import NET.worlds.console.Console; /* */ import NET.worlds.console.OkCancelDialog; /* */ import java.awt.GridBagConstraints; /* */ import java.awt.List; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public abstract class ListChooserDialog /* */ extends OkCancelDialog /* */ { /* */ private static final long serialVersionUID = 1L; /* 18 */ private List _listField = new List(5, false); /* */ protected EditTile _parent; /* */ /* */ protected ListChooserDialog(EditTile parent, String title) { /* 22 */ super(Console.getFrame(), parent, title); /* 23 */ this._parent = parent; /* */ } /* */ /* */ protected void build() { /* 27 */ GridBagConstraints c = new GridBagConstraints(); /* 28 */ c.weightx = 1.0D; /* 29 */ c.weighty = 1.0D; /* 30 */ c.gridwidth = 0; /* 31 */ c.fill = 1; /* 32 */ add(this.gbag, this._listField, c); /* 33 */ super.build(); /* */ } /* */ /* */ /* */ /* */ /* */ protected abstract String getEntry(int paramInt); /* */ /* */ /* */ /* */ /* */ protected abstract int getSelected(); /* */ /* */ /* */ /* */ /* */ protected abstract boolean setValue(String paramString, int paramInt); /* */ /* */ /* */ /* */ /* */ protected boolean setValue() /* */ { /* 56 */ return setValue(this._listField.getSelectedItem(), this._listField.getSelectedIndex()); /* */ } /* */ /* */ /* */ /* */ public void setVisible(boolean visible) /* */ { /* 63 */ super.setVisible(visible); /* 64 */ if (visible) { /* 65 */ int index = 0; /* 66 */ String entry = getEntry(index); /* 67 */ while (entry != null) { /* 68 */ this._listField.add(entry, index); /* 69 */ entry = getEntry(++index); /* */ } /* 71 */ index = getSelected(); /* 72 */ if (index != -1) /* 73 */ this._listField.select(index); /* 74 */ this._listField.requestFocus(); /* */ } /* */ } /* */ } /* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ListChooserDialog.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */