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/GammaFrame.java | |
| download | worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.tar.xz worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.zip | |
Diffstat (limited to 'NET/worlds/console/GammaFrame.java')
| -rw-r--r-- | NET/worlds/console/GammaFrame.java | 223 |
1 files changed, 223 insertions, 0 deletions
diff --git a/NET/worlds/console/GammaFrame.java b/NET/worlds/console/GammaFrame.java new file mode 100644 index 0000000..b1b8479 --- /dev/null +++ b/NET/worlds/console/GammaFrame.java @@ -0,0 +1,223 @@ +/* */ 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 + */
\ No newline at end of file |