jfxrt

lean bool3 = (val$modifiers & 0x4) != 0;
          boolean bool4 = (val$modifiers & 0x8) != 0;
          KeyEvent localKeyEvent = KeyEvent.impl_keyEvent(null, str1, str2, val$key, bool1, bool2, bool3, bool4, AbstractEvents.keyIDToFXEventType(val$type));
          this$0.sceneListener.keyEvent(localKeyEvent);
        }
        return null;
      }
    }, this$0.getAccessControlContext());
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.EmbeddedScene.4
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

import com.sun.javafx.cursor.CursorFrame;
import com.sun.javafx.embed.AbstractEvents;
import com.sun.javafx.embed.EmbeddedSceneDragStartListenerInterface;
import com.sun.javafx.embed.EmbeddedSceneDropTargetInterface;
import com.sun.javafx.embed.EmbeddedSceneInterface;
import com.sun.javafx.embed.HostInterface;
import com.sun.javafx.scene.traversal.Direction;
import com.sun.javafx.sg.PGNode;
import com.sun.javafx.sg.prism.NGNode;
import com.sun.javafx.tk.TKSceneListener;
import com.sun.javafx.tk.Toolkit;
import com.sun.prism.impl.PrismSettings;
import com.sun.prism.render.ToolkitInterface;
import java.io.PrintStream;
import java.nio.IntBuffer;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import javafx.application.Platform;
import javafx.event.EventType;
import javafx.scene.input.Dragboard;
import javafx.scene.input.KeyEvent;
import javafx.scene.input.MouseEvent;
import javafx.scene.input.ScrollEvent;

public class EmbeddedScene
  extends GlassScene
  implements EmbeddedSceneInterface
{
  private AbstractPainter painter;
  private PaintRenderJob paintRenderJob;
  protected Lock sizeLock = new ReentrantLock();
  protected IntBuffer textureBits;
  protected HostInterface host;
  protected boolean needsReset = true;
  protected int width;
  protected int height;
  private final EmbeddedSceneDnD dndDelegate = new EmbeddedSceneDnD(this);
  
  public EmbeddedScene(HostInterface paramHostInterface)
  {
    this(paramHostInterface, false);
  }
  
  public EmbeddedScene(HostInterface paramHostInterface, boolean paramBoolean)
  {
    super(PrismSettings.verbose, paramBoolean);
    host = paramHostInterface;
    host.setEmbeddedScene(this);
    PaintCollector localPaintCollector = PaintCollector.getInstance();
    painter = new EmbeddedPainter(this);
    paintRenderJob = new PaintRenderJob(this, localPaintCollector.getRendered(), (Runnable)painter);
  }
  
  protected boolean isSynchronous()
  {
    return false;
  }
  
  public void setRoot(PGNode paramPGNode)
  {
    super.setRoot(paramPGNode);
    painter.setRoot((NGNode)paramPGNode);
  }
  
  public void markDirty()
  {
    super.markDirty();
    host.repaint();
  }
  
  public Dragboard createDragboard()
  {
    return dndDelegate.createDragboard();
  }
  
  public void enableInputMethodEvents(boolean paramBoolean)
  {
    if (verbose) {
      System.err.println("EmbeddedScene.enableInputMethodEvents " + paramBoolean);
    }
  }
  
  void stageVisible(boolean paramBoolean)
  {
    if (!paramBoolean)
    {
      host.setEmbeddedScene(null);
      host = null;
    }
    super.stageVisible(paramBoolean);
  }
  
  public void repaint()
  {
    Toolkit localToolkit = Toolkit.getToolkit();
    ToolkitInterface localToolkitInterface = (ToolkitInterface)localToolkit;
    localToolkitInterface.addRenderJob(paintRenderJob);
  }
  
  public boolean traverseOut(Direction paramDirection)
  {
    if (paramDirection == Direction.NEXT) {
      return host.traverseFocusOut(true);
    }
    if (paramDirection == Direction.PREVIOUS) {
      return host.traverseFocusOut(false);
    }
    return false;
  }
  
  public void setSize(final int paramInt1, final int paramInt2)
  {
    sizeLock.lock();
    try
    {
      width = paramInt1;
      height = paramInt2;
      needsReset = true;
    }
    finally
    {
      sizeLock.unlock();
    }
    Platform.runLater(new Runnable()
    {
      public void run()
      {
        AccessController.doPrivileged(new PrivilegedAction()
        {
          public Void run()
          {
            if (sceneListener != null) {
              sceneListener.changedSize(val$width, val$height);
            }
            return null;
          }
        }, getAccessControlContext());
      }
    });
    entireSceneNeedsRepaint();
  }
  
  public boolean getPixels(IntBuffer paramIntBuffer, int paramInt1, int paramInt2)
  {
    sizeLock.lock();
    try
    {
      if ((textureBits == null) || (needsReset) || (width != paramInt1) || (height != paramInt2))
      {
        bool = false;
        return bool;
      }
      paramIntBuffer.rewind();
      textureBits.rewind();
      paramIntBuffer.put(textureBits);
      boolean bool = true;
      return bool;
    }
    finally
    {
      sizeLock.unlock();
    }
  }
  
  public void mouseEvent(final int paramInt1, final int paramInt2, final boolean paramBoolean1, final boolean paramBoolean2, final boolean paramBoolean3, final int paramInt3, final int paramInt4, final int paramInt5, final int paramInt6, final int paramInt7, final boolean paramBoolean4, final boolean paramBoolean5, final boolean paramBoolean6, final boolean paramBoolean7, final int paramInt8, final boolean paramBoolean8)
  {
    Platform.runLater(new Runnable()
    {
      public void run()
      {
        AccessController.doPrivileged(new PrivilegedAction()
        {
          public Void run()
          {
            if (sceneListener != null)
            {
              EventType localEventType = AbstractEvents.mouseIDToFXEventID(val$type);
              if (localEventType == ScrollEvent.SCROLL)
              {
                sceneListener.scrollEvent(ScrollEvent.SCROLL, 0.0D, -val$wheelRotation, 0.0D, 0.0D, 40.0D, 40.0D, 0, 0, 0, 0, 0, val$x, val$y, val$xAbs, val$yAbs, val$shift, val$ctrl, val$alt, val$meta, false, false);
              }
              else
              {
                MouseEvent localMouseEvent = MouseEvent.impl_mouseEvent(val$x, val$y, val$xAbs, val$yAbs, AbstractEvents.mouseButtonToFXMouseButton(val$button), val$clickCount, val$shift, val$ctrl, val$alt, val$meta, val$popupTrigger, val$primaryBtnDown, val$middleBtnDown, val$secondaryBtnDown, false, localEventType);
                sceneListener.mouseEvent(localMouseEvent);
              }
            }
            return null;
          }
        }, getAccessControlContext());
      }
    });
  }
  
  public void menuEvent(final int paramInt1, final int paramInt2, final int paramInt3, final int paramInt4, final boolean paramBoolean)
  {
    Platform.runLater(new Runnable()
    {
      public void run()
      {
        AccessController.doPrivileged(new PrivilegedAction()
        {
          public Void run()
          {
            if (sceneListener != null) {
              sceneListener.menuEvent(val$x, val$y, val$xAbs, val$yAbs, val$isKeyboardTrigger);
            }
            return null;
          }
        }, getAccessControlContext());
      }
    });
  }
  
  public void keyEvent(final int paramInt1, final int paramInt2, final char[] paramArrayOfChar, final int paramInt3)
  {
    Platform.runLater(new Runnable()
    {
      public void run()
      {
        AccessController.doPrivileged(new PrivilegedAction()
        {
          public Void run()
          {
            if (sceneListener != null)
            {
              String str1 = val$type == 2 ? new String(val$ch) : Character.toString((char)val$key);
              String str2 = new String(val$ch);
              boolean bool1 = (val$modifiers & 0x1) != 0;
              boolean bool2 = (val$modifiers & 0x2) != 0;
              boolean bool3 = (val$modifiers & 0x4) != 0;
              boolean bool4 = (val$modifiers & 0x8) != 0;
              KeyEvent localKeyEvent = KeyEvent.impl_keyEvent(null, str1, str2, val$key, bool1, bool2, bool3, bool4, AbstractEvents.keyIDToFXEventType(val$type));
              sceneListener.keyEvent(localKeyEvent);
            }
            return null;
          }
        }, getAccessControlContext());
      }
    });
  }
  
  public void setCursor(Object paramObject)
  {
    super.setCursor(paramObject);
    host.setCursor((CursorFrame)paramObject);
  }
  
  public void setDragStartListener(EmbeddedSceneDragStartListenerInterface paramEmbeddedSceneDragStartListenerInterface)
  {
    dndDelegate.setDragStartListener(paramEmbeddedSceneDragStartListenerInterface);
  }
  
  public EmbeddedSceneDropTargetInterface createDropTarget()
  {
    return dndDelegate.createDropTarget();
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.EmbeddedScene
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

import com.sun.javafx.embed.EmbeddedSceneDropTargetInterface;
import java.util.concurrent.Callable;

class EmbeddedSceneDnD$1
  implements Callable<EmbeddedSceneDropTargetInterface>
{
  EmbeddedSceneDnD$1(EmbeddedSceneDnD paramEmbeddedSceneDnD) {}
  
  public EmbeddedSceneDropTargetInterface call()
  {
    EmbeddedSceneDnD.access$002(this$0, new EmbeddedSceneDropTarget(this$0, EmbeddedSceneDnD.access$100(this$0)));
    return EmbeddedSceneDnD.access$000(this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.EmbeddedSceneDnD.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

import com.sun.glass.ui.ClipboardAssistance;
import com.sun.javafx.embed.EmbeddedSceneDragSourceInterface;
import javafx.application.Platform;

class EmbeddedSceneDnD$ClipboardAssistanceImpl
  extends ClipboardAssistance
{
  final EmbeddedSceneDragSourceInterface source;
  
  private boolean isValid()
  {
    assert (Platform.isFxApplicationThread());
    assert (EmbeddedSceneDnD.access$200(this$0) == this);
    return true;
  }
  
  EmbeddedSceneDnD$ClipboardAssistanceImpl(EmbeddedSceneDnD paramEmbeddedSceneDnD, EmbeddedSceneDragSourceInterface paramEmbeddedSceneDragSourceInterface)
  {
    super("DND-Embedded");
    source = paramEmbeddedSceneDragSourceInterface;
  }
  
  public void flush()
  {
    assert (isValid());
    super.flush();
    EmbeddedSceneDnD.access$300(this$0);
    FxEventLoop.enterNestedLoop();
  }
  
  public void emptyCache()
  {
    assert (isValid());
    super.emptyCache();
  }
  
  public Object getData(String paramString)
  {
    assert (isValid());
    if (source == null) {
      return super.getData(paramString);
    }
    return source.getData(paramString);
  }
  
  public void setData(String paramString, Object paramObject)
  {
    assert (isValid());
    if (source != null) {
      return;
    }
    super.setData(paramString, paramObject);
  }
  
  public void setSupportedActions(int paramInt)
  {
    assert (isValid());
    if (source != null) {
      return;
    }
    super.setSupportedActions(paramInt);
  }
  
  public int getSupportedSourceActions()
  {
    assert (isValid());
    if (source == null) {
      return super.getSupportedSourceActions();
    }
    return QuantumClipboard.transferModesToClipboardActions(source.getSupportedActions());
  }
  
  public void setTargetAction(int paramInt)
  {
    assert (isValid());
    throw new UnsupportedOperationException();
  }
  
  public String[] getMimeTypes()
  {
    assert (isValid());
    if (source == null) {
      return super.getMimeTypes();
    }
    return source.getMimeTypes();
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.EmbeddedSceneDnD.ClipboardAssistanceImpl
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

import com.sun.glass.ui.ClipboardAssistance;
import com.sun.javafx.embed.EmbeddedSceneDragSourceInterface;
import com.sun.javafx.embed.EmbeddedSceneDragStartListenerInterface;
import com.sun.javafx.embed.EmbeddedSceneDropTargetInterface;
import java.util.concurrent.Callable;
import javafx.application.Platform;
import javafx.scene.input.Dragboard;
import javafx.scene.input.TransferMode;

final class EmbeddedSceneDnD
{
  private final GlassSceneDnDEventHandler dndHandler;
  private EmbeddedSceneDragStartListenerInterface dragStartListener;
  private EmbeddedSceneDragSourceInterface fxDragSource;
  private EmbeddedSceneDropTargetInterface fxDropTarget;
  private ClipboardAssistance clipboardAssistant;
  private Thread hostThread;
  
  public EmbeddedSceneDnD(GlassScene paramGlassScene)
  {
    dndHandler = new GlassSceneDnDEventHandler(paramGlassScene, null);
  }
  
  private void startDrag()
  {
    assert (Platform.isFxApplicationThread());
    assert (fxDragSource == null);
    fxDragSource = new EmbeddedSceneDragSource(this, dndHandler);
    TransferMode localTransferMode = TransferMode.COPY;
    dragStartListener.dragStarted(fxDragSource, localTransferMode);
  }
  
  private void setHostThread()
  {
    if (hostThread == null) {
      hostThread = Thread.currentThread();
    }
  }
  
  public boolean isHostThread()
  {
    return Thread.currentThread() == hostThread;
  }
  
  public boolean isValid(EmbeddedSceneDragSourceInterface paramEmbeddedSceneDragSourceInterface)
  {
    assert (Platform.isFxApplicationThread());
    assert (paramEmbeddedSceneDragSourceInterface != null);
    assert (fxDragSource == paramEmbeddedSceneDragSourceInterface);
    assert (clipboardAssistant != null);
    return true;
  }
  
  public boolean isValid(EmbeddedSceneDropTargetInterface paramEmbeddedSceneDropTargetInterface)
  {
    assert (Platform.isFxApplicationThread());
    assert (paramEmbeddedSceneDropTargetInterface != null);
    assert (fxDropTarget == paramEmbeddedSceneDropTargetInterface);
    return true;
  }
  
  public boolean isFxDragSource()
  {
    assert (Platform.isFxApplicationThread());
    return fxDragSource != null;
  }
  
  public void onDragSourceReleased(EmbeddedSceneDragSourceInterface paramEmbeddedSceneDragSourceInterface)
  {
    assert (isValid(paramEmbeddedSceneDragSourceInterface));
    fxDragSource = null;
    clipboardAssistant = null;
    FxEventLoop.leaveNestedLoop();
  }
  
  public void onDropTargetReleased(EmbeddedSceneDropTargetInterface paramEmbeddedSceneDropTargetInterface)
  {
    assert (isValid(paramEmbeddedSceneDropTargetInterface));
    fxDropTarget = null;
    if (!isFxDragSource()) {
      clipboardAssistant = null;
    }
  }
  
  public Dragboard createDragboard()
  {
    assert (Platform.isFxApplicationThread());
    assert (fxDropTarget == null);
    assert (clipboardAssistant == null);
    assert (fxDragSource == null);
    clipboardAssistant = new ClipboardAssistanceImpl(null);
    return GlassSceneDnDEventHandler.createDragboard(clipboardAssistant);
  }
  
  public void setDragStartListener(EmbeddedSceneDragStartListenerInterface paramEmbeddedSceneDragStartListenerInterface)
  {
    setHostThread();
    assert (isHostThread());
    dragStartListener = paramEmbeddedSceneDragStartListenerInterface;
  }
  
  public EmbeddedSceneDropTargetInterface createDropTarget()
  {
    setHostThread();
    assert (isHostThread());
    assert (fxDropTarget == null);
    (EmbeddedSceneDropTargetInterface)FxEventLoop.sendEvent(new Callable()
    {
      public EmbeddedSceneDropTargetInterface call()
      {
        fxDropTarget = new EmbeddedSceneDropTarget(EmbeddedSceneDnD.this, dndHandler);
        return fxDropTarget;
      }
    });
  }
  
  public ClipboardAssistance getClipboardAssistance(EmbeddedSceneDragSourceInterface paramEmbeddedSceneDragSourceInterface)
  {
    assert (Platform.isFxApplicationThread());
    assert ((!isFxDragSource()) || (isValid(paramEmbeddedSceneDragSourceInterface)));
    assert ((!isFxDragSource()) || (clipboardAssistant != null));
    if (clipboardAssistant == null) {
      clipboardAssistant = new ClipboardAssistanceImpl(paramEmbeddedSceneDragSourceInterface);
    }
    return clipboardAssistant;
  }
  
  private class ClipboardAssistanceImpl
    extends ClipboardAssistance
  {
    final EmbeddedSceneDragSourceInterface source;
    
    private boolean isValid()
    {
      assert (Platform.isFxApplicationThread());
      assert (clipboardAssistant == this);
      return true;
    }
    
    ClipboardAssistanceImpl(EmbeddedSceneDragSourceInterface paramEmbeddedSceneDragSourceInterface)
    {
      super();
      source = paramEmbeddedSceneDragSourceInterface;
    }
    
    public void flush()
    {
      assert (isValid());
      super.flush();
      EmbeddedSceneDnD.this.startDrag();
      FxEventLoop.enterNestedLoop();
    }
    
    public void emptyCache()
    {
      assert (isValid());
      super.emptyCache();
    }
    
    public Object getData(String paramString)
    {
      assert (isValid());
      if (source == null) {
        return super.getData(paramString);
      }
      return source.getData(paramString);
    }
    
    public void setData(String paramString, Object paramObject)
    {
      assert (isValid());
      if (source != null) {
        return;
      }
      super.setData(paramString, paramObject);
    }
    
    public void setSupportedActions(int paramInt)
    {
      assert (isValid());
      if (source != null) {
        return;
      }
      super.setSupportedActions(paramInt);
    }
    
    public int getSupportedSourceActions()
    {
      assert (isValid());
      if (source == null) {
        return super.getSupportedSourceActions();
      }
      return QuantumClipboard.transferModesToClipboardActions(source.getSupportedActions());
    }
    
    public void setTargetAction(int paramInt)
    {
      assert (isValid());
      throw new UnsupportedOperationException();
    }
    
    public String[] getMimeTypes()
    {
      assert (isValid());
      if (source == null) {
        return super.getMimeTypes();
      }
      return source.getMimeTypes();
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.EmbeddedSceneDnD
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

import com.sun.glass.ui.ClipboardAssistance;
import java.util.Set;
import java.util.concurrent.Callable;
import javafx.scene.input.TransferMode;

class EmbeddedSceneDragSource$1
  implements Callable<Set<TransferMode>>
{
  EmbeddedSceneDragSource$1(EmbeddedSceneDragSource paramEmbeddedSceneDragSource) {}
  
  public Set<TransferMode> call()
  {
    return QuantumClipboard.clipboardActionsToTransferModes(EmbeddedSceneDragSource.access$000(this$0).getSupportedSourceActions());
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.EmbeddedSceneDragSource.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

import com.sun.glass.ui.ClipboardAssistance;
import java.util.concurrent.Callable;

class EmbeddedSceneDragSource$2
  implements Callable
{
  EmbeddedSceneDragSource$2(EmbeddedSceneDragSource paramEmbeddedSceneDragSource, String paramString) {}
  
  public Object call()
  {
    return EmbeddedSceneDragSource.access$000(this$0).getData(val$mimeType);
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.EmbeddedSceneDragSource.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

import com.sun.glass.ui.ClipboardAssistance;
import java.util.concurrent.Callable;

class EmbeddedSceneDragSource$3
  implements Callable<String[]>
{
  EmbeddedSceneDragSource$3(EmbeddedSceneDragSource paramEmbeddedSceneDragSource) {}
  
  public String[] call()
  {
    return EmbeddedSceneDragSource.access$000(this$0).getMimeTypes();
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.EmbeddedSceneDragSource.3
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

import com.sun.glass.ui.ClipboardAssistance;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.Callable;

class EmbeddedSceneDragSource$4
  implements Callable<Boolean>
{
  EmbeddedSceneDragSource$4(EmbeddedSceneDragSource paramEmbeddedSceneDragSource, String paramString) {}
  
  public Boolean call()
  {
    return Boolean.valueOf(Arrays.asList(EmbeddedSceneDragSource.access$000(this$0).getMimeTypes()).contains(val$mimeType));
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.EmbeddedSceneDragSource.4
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

import javafx.scene.input.TransferMode;

class EmbeddedSceneDragSource$5
  implements Runnable
{
  EmbeddedSceneDragSource$5(EmbeddedSceneDragSource paramEmbeddedSceneDragSource, TransferMode paramTransferMode) {}
  
  public void run()
  {
    try
    {
      EmbeddedSceneDragSource.access$100(this$0).handleDragEnd(val$performedAction, EmbeddedSceneDragSource.access$000(this$0));
    }
    finally
    {
      EmbeddedSceneDragSource.access$200(this$0).onDragSourceReleased(this$0);
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.EmbeddedSceneDragSource.5
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

import com.sun.glass.ui.ClipboardAssistance;
import com.sun.javafx.embed.EmbeddedSceneDragSourceInterface;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.concurrent.Callable;
import javafx.scene.input.TransferMode;

final class EmbeddedSceneDragSource
  implements EmbeddedSceneDragSourceInterface
{
  private final EmbeddedSceneDnD dnd;
  private final GlassSceneDnDEventHandler dndHandler;
  
  public EmbeddedSceneDragSource(EmbeddedSceneDnD paramEmbeddedSceneDnD, GlassSceneDnDEventHandler paramGlassSceneDnDEventHandler)
  {
    dnd = paramEmbeddedSceneDnD;
    dndHandler = paramGlassSceneDnDEventHandler;
  }
  
  private ClipboardAssistance getClipboardAssistance()
  {
    assert (dnd.isValid(this));
    return dnd.getClipboardAssistance(this);
  }
  
  public Set<TransferMode> getSupportedActions()
  {
    assert (dnd.isHostThread());
    (Set)FxEventLoop.sendEvent(new Callable()
    {
      public Set<TransferMode> call()
      {
        return QuantumClipboard.clipboardActionsToTransferModes(EmbeddedSceneDragSource.this.getClipboardAssistance().getSupportedSourceActions());
      }
    });
  }
  
  public Object getData(final String paramString)
  {
    assert (dnd.isHostThread());
    FxEventLoop.sendEvent(new Callable()
    {
      public Object call()
      {
        return EmbeddedSceneDragSource.this.getClipboardAssistance().getData(paramString);
      }
    });
  }
  
  public String[] getMimeTypes()
  {
    assert (dnd.isHostThread());
    (String[])FxEventLoop.sendEvent(new Callable()
    {
      public String[] call()
      {
        return EmbeddedSceneDragSource.this.getClipboardAssistance().getMimeTypes();
      }
    });
  }
  
  public boolean isMimeTypeAvailable(final String paramString)
  {
    assert (dnd.isHostThread());
    ((Boolean)FxEventLoop.sendEvent(new Callable()
    {
      public Boolean call()
      {
        return Boolean.valueOf(Arrays.asList(EmbeddedSceneDragSource.this.getClipboardAssistance().getMimeTypes()).contains(paramString));
      }
    })).booleanValue();
  }
  
  public void dragDropEnd(final TransferMode paramTransferMode)
  {
    assert (dnd.isHostThread());
    FxEventLoop.sendEvent(new Runnable()
    {
      public void run()
      {
        try
        {
          dndHandler.handleDragEnd(paramTransferMode, EmbeddedSceneDragSource.this.getClipboardAssistance());
        }
        finally
        {
          dnd.onDragSourceReleased(EmbeddedSceneDragSource.this);
        }
      }
    });
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.EmbeddedSceneDragSource
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

import com.sun.javafx.embed.EmbeddedSceneDragSourceInterface;
import java.util.concurrent.Callable;
import javafx.scene.input.TransferMode;

class EmbeddedSceneDropTarget$1
  implements Callable<TransferMode>
{
  EmbeddedSceneDropTarget$1(EmbeddedSceneDropTarget paramEmbeddedSceneDropTarget, EmbeddedSceneDragSourceInterface paramEmbeddedSceneDragSourceInterface, int paramInt1, int paramInt2, int paramInt3, int paramInt4, TransferMode paramTransferMode) {}
  
  public TransferMode call()
  {
    EmbeddedSceneDropTarget.access$004(this$0);
    assert ((EmbeddedSceneDropTarget.access$100(this$0).isFxDragSource()) || (EmbeddedSceneDropTarget.access$200(this$0) == null));
    EmbeddedSceneDropTarget.access$202(this$0, val$dragSource);
    return EmbeddedSceneDropTarget.access$400(this$0).handleDragEnter(val$x, val$y, val$xAbs, val$yAbs, val$recommendedDropAction, EmbeddedSceneDropTarget.access$300(this$0));
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.EmbeddedSceneDropTarget.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

class EmbeddedSceneDropTarget$2
  implements Runnable
{
  EmbeddedSceneDropTarget$2(EmbeddedSceneDropTarget paramEmbeddedSceneDropTarget) {}
  
  public void run()
  {
    try
    {
      EmbeddedSceneDropTarget.access$400(this$0).handleDragLeave(EmbeddedSceneDropTarget.access$300(this$0));
    }
    finally
    {
      EmbeddedSceneDropTarget.access$500(this$0);
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.EmbeddedSceneDropTarget.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

import java.util.concurrent.Callable;
import javafx.scene.input.TransferMode;

class EmbeddedSceneDropTarget$3
  implements Callable<TransferMode>
{
  EmbeddedSceneDropTarget$3(EmbeddedSceneDropTarget paramEmbeddedSceneDropTarget, int paramInt1, int paramInt2, int paramInt3, int paramInt4, TransferMode paramTransferMode) {}
  
  public TransferMode call()
  {
    try
    {
      TransferMode localTransferMode = EmbeddedSceneDropTarget.access$400(this$0).handleDragDrop(val$x, val$y, val$xAbs, val$yAbs, val$recommendedDropAction, EmbeddedSceneDropTarget.access$300(this$0));
      return localTransferMode;
    }
    finally
    {
      EmbeddedSceneDropTarget.access$500(this$0);
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.EmbeddedSceneDropTarget.3
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

import java.util.concurrent.Callable;
import javafx.scene.input.TransferMode;

class EmbeddedSceneDropTarget$4
  implements Callable<TransferMode>
{
  EmbeddedSceneDropTarget$4(EmbeddedSceneDropTarget paramEmbeddedSceneDropTarget, int paramInt1, int paramInt2, int paramInt3, int paramInt4, TransferMode paramTransferMode) {}
  
  public TransferMode call()
  {
    return EmbeddedSceneDropTarget.access$400(this$0).handleDragOver(val$x, val$y, val$xAbs, val$yAbs, val$recommendedDropAction, EmbeddedSceneDropTarget.access$300(this$0));
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.EmbeddedSceneDropTarget.4
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

import com.sun.glass.ui.ClipboardAssistance;
import com.sun.javafx.embed.EmbeddedSceneDragSourceInterface;
import com.sun.javafx.embed.EmbeddedSceneDropTargetInterface;
import java.util.concurrent.Callable;
import javafx.application.Platform;
import javafx.scene.input.TransferMode;

final class EmbeddedSceneDropTarget
  implements EmbeddedSceneDropTargetInterface
{
  private final EmbeddedSceneDnD dnd;
  private final GlassSceneDnDEventHandler dndHandler;
  private EmbeddedSceneDragSourceInterface dragSource;
  private int dndCounter;
  
  public EmbeddedSceneDropTarget(EmbeddedSceneDnD paramEmbeddedSceneDnD, GlassSceneDnDEventHandler paramGlassSceneDnDEventHandler)
  {
    dnd = paramEmbeddedSceneDnD;
    dndHandler = paramGlassSceneDnDEventHandler;
  }
  
  private boolean isDnDCounterValid()
  {
    assert (Platform.isFxApplicationThread());
    assert (dndCounter == 1);
    return true;
  }
  
  private ClipboardAssistance getClipboardAssistance()
  {
    assert (isDnDCounterValid());
    assert (dnd.isValid(this));
    return dnd.getClipboardAssistance(dragSource);
  }
  
  private void close()
  {
    assert (isDnDCounterValid());
    dndCounter -= 1;
    dnd.onDropTargetReleased(this);
  }
  
  public TransferMode handleDragEnter(final int paramInt1, final int paramInt2, final int paramInt3, final int paramInt4, final TransferMode paramTransferMode, final EmbeddedSceneDragSourceInterface paramEmbeddedSceneDragSourceInterface)
  {
    assert (dnd.isHostThread());
    (TransferMode)FxEventLoop.sendEvent(new Callable()
    {
      public TransferMode call()
      {
        EmbeddedSceneDropTarget.access$004(EmbeddedSceneDropTarget.this);
        assert ((dnd.isFxDragSource()) || (dragSource == null));
        dragSource = paramEmbeddedSceneDragSourceInterface;
        return dndHandler.handleDragEnter(paramInt1, paramInt2, paramInt3, paramInt4, paramTransferMode, EmbeddedSceneDropTarget.this.getClipboardAssistance());
      }
    });
  }
  
  public void handleDragLeave()
  {
    assert (dnd.isHostThread());
    FxEventLoop.sendEvent(new Runnable()
    {
      public void run()
      {
        try
        {
          dndHandler.handleDragLeave(EmbeddedSceneDropTarget.this.getClipboardAssistance());
        }
        finally
        {
          EmbeddedSceneDropTarget.this.close();
        }
      }
    });
  }
  
  public TransferMode handleDragDrop(final int paramInt1, final int paramInt2, final int paramInt3, final int paramInt4, final TransferMode paramTransferMode)
  {
    assert (dnd.isHostThread());
    (TransferMode)FxEventLoop.sendEvent(new Callable()
    {
      public TransferMode call()
      {
        try
        {
          TransferMode localTransferMode = dndHandler.handleDragDrop(paramInt1, paramInt2, paramInt3, paramInt4, paramTransferMode, EmbeddedSceneDropTarget.this.getClipboardAssistance());
          return localTransferMode;
        }
        finally
        {
          EmbeddedSceneDropTarget.this.close();
        }
      }
    });
  }
  
  public TransferMode handleDragOver(final int paramInt1, final int paramInt2, final int paramInt3, final int paramInt4, final TransferMode paramTransferMode)
  {
    assert (dnd.isHostThread());
    (TransferMode)FxEventLoop.sendEvent(new Callable()
    {
      public TransferMode call()
      {
        return dndHandler.handleDragOver(paramInt1, paramInt2, paramInt3, paramInt4, paramTransferMode, EmbeddedSceneDropTarget.this.getClipboardAssistance());
      }
    });
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.EmbeddedSceneDropTarget
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

import java.security.PrivilegedAction;

class EmbeddedStage$1
  implements PrivilegedAction<Void>
{
  EmbeddedStage$1(EmbeddedStage paramEmbeddedStage, Runnable paramRunnable) {}
  
  public Void run()
  {
    val$r.run();
    return null;
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.EmbeddedStage.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

class EmbeddedStage$2
  implements Runnable
{
  EmbeddedStage$2(EmbeddedStage paramEmbeddedStage, Runnable paramRunnable) {}
  
  public void run()
  {
    EmbeddedStage.access$000(this$0, val$r);
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.EmbeddedStage.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

import com.sun.javafx.tk.TKStageListener;

class EmbeddedStage$3
  implements Runnable
{
  EmbeddedStage$3(EmbeddedStage paramEmbeddedStage, int paramInt1, int paramInt2) {}
  
  public void run()
  {
    if (this$0.stageListener != null) {
      this$0.stageListener.changedLocation(val$x, val$y);
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.EmbeddedStage.3
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

import com.sun.javafx.tk.TKStageListener;

class EmbeddedStage$4
  implements Runnable
{
  EmbeddedStage$4(EmbeddedStage paramEmbeddedStage, int paramInt1, int paramInt2) {}
  
  public void run()
  {
    if (this$0.stageListener != null) {
      this$0.stageListener.changedSize(val$width, val$height);
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.EmbeddedStage.4
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

import com.sun.javafx.embed.AbstractEvents;
import com.sun.javafx.tk.TKStageListener;

class EmbeddedStage$5
  implements Runnable
{
  EmbeddedStage$5(EmbeddedStage paramEmbeddedStage, boolean paramBoolean, int paramInt) {}
  
  public void run()
  {
    if (this$0.stageListener != null) {
      this$0.stageListener.changedFocused(val$focused, AbstractEvents.focusCauseToPeerFocusCause(val$focusCause));
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.EmbeddedStage.5
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

import com.sun.javafx.embed.AbstractEvents;
import com.sun.javafx.embed.EmbeddedStageInterface;
import com.sun.javafx.embed.HostInterface;
import com.sun.javafx.tk.TKScene;
import com.sun.javafx.tk.TKStageListener;
import com.sun.javafx.tk.Toolkit;
import com.sun.prism.impl.PrismSettings;
import java.io.PrintStream;
import java.security.AccessControlContext;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.List;
import javafx.application.Platform;

public class EmbeddedStage
  extends GlassStage
  implements EmbeddedStageInterface
{
  private HostInterface host;
  private boolean visible = false;
  
  public EmbeddedStage(HostInterface paramHostInterface)
  {
    super(PrismSettings.verbose);
    host = paramHostInterface;
  }
  
  public TKScene createTKScene(boolean paramBoolean)
  {
    return new EmbeddedScene(host, paramBoolean);
  }
  
  public void setScene(TKScene paramTKScene)
  {
    if ((paramTKScene != null) && (!$assertionsDisabled) && (!(paramTKScene instanceof EmbeddedScene))) {
      throw new AssertionError();
    }
    super.setScene(paramTKScene);
  }
  
  public void setTKStageListener(TKStageListener paramTKStageListener)
  {
    stageListener = paramTKStageListener;
  }
  
  public void setBounds(float paramFloat1, float paramFloat2, boolean paramBoolean1, boolean paramBoolean2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, float paramFloat7, float paramFloat8)
  {
    if (verbose) {
      System.err.println("EmbeddedStage.setBounds: x=" + paramFloat1 + " y=" + paramFloat2 + " xSet=" + paramBoolean1 + " ySet=" + paramBoolean2 + " w=" + paramFloat3 + " h=" + " cw=" + paramFloat5 + " ch=" + paramFloat6);
    }
    float f1 = paramFloat3 > 0.0F ? paramFloat3 : paramFloat5;
    float f2 = paramFloat4 > 0.0F ? paramFloat4 : paramFloat6;
    if ((f1 > 0.0F) && (f2 > 0.0F)) {
      host.setPreferredSize((int)f1, (int)f2);
    }
  }
  
  public void setMinimumSize(int paramInt1, int paramInt2) {}
  
  public void setMaximumSize(int paramInt1, int paramInt2) {}
  
  protected void setPlatformEnabled(boolean paramBoolean)
  {
    host.setEnabled(paramBoolean);
  }
  
  protected void requestToFront() {}
  
  public void setIcons(List paramList)
  {
    if (verbose) {
      System.err.println("EmbeddedStage.setIcons");
    }
  }
  
  public void setTitle(String paramString)
  {
    if (verbose) {
      System.err.println("EmbeddedStage.setTitle " + paramString);
    }
  }
  
  public void setVisible(boolean paramBoolean)
  {
    visible = paramBoolean;
    host.setEmbeddedStage(paramBoolean ? this : null);
    super.setVisible(paramBoolean);
  }
  
  public void setOpacity(float paramFloat) {}
  
  public void setIconified(boolean paramBoolean)
  {
    if (verbose) {
      System.err.println("EmbeddedScene.setIconified " + paramBoolean);
    }
  }
  
  public void setResizable(boolean paramBoolean)
  {
    if (verbose) {
      System.err.println("EmbeddedStage.setResizable " + paramBoolean);
    }
  }
  
  public void setFullScreen(boolean paramBoolean)
  {
    if (verbose) {
      System.err.println("EmbeddedStage.setFullScreen " + paramBoolean);
    }
  }
  
  public void requestFocus()
  {
    if (!host.requestFocus()) {
      return;
    }
    super.requestFocus();
  }
  
  public void toBack()
  {
    if (verbose) {
      System.err.println("EmbeddedStage.toBack");
    }
  }
  
  public void toFront()
  {
    if (verbose) {
      System.err.println("EmbeddedStage.toFront");
    }
  }
  
  public boolean grabFocus()
  {
    return false;
  }
  
  public void ungrabFocus() {}
  
  private void notifyStageListener(final Runnable paramRunnable)
  {
    AccessControlContext localAccessControlContext = getAccessControlContext();
    AccessController.doPrivileged(new PrivilegedAction()
    {
      public Void run()
      {
        paramRunnable.run();
        return null;
      }
    }, localAccessControlContext);
  }
  
  private void notifyStageListenerLater(final Runnable paramRunnable)
  {
    Platform.runLater(new Runnable()
    {
      public void run()
      {
        EmbeddedStage.this.notifyStageListener(paramRunnable);
      }
    });
  }
  
  public void setLocation(final int paramInt1, final int paramInt2)
  {
    Runnable local3 = new Runnable()
    {
      public void run()
      {
        if (stageListener != null) {
          stageListener.changedLocation(paramInt1, paramInt2);
        }
      }
    };
    if (Toolkit.getToolkit().isFxUserThread()) {
      notifyStageListener(local3);
    } else {
      notifyStageListenerLater(local3);
    }
  }
  
  public void setSize(final int paramInt1, final int paramInt2)
  {
    Runnable local4 = new Runnable()
    {
      public void run()
      {
        if (stageListener != null) {
          stageListener.changedSize(paramInt1, paramInt2);
        }
      }
    };
    if (Toolkit.getToolkit().isFxUserThread()) {
      notifyStageListener(local4);
    } else {
      notifyStageListenerLater(local4);
    }
  }
  
  public void setFocused(final boolean paramBoolean, final int paramInt)
  {
    Runnable local5 = new Runnable()
    {
      public void run()
      {
        if (stageListener != null) {
          stageListener.changedFocused(paramBoolean, AbstractEvents.focusCauseToPeerFocusCause(paramInt));
        }
      }
    };
    if (Toolkit.getToolkit().isFxUserThread()) {
      notifyStageListener(local5);
    } else {
      notifyStageListenerLater(local5);
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.EmbeddedStage
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

class FxEventLoop$1 {}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.FxEventLoop.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

class FxEventLoop$Impl$1
  implements Runnable
{
  FxEventLoop$Impl$1(FxEventLoop.Impl paramImpl) {}
  
  public void run() {}
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.FxEventLoop.Impl.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

class FxEventLoop$Impl$2
  implements Runnable
{
  FxEventLoop$Impl$2(FxEventLoop.Impl paramImpl) {}
  
  public void run() {}
}

/* Location:
 * Qualified Name:     com.sun.javafx.tk.quantum.FxEventLoop.Impl.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.tk.quantum;

import com.sun.javafx.tk.Toolkit;
import java.util.concurrent.Callable;
import javafx.application.Platform;

final class FxEventLoop$Impl
  extends AbstractEventLoop
{
  private final Object NESTED_EVEN
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 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd