/* */ package quicktime.app.display;
/* */
/* */ import java.awt.Dimension;
/* */ import java.awt.Frame;
/* */ import java.awt.Insets;
/* */ import java.awt.Window;
/* */ import java.security.AccessController;
/* */ import java.security.PrivilegedAction;
/* */ import quicktime.QTException;
/* */ import quicktime.QTRuntimeException;
/* */ import quicktime.QTSession;
/* */ import quicktime.qd.GDevice;
/* */ import quicktime.qd.QDRect;
/* */ import quicktime.std.movies.FullScreen;
/* */
/* */ /** @deprecated */
/* */ public class FullScreenWindow extends Window
/* */ {
/* 36 */ private static Frame fr = null;
/* */ private FullScreen fs;
/* */ private int w;
/* */ private int h;
/* */ private int f;
/* */ private GDevice gd;
/* */
/* */ /** @deprecated */
/* 88 */ protected boolean doNotify = false;
/* */
/* */ private static Frame _getFrame()
/* */ {
/* 39 */ if (fr == null)
/* 40 */ fr = new Frame();
/* 41 */ return fr;
/* */ }
/* */
/* */ /** @deprecated */
/* */ public FullScreenWindow()
/* */ throws QTException
/* */ {
/* 51 */ this(new FullScreen());
/* */ }
/* */
/* */ /** @deprecated */
/* */ public FullScreenWindow(FullScreen paramFullScreen)
/* */ throws QTException
/* */ {
/* 61 */ this(paramFullScreen, _getFrame());
/* */ }
/* */
/* */ /** @deprecated */
/* */ public FullScreenWindow(FullScreen paramFullScreen, Frame paramFrame)
/* */ throws QTException
/* */ {
/* 72 */ super(paramFrame);
/* 73 */ this.fs = paramFullScreen;
/* */ }
/* */
/* */ /** @deprecated */
/* */ public FullScreen getFullScreen()
/* */ {
/* 102 */ return this.fs;
/* */ }
/* */
/* */ /** @deprecated */
/* */ public Dimension getPreferredSize()
/* */ {
/* */ try
/* */ {
/* 115 */ if ((this.w == 0) || (this.h == 0)) {
/* 116 */ Dimension localDimension = this.fs.preflightSize(this.gd, this.w, this.h);
/* 117 */ this.w = localDimension.width;
/* 118 */ this.h = localDimension.height;
/* */ }
/* */ } catch (QTException localQTException) {
/* */ }
/* 122 */ return new Dimension(this.w, this.h);
/* */ }
/* */
/* */ /** @deprecated */
/* */ public void setPreferredSize(int paramInt1, int paramInt2)
/* */ {
/* 139 */ this.w = paramInt1;
/* 140 */ this.h = paramInt2;
/* */ }
/* */
/* */ /** @deprecated */
/* */ public int getFlags()
/* */ {
/* 148 */ return this.f;
/* */ }
/* */
/* */ /** @deprecated */
/* */ public void setFlags(int paramInt)
/* */ {
/* 155 */ this.f = paramInt;
/* */ }
/* */
/* */ /** @deprecated */
/* */ public void setGDevice(GDevice paramGDevice)
/* */ {
/* 162 */ this.gd = paramGDevice;
/* */ }
/* */
/* */ /** @deprecated */
/* */ public GDevice getGDevice()
/* */ {
/* 169 */ return this.gd;
/* */ }
/* */
/* */ /** @deprecated */
/* */ public void show()
/* */ {
/* 189 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4))) {
/* 190 */ this.doNotify = true;
/* 191 */ pack();
/* */ try { Thread.sleep(100L); } catch (InterruptedException localInterruptedException) {
/* */ }
/* */ }
/* */ try { Dimension localDimension = this.fs.begin(this.gd, this.w, this.h, this.f);
/* 196 */ setSize(localDimension);
/* 197 */ this.w = localDimension.width;
/* 198 */ this.h = localDimension.height;
/* */ Object localObject;
/* 200 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* */ {
/* 202 */ localObject = (GDevice)AccessController.doPrivileged(new PrivilegedAction() {
/* */ public Object run() {
/* 204 */ return GDevice.getMain();
/* */ }
/* */ });
/* 209 */ if ((this.gd != null) && (!this.gd.equals(localObject))) {
/* 210 */ QDRect localQDRect = this.gd.getBounds();
/* 211 */ if (QTSession.isCurrentOS(4))
/* 212 */ setLocation(localQDRect.getX(), localQDRect.getY() + -22);
/* */ else
/* 214 */ setLocation(localQDRect.getX() + -5, localQDRect.getY() + -20);
/* */ }
/* 216 */ else if (QTSession.isCurrentOS(4)) {
/* 217 */ setLocation(0, -44);
/* */ } else {
/* 219 */ setLocation(-5, -40);
/* */ }
/* */ }
/* */ else {
/* 223 */ if (this.gd != null) {
/* 224 */ localObject = this.gd.getBounds();
/* 225 */ setLocation(((QDRect)localObject).getX(), ((QDRect)localObject).getY());
/* */ } else {
/* 227 */ setLocation(0, 0);
/* */ }
/* 229 */ this.doNotify = true;
/* 230 */ pack();
/* */ }
/* */
/* 233 */ super.show();
/* 234 */ if (QTSession.isCurrentOS(4))
/* 235 */ requestFocus();
/* 236 */ toFront();
/* */ } catch (QTException localQTException)
/* */ {
/* 239 */ QTRuntimeException.handleOrThrow(new QTRuntimeException(localQTException), this.fs, "begin");
/* */ }
/* */ }
/* */
/* */ /** @deprecated */
/* */ public void hide()
/* */ {
/* 249 */ this.doNotify = false;
/* */ try {
/* 251 */ this.fs.end();
/* */ } catch (QTException localQTException) {
/* 253 */ QTRuntimeException.handleOrThrow(new QTRuntimeException(localQTException), this.fs, "end");
/* */ } finally {
/* 255 */ super.hide();
/* */
/* 257 */ if (QTSession.isCurrentOS(1)) {
/* */ try { Thread.sleep(100L); } catch (InterruptedException localInterruptedException3) {
/* 259 */ }QTM.access$000();
/* */ }
/* */ }
/* */ }
/* */
/* */ /** @deprecated */
/* */ public void addNotify()
/* */ {
/* 272 */ if (this.doNotify)
/* 273 */ super.addNotify();
/* */ }
/* */
/* */ /** @deprecated */
/* */ public void pack()
/* */ {
/* 283 */ if (this.doNotify)
/* 284 */ super.pack();
/* */ }
/* */
/* */ /** @deprecated */
/* */ public Insets getInsets()
/* */ {
/* 293 */ return new Insets(0, 0, 0, 0);
/* */ }
/* */
/* */ static
/* */ {
/* 31 */ if ((QTSession.isCurrentOS(4)) && (QTSession.getJavaVersion() >= 65540))
/* 32 */ throw new QTRuntimeException("Unsupported on Mac OS X and Java 1.4 and higher.");
/* */ }
/* */
/* */ private static final class QTM
/* */ {
/* */ private static native void DrawMenuBar();
/* */ }
/* */ }
/* Location: Z:\System\Library\Java\Extensions\QTJava.zip
* Qualified Name: quicktime.app.display.FullScreenWindow
* JD-Core Version: 0.6.2
*/