diff options
Diffstat (limited to 'NET/worlds/console/BootDialog.java')
| -rw-r--r-- | NET/worlds/console/BootDialog.java | 139 |
1 files changed, 139 insertions, 0 deletions
diff --git a/NET/worlds/console/BootDialog.java b/NET/worlds/console/BootDialog.java new file mode 100644 index 0000000..d7d967d --- /dev/null +++ b/NET/worlds/console/BootDialog.java @@ -0,0 +1,139 @@ +/* */ package NET.worlds.console; +/* */ +/* */ import java.awt.Button; +/* */ import java.awt.Event; +/* */ import java.awt.Font; +/* */ import java.awt.GridBagConstraints; +/* */ import java.awt.GridBagLayout; +/* */ import java.awt.Label; +/* */ import java.awt.Panel; +/* */ import java.awt.TextField; +/* */ import java.awt.Window; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class BootDialog +/* */ extends PolledDialog +/* */ { +/* */ private static final long serialVersionUID = -4574101262059937239L; +/* 34 */ private Label bootLabel = new Label(Console.message("User-to-Boot")); +/* 35 */ private Button okButton = new Button(Console.message("OK")); +/* 36 */ private Button cancelButton = new Button(Console.message("Cancel")); +/* 37 */ private static Font font = new Font(Console.message("MenuFont"), +/* 38 */ 0, 12); +/* 39 */ private static Font bfont = new Font(Console.message("ButtonFont"), +/* 40 */ 0, 12); +/* */ +/* */ +/* */ +/* */ private TextField bootField; +/* */ +/* */ +/* */ +/* */ +/* */ public BootDialog(Window parent, DialogReceiver receiver, String title) +/* */ { +/* 51 */ super(parent, receiver, title, true); +/* */ +/* 53 */ this.bootField = new TextField(""); +/* */ +/* 55 */ ready(); +/* */ } +/* */ +/* */ public String getBoot() +/* */ { +/* 60 */ return this.bootField.getText(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void build() +/* */ { +/* 69 */ GridBagLayout gbag = new GridBagLayout(); +/* 70 */ setLayout(gbag); +/* 71 */ GridBagConstraints c = new GridBagConstraints(); +/* 72 */ c.weightx = 1.0D; +/* 73 */ c.weighty = 1.0D; +/* 74 */ c.gridheight = 1; +/* 75 */ c.fill = 0; +/* */ +/* 77 */ c.gridwidth = 2; +/* 78 */ add(gbag, this.bootLabel, c); +/* 79 */ c.gridwidth = 0; +/* 80 */ c.fill = 2; +/* 81 */ this.bootField.setFont(font); +/* 82 */ add(gbag, this.bootField, c); +/* */ +/* 84 */ Panel buttons = new Panel(); +/* 85 */ this.okButton.setFont(bfont); +/* 86 */ buttons.add(this.okButton); +/* 87 */ this.cancelButton.setFont(bfont); +/* 88 */ buttons.add(this.cancelButton); +/* 89 */ c.gridwidth = 0; +/* 90 */ c.fill = 0; +/* 91 */ add(gbag, buttons, c); +/* */ } +/* */ +/* */ +/* */ +/* */ public void setVisible(boolean visible) +/* */ { +/* 98 */ if (visible) { +/* 99 */ initialSize(320, 140); +/* 100 */ super.setVisible(visible); +/* 101 */ this.bootField.requestFocus(); +/* */ } else { +/* 103 */ super.setVisible(visible); +/* */ } +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean handleEvent(Event event) +/* */ { +/* 110 */ if (event.id == 201) +/* 111 */ return done(false); +/* 112 */ return super.handleEvent(event); +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean action(Event event, Object what) +/* */ { +/* 118 */ Object target = event.target; +/* 119 */ if (target == this.cancelButton) { +/* 120 */ done(false); +/* 121 */ } else if (target == this.okButton) +/* 122 */ done(true); +/* 123 */ return false; +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean keyDown(Event event, int key) +/* */ { +/* 129 */ if (key == 27) +/* 130 */ return done(false); +/* 131 */ return super.keyDown(event, key); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\BootDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */
\ No newline at end of file |