/* */ package NET.worlds.console; /* */ /* */ import NET.worlds.core.Std; /* */ import NET.worlds.scape.EditTile; /* */ import NET.worlds.scape.LibrariesTile; /* */ import java.awt.BorderLayout; /* */ import java.awt.CardLayout; /* */ import java.awt.Container; /* */ import java.awt.Event; /* */ import java.awt.Frame; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class GammaFrame /* */ extends Frame /* */ implements DialogDisabled /* */ { /* */ private static final long serialVersionUID = 2725752068161032112L; /* */ private Container consoleTile; /* */ private Tree treeTile; /* */ private EditTile editTile; /* */ private LibrariesTile librariesTile; /* */ private FourTilePanel fourTile; /* */ private boolean isDialogDisabled; /* */ /* */ @Deprecated /* */ public boolean handleEvent(Event e) /* */ { /* 55 */ if (this.isDialogDisabled) { /* 56 */ return false; /* */ } /* 58 */ Console c = Console.getActive(); /* 59 */ if ((c != null) && (c.handleEvent(e))) { /* 60 */ return true; /* */ } /* */ /* 63 */ if (e.id == 201) { /* 64 */ return Console.maybeQuit(); /* */ } /* */ /* 67 */ return super.handleEvent(e); /* */ } /* */ /* */ public static String getDefaultTitle() { /* 71 */ return Std.getProductName(); /* */ } /* */ /* */ /* */ /* */ public GammaFrame() /* */ { /* 78 */ super(getDefaultTitle()); /* */ } /* */ /* */ /* */ /* */ public void setVisible(boolean visible) /* */ { /* 85 */ if (visible) /* */ { /* */ /* 88 */ Gamma.hideSplash(); /* 89 */ Window.allowFGJavaPalette(false); /* */ /* */ /* 92 */ Console cons = Console.getActive(); /* 93 */ if ((cons instanceof DefaultConsole)) { /* 94 */ ((DefaultConsole)cons).setOrthoEnabled(isShaperVisible()); /* */ } /* */ } /* */ /* 98 */ super.setVisible(visible); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ public Container getConsoleTile() /* */ { /* 108 */ makeTiles(); /* 109 */ return this.consoleTile; /* */ } /* */ /* */ public Tree getTreeTile() { /* 113 */ makeTiles(); /* 114 */ return this.treeTile; /* */ } /* */ /* */ public EditTile getEditTile() { /* 118 */ makeTiles(); /* 119 */ return this.editTile; /* */ } /* */ /* */ public LibrariesTile getLibrariesTile() { /* 123 */ makeTiles(); /* 124 */ return this.librariesTile; /* */ } /* */ /* */ private void makeTiles() { /* 128 */ if (this.consoleTile == null) { /* 129 */ if (Gamma.getShaper() == null) { /* 130 */ this.consoleTile = this; /* */ } else { /* 132 */ this.consoleTile = new ExposedPanel(); /* 133 */ this.treeTile = new Tree(); /* */ /* 135 */ this.editTile = new EditTile(this.treeTile); /* */ /* 137 */ this.librariesTile = new LibrariesTile(); /* 138 */ setLayout(new BorderLayout()); /* */ /* 140 */ this.fourTile = new FourTilePanel(this.librariesTile, this.consoleTile, /* 141 */ this.treeTile, this.editTile, 1); /* 142 */ add("Center", this.fourTile); /* */ } /* 144 */ this.consoleTile.setLayout(new CardLayout()); /* */ } /* */ } /* */ /* */ /* */ /* */ /* */ public void setShaperVisible(boolean f) /* */ { /* 153 */ if (Gamma.getShaper() == null) { /* 154 */ return; /* */ } /* 156 */ if (this.fourTile.isOneTileMode() == f) { /* 157 */ if (f) { /* 158 */ this.fourTile.useFourTileMode(); /* */ } else { /* 160 */ this.fourTile.useOneTileMode(); /* */ } /* */ } /* 163 */ Console cons = Console.getActive(); /* 164 */ if ((cons instanceof DefaultConsole)) { /* 165 */ ((DefaultConsole)cons).setOrthoEnabled(f); /* */ } /* */ } /* */ /* */ public boolean isShaperVisible() { /* 170 */ return (Gamma.getShaper() != null) && (this.fourTile != null) && /* 171 */ (!this.fourTile.isOneTileMode()); /* */ } /* */ /* */ public void deactivate() {} /* */ /* */ public void activate() /* */ { /* 178 */ if (!isShowing()) { /* 179 */ new GammaFrameState(this); /* 180 */ setVisible(true); /* */ } /* */ } /* */ /* */ /* */ /* */ /* */ /* */ @Deprecated /* */ public boolean action(Event event, Object what) /* */ { /* 191 */ Console c = Console.getActive(); /* 192 */ if ((c != null) && (c.action(event, what))) { /* 193 */ return true; /* */ } /* 195 */ return super.action(event, what); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ public void dialogDisable(boolean disable) /* */ { /* 205 */ this.isDialogDisabled = disable; /* */ /* */ /* 208 */ Console c = Console.getActive(); /* 209 */ if (c != null) /* 210 */ c.dialogDisable(disable); /* 211 */ if (isShaperVisible()) { /* 212 */ getTreeTile().dialogDisable(disable); /* 213 */ getLibrariesTile().dialogDisable(disable); /* 214 */ getEditTile().dialogDisable(disable); /* */ } /* */ } /* */ } /* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\GammaFrame.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */