jfxrt

an paramBoolean, int paramInt2)
  {
    AccessController.doPrivileged(new PrivilegedAction()
    {
      public Void run()
      {
        if (!GlassViewEventHandler.this.toolkit()) {
          return null;
        }
        WindowStage localWindowStage = scene.getWindowStage();
        try
        {
          localWindowStage.setInEventHandler(true);
          if (scene.sceneListener != null) {
            scene.sceneListener.touchEventBegin(paramLong, paramBoolean, paramInt1, (val$modifiers & 0x1) != 0, (val$modifiers & 0x4) != 0, (val$modifiers & 0x8) != 0, (val$modifiers & 0x10) != 0);
          }
        }
        finally
        {
          localWindowStage.setInEventHandler(false);
        }
        gestures.notifyBeginTouchEvent(paramLong, val$modifiers, paramInt1, paramBoolean);
        return null;
      }
    }, scene.getAccessControlContext());
  }
  
  public void handleNextTouchEvent(View paramView, final long paramLong1, final int paramInt1, final long paramLong2, int paramInt2, final int paramInt3, final int paramInt4, final int paramInt5)
  {
    AccessController.doPrivileged(new PrivilegedAction()
    {
      public Void run()
      {
        if (!GlassViewEventHandler.this.toolkit()) {
          return null;
        }
        WindowStage localWindowStage = scene.getWindowStage();
        try
        {
          localWindowStage.setInEventHandler(true);
          if (scene.sceneListener != null)
          {
            TouchPoint.State localState = null;
            switch (paramInt1)
            {
            case 811: 
              localState = TouchPoint.State.PRESSED;
              break;
            case 812: 
              localState = TouchPoint.State.MOVED;
              break;
            case 814: 
              localState = TouchPoint.State.STATIONARY;
              break;
            case 813: 
              localState = TouchPoint.State.RELEASED;
              break;
            default: 
              throw new RuntimeException("Unknown touch state: " + localState);
            }
            scene.sceneListener.touchEventNext(localState, paramLong2, paramInt3, paramInt4, paramInt5, paramLong1);
          }
        }
        finally
        {
          localWindowStage.setInEventHandler(false);
        }
        gestures.notifyNextTouchEvent(val$time, paramInt1, paramLong2, paramInt3, paramInt4, paramInt5, paramLong1);
        return null;
      }
    }, scene.getAccessControlContext());
  }
  
  public void handleEndTouchEvent(View paramView, final long paramLong)
  {
    AccessController.doPrivileged(new PrivilegedAction()
    {
      public Void run()
      {
        if (!GlassViewEventHandler.this.toolkit()) {
          return null;
        }
        WindowStage localWindowStage = scene.getWindowStage();
        try
        {
          localWindowStage.setInEventHandler(true);
          if (scene.sceneListener != null) {
            scene.sceneListener.touchEventEnd();
          }
        }
        catch (RuntimeException localRuntimeException)
        {
          if (GlassViewEventHandler.verbose) {
            localRuntimeException.printStackTrace();
          }
          throw localRuntimeException;
        }
        catch (Throwable localThrowable)
        {
          if (GlassViewEventHandler.verbose) {
            localThrowable.printStackTrace();
          }
          throw new RuntimeException(localThrowable);
        }
        finally
        {
          localWindowStage.setInEventHandler(false);
        }
        gestures.notifyEndTouchEvent(paramLong);
        return null;
      }
    }, scene.getAccessControlContext());
  }
  
  private class KeyEventNotification
    implements PrivilegedAction<Void>
  {
    View view;
    long time;
    int type;
    int key;
    char[] chars;
    int modifiers;
    
    private KeyEventNotification() {}
    
    public Void run()
    {
      if (!GlassViewEventHandler.this.toolkit()) {
        return null;
      }
      GlassPrismKeyEvent localGlassPrismKeyEvent = null;
      WindowStage localWindowStage = scene.getWindowStage();
      try
      {
        if (localWindowStage != null) {
          localWindowStage.setInEventHandler(true);
        }
        switch (type)
        {
        case 111: 
          if ((key == 27) && (view.isInFullscreen()) && (localWindowStage != null)) {
            localWindowStage.exitFullScreen();
          }
        case 112: 
        case 113: 
          if (((view.isInFullscreen()) && (!GlassViewEventHandler.this.checkFullScreenKeyEvent(type, key, chars, modifiers))) || (scene.sceneListener == null)) {
            break label227;
          }
          localGlassPrismKeyEvent = new GlassPrismKeyEvent(scene, type, key, chars, modifiers);
          scene.sceneListener.keyEvent(localGlassPrismKeyEvent);
          break;
        }
        if (GlassViewEventHandler.verbose) {
          System.out.println("handleKeyEvent: unhandled type: " + type);
        }
      }
      finally
      {
        label227:
        if (localWindowStage != null) {
          localWindowStage.setInEventHandler(false);
        }
      }
      return null;
    }
  }
  
  private class MouseEventNotification
    implements PrivilegedAction<Void>
  {
    View view;
    long time;
    int type;
    int button;
    int x;
    int y;
    int xAbs;
    int yAbs;
    int clickCount;
    int modifiers;
    boolean isPopupTrigger;
    boolean isSynthesized;
    
    private MouseEventNotification() {}
    
    public Void run()
    {
      if (!GlassViewEventHandler.this.toolkit()) {
        return null;
      }
      boolean bool = dragPerformed;
      GlassPrismMouseEvent localGlassPrismMouseEvent = null;
      int i;
      switch (button)
      {
      case 212: 
        i = 32;
        break;
      case 214: 
        i = 128;
        break;
      case 213: 
        i = 64;
        break;
      default: 
        i = 0;
      }
      switch (type)
      {
      case 224: 
        if (button != 211) {
          return null;
        }
        break;
      case 222: 
        if ((mouseButtonPressedMask & i) == 0) {
          return null;
        }
        GlassViewEventHandler.access$772(GlassViewEventHandler.this, i ^ 0xFFFFFFFF);
        break;
      case 223: 
        dragPerformed = true;
        break;
      case 221: 
        dragPerformed = false;
        GlassViewEventHandler.access$776(GlassViewEventHandler.this, i);
        break;
      case 225: 
      case 226: 
        break;
      default: 
        if (GlassViewEventHandler.verbose) {
          System.out.println("handleMouseEvent: unhandled type: " + type);
        }
        break;
      }
      WindowStage localWindowStage = scene.getWindowStage();
      try
      {
        if (localWindowStage != null) {
          localWindowStage.setInEventHandler(true);
        }
        if (scene.sceneListener != null)
        {
          localGlassPrismMouseEvent = new GlassPrismMouseEvent(scene, type, button, x, y, xAbs, yAbs, clickCount, modifiers, isPopupTrigger, isSynthesized, 0.0D);
          scene.sceneListener.mouseEvent(localGlassPrismMouseEvent);
        }
        if ((type == 222) && (!bool) && (scene.sceneListener != null) && (GlassViewEventHandler.this.toolkit()))
        {
          localGlassPrismMouseEvent = new GlassPrismMouseEvent(scene, 227, button, x, y, xAbs, yAbs, clickCount, modifiers, isPopupTrigger, isSynthesized, 0.0D);
          scene.sceneListener.mouseEvent(localGlassPrismMouseEvent);
        }
      }
      finally
      {
        if (localWindowStage != null) {
          localWindowStage.setInEventHandler(false);
        }
      }
      return null;
    }
  }
  
  private class ViewEventNotification
    implements PrivilegedAction<Void>
  {
    View view;
    long time;
    int type;
    
    private ViewEventNotification() {}
    
    public Void run()
    {
      if (GlassViewEventHandler.verbose) {
        System.err.println("handleViewEvent(" + System.nanoTime() + "): " + GlassEventUtils.getViewEventString(type) + PaintCollector.sceneSize(scene) + " closed: " + view.isClosed());
      }
      if ((scene.sceneListener == null) || (!GlassViewEventHandler.this.toolkit())) {
        return null;
      }
      switch (type)
      {
      case 431: 
        Window localWindow = view.getWindow();
        if ((localWindow == null) || (localWindow.getMinimumWidth() != view.getWidth()) || (localWindow.isVisible()))
        {
          scene.entireSceneNeedsRepaint();
          if (PlatformUtil.isMac()) {
            collector.liveRepaintRenderJob(scene);
          }
        }
        break;
      case 432: 
        scene.sceneListener.changedSize(view.getWidth(), view.getHeight());
        scene.entireSceneNeedsRepaint();
        break;
      case 433: 
        scene.sceneListener.changedLocation(view.getX(), view.getY());
        break;
      case 441: 
      case 442: 
        if (scene.getWindowStage() != null) {
          scene.getWindowStage().fullscreenChanged(type == 441);
        }
        break;
      case 411: 
      case 412: 
      case 421: 
      case 422: 
        break;
      case 413: 
      case 414: 
      case 415: 
      case 416: 
      case 417: 
      case 418: 
      case 419: 
      case 420: 
      case 423: 
      case 424: 
      case 425: 
      case 426: 
      case 427: 
      case 428: 
      case 429: 
      case 430: 
      case 434: 
      case 435: 
      case 436: 
      case 437: 
      case 438: 
      case 439: 
      case 440: 
      default: 
        throw new RuntimeException("handleViewEvent: unhandled type: " + type);
      }
      return null;
    }
  }
}

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

import com.sun.glass.ui.Window;
import com.sun.glass.ui.Window.EventHandler;
import com.sun.javafx.tk.FocusCause;
import com.sun.javafx.tk.TKStageListener;
import java.security.AccessControlContext;
import java.security.AccessController;
import java.security.PrivilegedAction;

public class GlassWindowEventHandler
  extends Window.EventHandler
  implements PrivilegedAction<Void>
{
  private final GlassStage stage;
  private Window window;
  private long time;
  private int type;
  
  public GlassWindowEventHandler(GlassStage paramGlassStage)
  {
    stage = paramGlassStage;
  }
  
  public Void run()
  {
    if ((stage == null) || (stage.stageListener == null)) {
      return null;
    }
    switch (type)
    {
    case 531: 
      stage.stageListener.changedIconified(true);
      break;
    case 532: 
      break;
    case 533: 
      stage.stageListener.changedIconified(false);
      break;
    case 512: 
      stage.stageListener.changedLocation(window.getX(), window.getY());
      break;
    case 511: 
      stage.stageListener.changedSize(window.getWidth(), window.getHeight());
      break;
    case 542: 
      GlassStage.addActiveWindow(stage);
      stage.stageListener.changedFocused(true, FocusCause.ACTIVATED);
      break;
    case 541: 
      stage.stageListener.changedFocused(false, FocusCause.DEACTIVATED);
      break;
    case 546: 
      stage.stageListener.focusUngrab();
      break;
    case 543: 
      GlassStage.addActiveWindow(stage);
      stage.stageListener.changedFocused(true, FocusCause.TRAVERSED_FORWARD);
      break;
    case 544: 
      GlassStage.addActiveWindow(stage);
      stage.stageListener.changedFocused(true, FocusCause.TRAVERSED_BACKWARD);
      break;
    case 545: 
      stage.handleFocusDisabled();
      break;
    case 522: 
      stage.setPlatformWindowClosed();
      stage.stageListener.closed();
      break;
    case 521: 
      stage.stageListener.closing();
    }
    return null;
  }
  
  public void handleWindowEvent(Window paramWindow, long paramLong, int paramInt)
  {
    window = paramWindow;
    time = paramLong;
    type = paramInt;
    AccessControlContext localAccessControlContext = stage.getAccessControlContext();
    AccessController.doPrivileged(this, localAccessControlContext);
  }
}

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

public class LazyFonts {}

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

import javafx.event.ActionEvent;
import javafx.event.EventHandler;

class OverlayWarning$1
  implements EventHandler<ActionEvent>
{
  OverlayWarning$1(OverlayWarning paramOverlayWarning) {}
  
  public void handle(ActionEvent paramActionEvent)
  {
    OverlayWarning.access$000(this$0).setRenderOverlay(false);
    OverlayWarning.access$100(this$0).entireSceneNeedsRepaint();
    OverlayWarning.access$202(this$0, false);
  }
}

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

import javafx.event.ActionEvent;
import javafx.event.EventHandler;

class OverlayWarning$2
  implements EventHandler<ActionEvent>
{
  OverlayWarning$2(OverlayWarning paramOverlayWarning) {}
  
  public void handle(ActionEvent paramActionEvent)
  {
    OverlayWarning.access$000(this$0).setRenderOverlay(false);
    OverlayWarning.access$100(this$0).entireSceneNeedsRepaint();
    OverlayWarning.access$202(this$0, false);
  }
}

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

import com.sun.javafx.sg.prism.NGNode;
import java.util.Locale;
import java.util.ResourceBundle;
import javafx.animation.Animation.Status;
import javafx.animation.FadeTransition;
import javafx.animation.PauseTransition;
import javafx.animation.SequentialTransition;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Bounds;
import javafx.geometry.Rectangle2D;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
import javafx.scene.text.TextAlignment;
import javafx.stage.Screen;
import javafx.util.Duration;

public class OverlayWarning
{
  private static final Locale LOCALE = ;
  private static final ResourceBundle RESOURCES = ResourceBundle.getBundle(OverlayWarning.class.getPackage().getName() + ".QuantumMessagesBundle", LOCALE);
  private static final float PAD = 40.0F;
  private static final float RECTW = 600.0F;
  private static final float RECTH = 100.0F;
  private static final float ARC = 20.0F;
  private static final int FONTSIZE = 24;
  private ViewScene view;
  private Group sceneRoot;
  private SequentialTransition overlayTransition;
  private AbstractPainter painter;
  private boolean warningTransition;
  private Text text;
  private Rectangle background;
  private Group root;
  
  public static String localize(String paramString)
  {
    return RESOURCES.getString(paramString);
  }
  
  public OverlayWarning(ViewScene paramViewScene)
  {
    view = paramViewScene;
    sceneRoot = createOverlayGroup();
    painter = view.getPen().getPainter();
    Scene.impl_setAllowPGAccess(true);
    painter.setOverlayRoot((NGNode)sceneRoot.impl_getPGNode());
    Scene.impl_setAllowPGAccess(false);
    PauseTransition localPauseTransition = new PauseTransition(Duration.millis(4000.0D));
    FadeTransition localFadeTransition = new FadeTransition(Duration.millis(1000.0D), sceneRoot);
    localFadeTransition.setFromValue(1.0D);
    localFadeTransition.setToValue(0.0D);
    overlayTransition = new SequentialTransition();
    overlayTransition.getChildren().add(localPauseTransition);
    overlayTransition.getChildren().add(localFadeTransition);
    overlayTransition.setOnFinished(new EventHandler()
    {
      public void handle(ActionEvent paramAnonymousActionEvent)
      {
        painter.setRenderOverlay(false);
        view.entireSceneNeedsRepaint();
        warningTransition = false;
      }
    });
  }
  
  protected ViewScene getView()
  {
    return view;
  }
  
  protected final void setView(ViewScene paramViewScene)
  {
    if (painter != null)
    {
      painter.setRenderOverlay(false);
      view.entireSceneNeedsRepaint();
    }
    view = paramViewScene;
    painter = paramViewScene.getPen().getPainter();
    Scene.impl_setAllowPGAccess(true);
    painter.setOverlayRoot((NGNode)sceneRoot.impl_getPGNode());
    Scene.impl_setAllowPGAccess(false);
    painter.setRenderOverlay(true);
    view.entireSceneNeedsRepaint();
    overlayTransition.setOnFinished(new EventHandler()
    {
      public void handle(ActionEvent paramAnonymousActionEvent)
      {
        painter.setRenderOverlay(false);
        view.entireSceneNeedsRepaint();
        warningTransition = false;
      }
    });
  }
  
  protected void warn()
  {
    warningTransition = true;
    painter.setRenderOverlay(true);
    overlayTransition.play();
  }
  
  protected void cancel()
  {
    if ((overlayTransition != null) && (overlayTransition.getStatus() == Animation.Status.RUNNING))
    {
      overlayTransition.stop();
      painter.setRenderOverlay(false);
      view.entireSceneNeedsRepaint();
      warningTransition = false;
    }
  }
  
  protected boolean inWarningTransition()
  {
    return warningTransition;
  }
  
  private Group createOverlayGroup()
  {
    Scene localScene = new Scene(new Group());
    Font localFont = new Font(Font.getDefault().getFamily(), 24.0D);
    Text localText = new Text();
    Rectangle2D localRectangle2D = Screen.getPrimary().getBounds();
    localScene.setFill(null);
    String str = "-fx-effect: dropshadow(two-pass-box, rgba(0,0,0,0.75), 3, 0.0, 0, 2);";
    localText.setText(localize("OverlayWarningESC"));
    localText.setStroke(Color.WHITE);
    localText.setFill(Color.WHITE);
    localText.setFont(localFont);
    localText.setWrappingWidth(520.0D);
    localText.setStyle(str);
    localText.setTextAlignment(TextAlignment.CENTER);
    Rectangle localRectangle = createBackground(localText, localRectangle2D);
    Group localGroup = (Group)localScene.getRoot();
    localGroup.getChildren().add(localRectangle);
    localGroup.getChildren().add(localText);
    Scene.impl_setAllowPGAccess(true);
    localText.impl_updatePG();
    localRectangle.impl_updatePG();
    localGroup.impl_updatePG();
    Scene.impl_setAllowPGAccess(false);
    return localGroup;
  }
  
  private Rectangle createBackground(Text paramText, Rectangle2D paramRectangle2D)
  {
    Rectangle localRectangle = new Rectangle();
    double d1 = paramText.getLayoutBounds().getWidth();
    double d2 = paramText.getLayoutBounds().getHeight();
    double d3 = (paramRectangle2D.getWidth() - 600.0D) / 2.0D;
    double d4 = paramRectangle2D.getHeight() / 2.0D;
    localRectangle.setWidth(600.0D);
    localRectangle.setHeight(100.0D);
    localRectangle.setX(d3);
    localRectangle.setY(d4 - 100.0D);
    localRectangle.setArcWidth(20.0D);
    localRectangle.setArcHeight(20.0D);
    localRectangle.setFill(Color.gray(0.0D, 0.6D));
    paramText.setX(d3 + (600.0D - d1) / 2.0D);
    paramText.setY(d4 - 50.0D + (d2 - paramText.getBaselineOffset()) / 2.0D);
    return localRectangle;
  }
}

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

import java.security.PrivilegedAction;

final class PaintCollector$1
  implements PrivilegedAction<Boolean>
{
  public Boolean run()
  {
    return Boolean.valueOf(Boolean.getBoolean("quantum.verbose"));
  }
}

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

import java.security.PrivilegedAction;

final class PaintCollector$2
  implements PrivilegedAction<Boolean>
{
  public Boolean run()
  {
    return Boolean.valueOf(Boolean.getBoolean("quantum.pulse"));
  }
}

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

import com.sun.prism.render.CompletionListener;
import com.sun.prism.render.RenderJob;
import java.io.PrintStream;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;

class PaintCollector$3
  implements CompletionListener
{
  PaintCollector$3(PaintCollector paramPaintCollector) {}
  
  public void done(RenderJob paramRenderJob)
  {
    this$0.checkThreads();
    PaintRenderJob localPaintRenderJob = (PaintRenderJob)paramRenderJob;
    GlassScene localGlassScene1 = localPaintRenderJob.getScene();
    if (PaintCollector.access$000()) {
      System.err.println("PC: rendered: now: " + System.nanoTime() + PaintCollector.sceneSize(localGlassScene1));
    }
    synchronized (this$0)
    {
      PaintCollector.access$100(this$0).remove(localGlassScene1);
      localGlassScene1.clearDirty();
      localGlassScene1.frameRendered();
    }
    if (PaintCollector.access$000())
    {
      System.err.println("PC: rendered: remain: " + PaintCollector.access$100(this$0).size());
      ??? = PaintCollector.access$100(this$0).iterator();
      while (((Iterator)???).hasNext())
      {
        GlassScene localGlassScene2 = (GlassScene)((Iterator)???).next();
        System.err.println("REMAIN: " + PaintCollector.sceneSize(localGlassScene2));
      }
    }
    synchronized (this$0)
    {
      if (PaintCollector.access$100(this$0).isEmpty())
      {
        PaintCollector.access$200(this$0).endPulseRunning();
        if (PaintCollector.access$300(this$0)) {
          PaintCollector.access$200(this$0).vsyncHint();
        }
        if (!PaintCollector.access$400(this$0).get()) {
          this$0.releaseBarrier();
        }
        if (PaintCollector.access$000()) {
          System.err.println("PC: rendered: renderAll: " + System.nanoTime());
        }
      }
    }
  }
}

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

import com.sun.prism.render.CompletionListener;
import com.sun.prism.render.RenderJob;
import java.io.PrintStream;
import java.util.concurrent.atomic.AtomicBoolean;

class PaintCollector$4
  implements CompletionListener
{
  PaintCollector$4(PaintCollector paramPaintCollector) {}
  
  public void done(RenderJob paramRenderJob)
  {
    access$500this$0).liveRepaint.set(false);
    if (PaintCollector.access$600()) {
      System.err.println("LR.end: " + System.nanoTime());
    }
  }
}

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

import com.sun.glass.ui.View;
import com.sun.prism.render.CompletionListener;
import com.sun.prism.render.RenderJob;
import java.io.PrintStream;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.BrokenBarrierException;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.atomic.AtomicBoolean;

public class PaintCollector
{
  private static final boolean verbose = ((Boolean)AccessController.doPrivileged(new PrivilegedAction()
  {
    public Boolean run()
    {
      return Boolean.valueOf(Boolean.getBoolean("quantum.verbose"));
    }
  })).booleanValue();
  private static final boolean pulseDebug = ((Boolean)AccessController.doPrivileged(new PrivilegedAction()
  {
    public Boolean run()
    {
      return Boolean.valueOf(Boolean.getBoolean("quantum.pulse"));
    }
  })).booleanValue();
  private final CyclicBarrier pulseBarrier = new CyclicBarrier(2);
  private final List<GlassScene> uploadScenes = new ArrayList();
  private final List<GlassScene> syncScenes = new ArrayList();
  private final List<GlassScene> dirtyScenes = new ArrayList();
  private final List<GlassScene> dirtyMarker = new ArrayList();
  private final List<GlassScene> dirtyWork = new ArrayList();
  private final AtomicBoolean hasDirty = new AtomicBoolean(false);
  private final AtomicBoolean released = new AtomicBoolean(false);
  private final QuantumToolkit toolkit;
  private final QuantumRenderer renderer;
  private ViewPainter viewPainter;
  private boolean needsHint;
  private static PaintCollector collector;
  private final CompletionListener rendered = new CompletionListener()
  {
    public void done(RenderJob paramAnonymousRenderJob)
    {
      checkThreads();
      PaintRenderJob localPaintRenderJob = (PaintRenderJob)paramAnonymousRenderJob;
      GlassScene localGlassScene1 = localPaintRenderJob.getScene();
      if (PaintCollector.pulseDebug) {
        System.err.println("PC: rendered: now: " + System.nanoTime() + PaintCollector.sceneSize(localGlassScene1));
      }
      synchronized (PaintCollector.this)
      {
        dirtyMarker.remove(localGlassScene1);
        localGlassScene1.clearDirty();
        localGlassScene1.frameRendered();
      }
      if (PaintCollector.pulseDebug)
      {
        System.err.println("PC: rendered: remain: " + dirtyMarker.size());
        ??? = dirtyMarker.iterator();
        while (((Iterator)???).hasNext())
        {
          GlassScene localGlassScene2 = (GlassScene)((Iterator)???).next();
          System.err.println("REMAIN: " + PaintCollector.sceneSize(localGlassScene2));
        }
      }
      synchronized (PaintCollector.this)
      {
        if (dirtyMarker.isEmpty())
        {
          toolkit.endPulseRunning();
          if (needsHint) {
            toolkit.vsyncHint();
          }
          if (!released.get()) {
            releaseBarrier();
          }
          if (PaintCollector.pulseDebug) {
            System.err.println("PC: rendered: renderAll: " + System.nanoTime());
          }
        }
      }
    }
  };
  private final CompletionListener viewRepainted = new CompletionListener()
  {
    public void done(RenderJob paramAnonymousRenderJob)
    {
      viewPainter.liveRepaint.set(false);
      if (PaintCollector.verbose) {
        System.err.println("LR.end: " + System.nanoTime());
      }
    }
  };
  
  private PaintCollector(QuantumToolkit paramQuantumToolkit, QuantumRenderer paramQuantumRenderer)
  {
    toolkit = paramQuantumToolkit;
    renderer = paramQuantumRenderer;
  }
  
  protected static PaintCollector createInstance(QuantumToolkit paramQuantumToolkit)
  {
    collector = new PaintCollector(paramQuantumToolkit, QuantumRenderer.getInstance());
    return collector;
  }
  
  public static PaintCollector getInstance()
  {
    return collector;
  }
  
  public AtomicBoolean hasDirty()
  {
    return hasDirty;
  }
  
  public boolean isReleased()
  {
    return released.get();
  }
  
  protected QuantumToolkit toolkit()
  {
    return toolkit;
  }
  
  protected static String sceneSize(GlassScene paramGlassScene)
  {
    if ((paramGlassScene instanceof ViewScene))
    {
      localObject = ((ViewScene)paramGlassScene).getPlatformView();
      return " scene: " + paramGlassScene.hashCode() + " @ (" + ((View)localObject).getWidth() + "," + ((View)localObject).getHeight() + ")";
    }
    Object localObject = glassStage;
    EmbeddedStage localEmbeddedStage = (EmbeddedStage)localObject;
    return " scene: " + paramGlassScene.hashCode() + ")";
  }
  
  void addDirtyScene(GlassScene paramGlassScene)
  {
    if (verbose) {
      System.err.println("PC.addDirtyScene: " + System.nanoTime() + sceneSize(paramGlassScene));
    }
    synchronized (this)
    {
      if (!dirtyScenes.contains(paramGlassScene)) {
        dirtyScenes.add(paramGlassScene);
      }
      hasDirty.set(true);
    }
  }
  
  void removeDirtyScene(GlassScene paramGlassScene)
  {
    if (verbose) {
      System.err.println("PC.removeDirtyScene: " + sceneSize(paramGlassScene));
    }
    synchronized (this)
    {
      dirtyScenes.remove(paramGlassScene);
      hasDirty.set(!dirtyScenes.isEmpty());
    }
  }
  
  void checkThreads()
  {
    assert (!Thread.currentThread().equals(QuantumToolkit.getFxUserThread()));
  }
  
  void releaseScene(GlassScene paramGlassScene)
  {
    synchronized (this)
    {
      if ((dirtyMarker.remove(paramGlassScene)) && (dirtyMarker.isEmpty()))
      {
        releaseBarrier();
        released.set(true);
      }
    }
  }
  
  void releaseBarrier()
  {
    try
    {
      pulseBarrier.await();
    }
    catch (InterruptedException localInterruptedException)
    {
      localInterruptedException.printStackTrace();
    }
    catch (BrokenBarrierException localBrokenBarrierException)
    {
      localBrokenBarrierException.printStackTrace();
    }
  }
  
  protected CompletionListener getRendered()
  {
    return rendered;
  }
  
  public void liveRepaintRenderJob(GlassScene paramGlassScene)
  {
    if ((paramGlassScene instanceof ViewScene))
    {
      ViewScene localViewScene = (ViewScene)paramGlassScene;
      synchronized (this)
      {
        viewPainter = localViewScene.getPen().getPainter();
        if (!viewPainter.liveRepaint.getAndSet(true))
        {
          renderer.submit(new RenderJob((Runnable)viewPainter, viewRepainted));
          if (verbose) {
            System.err.println("LR.start: " + System.nanoTime() + sceneSize(paramGlassScene));
          }
        }
      }
    }
  }
  
  void renderAll()
  {
    if (pulseDebug) {
      System.err.println("PC.renderAll(" + dirtyScenes.size() + "): " + System.nanoTime());
    }
    if (!hasDirty.get())
    {
      toolkit.endPulseRunning();
      return;
    }
    GlassScene localGlassScene = null;
    synchronized (this)
    {
      pulseBarrier.reset();
      released.set(false);
      localObject1 = 0;
      Object localObject3 = dirtyScenes.size();
      while (localObject1 < localObject3)
      {
        localGlassScene = (GlassScene)dirtyScenes.get(localObject1);
        dirtyMarker.add(localGlassScene);
        dirtyWork.add(localGlassScene);
        localObject1++;
      }
      dirtyScenes.clear();
      uploadScenes.clear();
      syncScenes.clear();
      localObject1 = 0;
      Object localObject4 = dirtyWork.size();
      while (localObject1 < localObject4)
      {
        localGlassScene = (GlassScene)dirtyWork.get(localObject1);
        if (localGlassScene.isSynchronous()) {
          syncScenes.add(localGlassScene);
        } else {
          uploadScenes.add(localGlassScene);
        }
        localObject1++;
      }
    }
    if ((uploadScenes.isEmpty()) && (syncScenes.isEmpty()))
    {
      toolkit.endPulseRunning();
      return;
    }
    needsHint = (!syncScenes.isEmpty());
    ??? = 0;
    Object localObject1 = uploadScenes.size();
    while (??? < localObject1)
    {
      localGlassScene = (GlassScene)uploadScenes.get(???);
      try
      {
        localGlassScene.repaint();
      }
      catch (Throwable localThrowable1)
      {
        localThrowable1.printStackTrace();
      }
      ???++;
    }
    ??? = 0;
    Object localObject2 = syncScenes.size();
    while (??? < localObject2)
    {
      localGlassScene = (GlassScene)syncScenes.get(???);
      try
      {
        localGlassScene.repaint();
      }
      catch (Throwable localThrowable2)
      {
        localThrowable2.printStackTrace();
      }
      ???++;
    }
    try
    {
      releaseBarrier();
    }
    finally
    {
      synchronized (this)
      {
        dirtyWork.clear();
        assert (dirtyMarker.isEmpty());
        hasDirty.set(false);
      }
    }
  }
}

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

import com.sun.prism.render.CompletionListener;
import com.sun.prism.render.RenderJob;

public class PaintRenderJob
  extends RenderJob
{
  private GlassScene scene;
  
  public PaintRenderJob(GlassScene paramGlassScene, CompletionListener paramCompletionListener, Runnable paramRunnable)
  {
    super(paramRunnable, paramCompletionListener);
    scene = paramGlassScene;
  }
  
  public GlassScene getScene()
  {
    return scene;
  }
}

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

public final class PathIteratorHelper$Struct
{
  float f0;
  float f1;
  float f2;
  float f3;
  float f4;
  float f5;
}

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

import com.sun.javafx.geom.PathIterator;

public class PathIteratorHelper
{
  private PathIterator itr;
  private float[] f = new float[6];
  
  public PathIteratorHelper(PathIterator paramPathIterator)
  {
    itr = paramPathIterator;
  }
  
  public int getWindingRule()
  {
    return itr.getWindingRule();
  }
  
  public boolean isDone()
  {
    return itr.isDone();
  }
  
  public void next()
  {
    itr.next();
  }
  
  public int currentSegment(Struct paramStruct)
  {
    int i = itr.currentSegment(f);
    f0 = f[0];
    f1 = f[1];
    f2 = f[2];
    f3 = f[3];
    f4 = f[4];
    f5 = f[5];
    return i;
  }
  
  public static final class Struct
  {
    float f0;
    float f1;
    float f2;
    float f3;
    float f4;
    float f5;
  }
}

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

import com.sun.glass.ui.Application;
import com.sun.glass.ui.Pixels;
import com.sun.javafx.iio.ImageFormatDescription;
import com.sun.javafx.iio.ImageStorage;
import com.sun.javafx.image.ByteToBytePixelConverter;
import com.sun.javafx.image.impl.ByteRgb;
import com.sun.prism.Image;
import com.sun.prism.PixelFormat;
import com.sun.prism.PixelFormat.DataType;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.IntBuffer;

public class PixelUtils
{
  private static ImageFormatDescription[] supportedFormats = ;
  
  protected static boolean supportedFormatType(String paramString)
  {
    for (ImageFormatDescription localImageFormatDescription : supportedFormats) {
      for (String str : localImageFormatDescription.getExtensions()) {
        if (paramString.endsWith(str)) {
          return true;
        }
      }
    }
    return false;
  }
  
  public static Pixels imageToPixels(Image paramImage)
  {
    PixelFormat.DataType localDataType = paramImage.getDataType();
    Application localApplication = Application.GetApplication();
    int i = Pixels.getNativeFormat();
    Object localObject;
    Pixels localPixels;
    if (localDataType == PixelFormat.DataType.BYTE)
    {
      localObject = (ByteBuffer)paramImage.getPixelBuffer();
      int j = paramImage.getWidth();
      int k = paramImage.getHeight();
      int m = paramImage.getScanlineStride();
      if (paramImage.getBytesPerPixelUnit() == 3)
      {
        byte[] arrayOfByte;
        switch (i)
        {
        case 2: 
          arrayOfByte = new byte[j * k * 4];
          ByteRgb.ToByteArgbConverter.convert((ByteBuffer)localObject, 0, m, arrayOfByte, 0, j * 4, j, k);
          localObject = ByteBuffer.wrap(arrayOfByte);
          break;
        case 1: 
          arrayOfByte = new byte[j * k * 4];
          ByteRgb.ToByteBgraPreConverter.convert((ByteBuffer)localObject, 0, m, arrayOfByte, 0, j * 4, j, k);
          localObject = ByteBuffer.wrap(arrayOfByte);
          break;
        default: 
          throw new IllegalArgumentException("unhandled native format: " + i);
        }
      }
      else if (paramImage.getPixelFormat() != PixelFormat.BYTE_BGRA_PRE)
      {
        throw new IllegalArgumentException("non-RGB image format");
      }
      localPixels = localApplication.createPixels(paramImage.getWidth(), paramImage.getHeight(), (ByteBuffer)localObject);
      return localPixels;
    }
    if (localDataType == PixelFormat.DataType.INT)
    {
      if (ByteOrder.nativeOrder() != ByteOrder.LITTLE_ENDIAN) {
        throw new UnsupportedOperationException("INT_ARGB_PRE only supported for LITTLE_ENDIAN machines");
      }
      localObject = (IntBuffer)paramImage.getPixelBuffer();
      localPixels = localApplication.createPixels(paramImage.getWidth(), paramImage.getHeight(), (IntBuffer)localObject);
      return localPixels;
    }
    throw new IllegalArgumentException("unhandled image type: " + localDataType);
  }
  
  public static Image pixelsToImage(Pixels paramPixels)
  {
    Buffer localBuffer = paramPixels.getPixels();
    Object localObject;
    if (paramPixels.getBytesPerComponent() == 1)
    {
      localObject = ByteBuffer.allocateDirect(localBuffer.capacity());
      ((ByteBuffer)localObject).put((ByteBuffer)localBuffer);
      ((ByteBuffer)localObject).rewind();
      return Image.fromByteBgraPreData((ByteBuffer)localObject, paramPixels.getWidth(), paramPixels.getHeight());
    }
    if (paramPixels.getBytesPerComponent() == 4)
    {
      localObject = IntBuffer.allocate(localBuffer.capacity());
      ((IntBuffer)localObject).put((IntBuffer)localBuffer);
      ((IntBuffer)localObject).rewind();
      return Image.fromIntArgbPreData((IntBuffer)localBuffer, paramPixels.getWidth(), paramPixels.getHeight());
    }
    throw new IllegalArgumentException("unhandled pixel buffer: " + localBuffer.getClass().getName());
  }
}

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

public class PopupScene
  extends ViewScene
{
  public PopupScene(boolean paramBoolean1, boolean paramBoolean2)
  {
    super(paramBoolean1, paramBoolean2);
  }
  
  public void setGlassStage(GlassStage paramGlassStage)
  {
    super.setGlassStage(paramGlassStage);
  }
  
  PopupStage getPopupStage()
  {
    return (PopupStage)glassStage;
  }
  
  public void sceneChanged()
  {
    GlassScene localGlassScene = null;
    if ((getPopupStage() != null) && ((localGlassScene = getPopupStage().getOwnerScene()) != null)) {
      localGlassScene.sceneChanged();
    }
    super.sceneChanged();
  }
}

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

import com.sun.glass.ui.Application;
import com.sun.glass.ui.Screen;
import com.sun.glass.ui.Window;
import com.sun.javafx.tk.TKScene;
import javafx.stage.StageStyle;

public class PopupStage
  extends WindowStage
{
  private GlassStage ownerStage;
  
  public PopupStage(boolean paramBoolean, Object paramObject)
  {
    super(paramBoolean, StageStyle.TRANSPARENT);
    assert ((paramObject instanceof GlassStage));
    ownerStage = ((GlassStage)paramObject);
  }
  
  protected void initPlatformWindow()
  {
    Application localApplication = Application.GetApplication();
    Window localWindow = (ownerStage instanceof WindowStage) ? ((WindowStage)ownerStage).getPlatformWindow() : null;
    platformWindow = localApplication.createWindow(localWindow, Screen.getMainScreen(), 10);
    platformWindow.setFocusable(false);
  }
  
  public GlassScene getOwnerScene()
  {
    return ownerStage.scene;
  }
  
  public TKScene createTKScene(boolean paramBoolean)
  {
    PopupScene localPopupScene = new PopupScene(verbose, paramBoolean);
    localPopupScene.setGlassStage(this);
    return localPopupScene;
  }
  
  public void setResizable(boolean paramBoolean) {}
  
  public void setTitle(String paramStri
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