summaryrefslogtreecommitdiff
path: root/NET/worlds/console/GammaFrame.java
blob: b1b8479ef46bef76dae864ea47b6082f6f7c443c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
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
 */