diff options
| author | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
| commit | e1e781bb2135ef78592226f1a3eaba4925702f1f (patch) | |
| tree | 8a5b590463ed413e1c6eabb719130e701b95ca63 /NET/worlds/console/SavedAvAddDialog.java | |
| download | worlds.jar-main.tar.xz worlds.jar-main.zip | |
Diffstat (limited to 'NET/worlds/console/SavedAvAddDialog.java')
| -rw-r--r-- | NET/worlds/console/SavedAvAddDialog.java | 377 |
1 files changed, 377 insertions, 0 deletions
diff --git a/NET/worlds/console/SavedAvAddDialog.java b/NET/worlds/console/SavedAvAddDialog.java new file mode 100644 index 0000000..d11699f --- /dev/null +++ b/NET/worlds/console/SavedAvAddDialog.java @@ -0,0 +1,377 @@ +/* */ 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; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class SavedAvAddDialog +/* */ extends PolledDialog +/* */ { +/* */ private static final long serialVersionUID = 6413925837010864629L; +/* */ private TextField nameField; +/* */ private Button okButton; +/* */ private Button cancelButton; +/* */ private String newName; +/* 300 */ private static Font font = new Font(Console.message("MenuFont"), +/* 301 */ 0, 12); +/* 302 */ private static Font bfont = new Font(Console.message("ButtonFont"), +/* 303 */ 0, 12); +/* */ +/* */ public SavedAvAddDialog(Window parent, SavedAvPart avatars) { +/* 306 */ super(parent, avatars, Console.message("Save-Avatar"), true); +/* 307 */ this.nameField = new TextField(40); +/* 308 */ this.okButton = new Button(Console.message("OK")); +/* 309 */ this.cancelButton = new Button(Console.message("Cancel")); +/* 310 */ ready(); +/* */ } +/* */ +/* */ protected void build() +/* */ { +/* 315 */ GridBagLayout gbag = new GridBagLayout(); +/* 316 */ setLayout(gbag); +/* 317 */ GridBagConstraints c = new GridBagConstraints(); +/* 318 */ c.fill = 0; +/* 319 */ c.weightx = 1.0D; +/* 320 */ c.weighty = 1.0D; +/* 321 */ c.gridwidth = 2; +/* 322 */ c.gridheight = 1; +/* 323 */ add(gbag, new Label(Console.message("Name")), c); +/* 324 */ c.gridwidth = 0; +/* 325 */ c.fill = 2; +/* 326 */ this.nameField.setFont(font); +/* 327 */ add(gbag, this.nameField, c); +/* 328 */ Panel buttons = new Panel(); +/* 329 */ this.okButton.setFont(bfont); +/* 330 */ this.cancelButton.setFont(bfont); +/* 331 */ buttons.add(this.okButton); +/* 332 */ buttons.add(this.cancelButton); +/* 333 */ c.gridwidth = 0; +/* 334 */ c.fill = 0; +/* 335 */ add(gbag, buttons, c); +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean action(Event event, Object what) +/* */ { +/* 341 */ Object target = event.target; +/* 342 */ if ((target == this.okButton) && (mayConfirm())) +/* 343 */ return done(true); +/* 344 */ if (target == this.cancelButton) +/* 345 */ return done(false); +/* 346 */ return false; +/* */ } +/* */ +/* */ public String getName() +/* */ { +/* 351 */ return this.newName; +/* */ } +/* */ +/* */ private boolean mayConfirm() +/* */ { +/* 356 */ this.newName = this.nameField.getText().trim(); +/* 357 */ return this.newName.length() != 0; +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean keyDown(Event event, int key) +/* */ { +/* 363 */ if (key == 27) +/* 364 */ return done(false); +/* 365 */ if ((key == 10) && +/* 366 */ (mayConfirm())) { +/* 367 */ return done(true); +/* */ } +/* 369 */ return super.keyDown(event, key); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\SavedAvAddDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */
\ No newline at end of file |