jfxrt

ne.control.skin.ScrollPaneSkin.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.scene.control.skin;

import javafx.event.Event;
import javafx.event.EventDispatchChain;
import javafx.event.EventDispatcher;

class ScrollPaneSkin$10
  implements EventDispatcher
{
  ScrollPaneSkin$10(ScrollPaneSkin paramScrollPaneSkin) {}
  
  public Event dispatchEvent(Event paramEvent, EventDispatchChain paramEventDispatchChain)
  {
    return paramEvent;
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.scene.control.skin.ScrollPaneSkin.10
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.scene.control.skin;

import javafx.event.Event;
import javafx.event.EventDispatchChain;
import javafx.event.EventDispatcher;
import javafx.scene.input.ScrollEvent;

class ScrollPaneSkin$11
  implements EventDispatcher
{
  ScrollPaneSkin$11(ScrollPaneSkin paramScrollPaneSkin, EventDispatcher paramEventDispatcher1, EventDispatcher paramEventDispatcher2) {}
  
  public Event dispatchEvent(Event paramEvent, EventDispatchChain paramEventDispatchChain)
  {
    if ((paramEvent.getEventType() == ScrollEvent.SCROLL) && (!((ScrollEvent)paramEvent).isDirect()))
    {
      paramEventDispatchChain = paramEventDispatchChain.prepend(val$blockEventDispatcher);
      paramEventDispatchChain = paramEventDispatchChain.prepend(val$oldHsbEventDispatcher);
      return paramEventDispatchChain.dispatchEvent(paramEvent);
    }
    return val$oldHsbEventDispatcher.dispatchEvent(paramEvent, paramEventDispatchChain);
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.scene.control.skin.ScrollPaneSkin.11
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.scene.control.skin;

import javafx.event.Event;
import javafx.event.EventDispatchChain;
import javafx.event.EventDispatcher;
import javafx.scene.input.ScrollEvent;

class ScrollPaneSkin$12
  implements EventDispatcher
{
  ScrollPaneSkin$12(ScrollPaneSkin paramScrollPaneSkin, EventDispatcher paramEventDispatcher1, EventDispatcher paramEventDispatcher2) {}
  
  public Event dispatchEvent(Event paramEvent, EventDispatchChain paramEventDispatchChain)
  {
    if ((paramEvent.getEventType() == ScrollEvent.SCROLL) && (!((ScrollEvent)paramEvent).isDirect()))
    {
      paramEventDispatchChain = paramEventDispatchChain.prepend(val$blockEventDispatcher);
      paramEventDispatchChain = paramEventDispatchChain.prepend(val$oldVsbEventDispatcher);
      return paramEventDispatchChain.dispatchEvent(paramEvent);
    }
    return val$oldVsbEventDispatcher.dispatchEvent(paramEvent, paramEventDispatchChain);
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.scene.control.skin.ScrollPaneSkin.12
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.scene.control.skin;

import com.sun.javafx.PlatformUtil;
import javafx.animation.Animation.Status;
import javafx.animation.Timeline;
import javafx.event.EventHandler;
import javafx.scene.control.ScrollBar;
import javafx.scene.control.ScrollPane;
import javafx.scene.input.ScrollEvent;

class ScrollPaneSkin$13
  implements EventHandler<ScrollEvent>
{
  ScrollPaneSkin$13(ScrollPaneSkin paramScrollPaneSkin) {}
  
  public void handle(ScrollEvent paramScrollEvent)
  {
    if (PlatformUtil.isEmbedded()) {
      this$0.startSBReleasedAnimation();
    }
    double d1;
    double d2;
    double d3;
    if (this$0.vsb.getVisibleAmount() < this$0.vsb.getMax())
    {
      d1 = ((ScrollPane)this$0.getSkinnable()).getVmax() - ((ScrollPane)this$0.getSkinnable()).getVmin();
      if (ScrollPaneSkin.access$100(this$0) > 0.0D) {
        d2 = d1 / ScrollPaneSkin.access$100(this$0);
      } else {
        d2 = 0.0D;
      }
      d3 = this$0.vsb.getValue() + -paramScrollEvent.getDeltaY() * d2;
      if (!PlatformUtil.isEmbedded())
      {
        if (((paramScrollEvent.getDeltaY() > 0.0D) && (this$0.vsb.getValue() > this$0.vsb.getMin())) || ((paramScrollEvent.getDeltaY() < 0.0D) && (this$0.vsb.getValue() < this$0.vsb.getMax())))
        {
          this$0.vsb.setValue(d3);
          paramScrollEvent.consume();
        }
      }
      else if ((!paramScrollEvent.isInertia()) || ((paramScrollEvent.isInertia()) && ((this$0.contentsToViewTimeline == null) || (this$0.contentsToViewTimeline.getStatus() == Animation.Status.STOPPED))))
      {
        this$0.vsb.setValue(d3);
        if (((d3 > this$0.vsb.getMax()) || (d3 < this$0.vsb.getMin())) && (!ScrollPaneSkin.access$2000(this$0)) && (!ScrollPaneSkin.access$2400(this$0))) {
          this$0.startContentsToViewport();
        }
        paramScrollEvent.consume();
      }
    }
    if (this$0.hsb.getVisibleAmount() < this$0.hsb.getMax())
    {
      d1 = ((ScrollPane)this$0.getSkinnable()).getHmax() - ((ScrollPane)this$0.getSkinnable()).getHmin();
      if (ScrollPaneSkin.access$000(this$0) > 0.0D) {
        d2 = d1 / ScrollPaneSkin.access$000(this$0);
      } else {
        d2 = 0.0D;
      }
      d3 = this$0.hsb.getValue() + -paramScrollEvent.getDeltaX() * d2;
      if (!PlatformUtil.isEmbedded())
      {
        if (((paramScrollEvent.getDeltaX() > 0.0D) && (this$0.hsb.getValue() > this$0.hsb.getMin())) || ((paramScrollEvent.getDeltaX() < 0.0D) && (this$0.hsb.getValue() < this$0.hsb.getMax())))
        {
          this$0.hsb.setValue(d3);
          paramScrollEvent.consume();
        }
      }
      else if ((!paramScrollEvent.isInertia()) || ((paramScrollEvent.isInertia()) && ((this$0.contentsToViewTimeline == null) || (this$0.contentsToViewTimeline.getStatus() == Animation.Status.STOPPED))))
      {
        this$0.hsb.setValue(d3);
        if (((d3 > this$0.hsb.getMax()) || (d3 < this$0.hsb.getMin())) && (!ScrollPaneSkin.access$2000(this$0)) && (!ScrollPaneSkin.access$2400(this$0))) {
          this$0.startContentsToViewport();
        }
        paramScrollEvent.consume();
      }
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.scene.control.skin.ScrollPaneSkin.13
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.scene.control.skin;

import javafx.event.EventHandler;
import javafx.scene.input.TouchEvent;

class ScrollPaneSkin$14
  implements EventHandler<TouchEvent>
{
  ScrollPaneSkin$14(ScrollPaneSkin paramScrollPaneSkin) {}
  
  public void handle(TouchEvent paramTouchEvent)
  {
    ScrollPaneSkin.access$2402(this$0, true);
    this$0.startSBReleasedAnimation();
    paramTouchEvent.consume();
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.scene.control.skin.ScrollPaneSkin.14
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.scene.control.skin;

import javafx.event.EventHandler;
import javafx.scene.input.TouchEvent;

class ScrollPaneSkin$15
  implements EventHandler<TouchEvent>
{
  ScrollPaneSkin$15(ScrollPaneSkin paramScrollPaneSkin) {}
  
  public void handle(TouchEvent paramTouchEvent)
  {
    ScrollPaneSkin.access$2402(this$0, false);
    this$0.startSBReleasedAnimation();
    paramTouchEvent.consume();
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.scene.control.skin.ScrollPaneSkin.15
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.scene.control.skin;

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

class ScrollPaneSkin$16
  implements EventHandler<ActionEvent>
{
  ScrollPaneSkin$16(ScrollPaneSkin paramScrollPaneSkin) {}
  
  public void handle(ActionEvent paramActionEvent)
  {
    ScrollPaneSkin.access$2502(this$0, true);
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.scene.control.skin.ScrollPaneSkin.16
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.scene.control.skin;

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

class ScrollPaneSkin$17
  implements EventHandler<ActionEvent>
{
  ScrollPaneSkin$17(ScrollPaneSkin paramScrollPaneSkin) {}
  
  public void handle(ActionEvent paramActionEvent)
  {
    ScrollPaneSkin.access$2502(this$0, false);
    this$0.requestLayout();
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.scene.control.skin.ScrollPaneSkin.17
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.scene.control.skin;

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

class ScrollPaneSkin$18
  implements EventHandler<ActionEvent>
{
  ScrollPaneSkin$18(ScrollPaneSkin paramScrollPaneSkin) {}
  
  public void handle(ActionEvent paramActionEvent)
  {
    this$0.requestLayout();
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.scene.control.skin.ScrollPaneSkin.18
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.scene.control.skin;

import javafx.beans.property.DoublePropertyBase;
import javafx.scene.control.ScrollBar;

class ScrollPaneSkin$19
  extends DoublePropertyBase
{
  ScrollPaneSkin$19(ScrollPaneSkin paramScrollPaneSkin) {}
  
  protected void invalidated()
  {
    this$0.hsb.setValue(ScrollPaneSkin.access$2600(this$0));
    this$0.requestLayout();
  }
  
  public Object getBean()
  {
    return this$0;
  }
  
  public String getName()
  {
    return "contentPosX";
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.scene.control.skin.ScrollPaneSkin.19
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.scene.control.skin;

import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.geometry.Bounds;
import javafx.geometry.Insets;
import javafx.scene.control.ScrollBar;

class ScrollPaneSkin$2
  implements ChangeListener<Bounds>
{
  ScrollPaneSkin$2(ScrollPaneSkin paramScrollPaneSkin) {}
  
  public void changed(ObservableValue<? extends Bounds> paramObservableValue, Bounds paramBounds1, Bounds paramBounds2)
  {
    double d1 = paramBounds1.getHeight();
    double d2 = paramBounds2.getHeight();
    double d5;
    if (d1 != d2)
    {
      d3 = ScrollPaneSkin.access$1000(this$0, this$0.getInsets().getTop() - ScrollPaneSkin.access$800(this$0) / (this$0.vsb.getMax() - this$0.vsb.getMin()) * (d1 - ScrollPaneSkin.access$900(this$0)));
      d4 = ScrollPaneSkin.access$1100(this$0, this$0.getInsets().getTop() - ScrollPaneSkin.access$800(this$0) / (this$0.vsb.getMax() - this$0.vsb.getMin()) * (d2 - ScrollPaneSkin.access$900(this$0)));
      d5 = d3 / d4 * this$0.vsb.getValue();
      if (d5 < 0.0D) {
        this$0.vsb.setValue(0.0D);
      } else if (d5 < 1.0D) {
        this$0.vsb.setValue(d5);
      } else if (d5 > 1.0D) {
        this$0.vsb.setValue(1.0D);
      }
    }
    double d3 = paramBounds1.getWidth();
    double d4 = paramBounds2.getWidth();
    if (d3 != d4)
    {
      d5 = ScrollPaneSkin.access$1400(this$0, this$0.getInsets().getLeft() - ScrollPaneSkin.access$1200(this$0) / (this$0.hsb.getMax() - this$0.hsb.getMin()) * (d3 - ScrollPaneSkin.access$1300(this$0)));
      double d6 = ScrollPaneSkin.access$1500(this$0, this$0.getInsets().getLeft() - ScrollPaneSkin.access$1200(this$0) / (this$0.hsb.getMax() - this$0.hsb.getMin()) * (d4 - ScrollPaneSkin.access$1300(this$0)));
      double d7 = d5 / d6 * this$0.hsb.getValue();
      if (d7 < 0.0D) {
        this$0.hsb.setValue(0.0D);
      } else if (d7 < 1.0D) {
        this$0.hsb.setValue(d7);
      } else if (d7 > 1.0D) {
        this$0.hsb.setValue(1.0D);
      }
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.scene.control.skin.ScrollPaneSkin.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.scene.control.skin;

import javafx.beans.property.DoublePropertyBase;
import javafx.scene.control.ScrollBar;

class ScrollPaneSkin$20
  extends DoublePropertyBase
{
  ScrollPaneSkin$20(ScrollPaneSkin paramScrollPaneSkin) {}
  
  protected void invalidated()
  {
    this$0.vsb.setValue(ScrollPaneSkin.access$2700(this$0));
    this$0.requestLayout();
  }
  
  public Object getBean()
  {
    return this$0;
  }
  
  public String getName()
  {
    return "contentPosY";
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.scene.control.skin.ScrollPaneSkin.20
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.scene.control.skin;

import javafx.scene.Node;
import javafx.scene.layout.StackPane;

class ScrollPaneSkin$3
  extends StackPane
{
  ScrollPaneSkin$3(ScrollPaneSkin paramScrollPaneSkin) {}
  
  public void requestLayout()
  {
    ScrollPaneSkin.access$002(this$0, -1.0D);
    ScrollPaneSkin.access$102(this$0, -1.0D);
    super.requestLayout();
  }
  
  protected void layoutChildren()
  {
    if ((ScrollPaneSkin.access$000(this$0) == -1.0D) || (ScrollPaneSkin.access$100(this$0) == -1.0D)) {
      ScrollPaneSkin.access$1600(this$0, getWidth(), getHeight());
    }
    if ((ScrollPaneSkin.access$1700(this$0) != null) && (ScrollPaneSkin.access$1700(this$0).isResizable()))
    {
      ScrollPaneSkin.access$1700(this$0).resize(snapSize(ScrollPaneSkin.access$000(this$0)), snapSize(ScrollPaneSkin.access$100(this$0)));
      if ((ScrollPaneSkin.access$200(this$0) != ScrollPaneSkin.access$300(this$0)) || (ScrollPaneSkin.access$400(this$0) != ScrollPaneSkin.access$500(this$0))) {
        this$0.requestLayout();
      }
    }
    if (ScrollPaneSkin.access$1700(this$0) != null) {
      ScrollPaneSkin.access$1700(this$0).relocate(0.0D, 0.0D);
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.scene.control.skin.ScrollPaneSkin.3
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.scene.control.skin;

import com.sun.javafx.PlatformUtil;
import com.sun.javafx.Utils;
import javafx.beans.InvalidationListener;
import javafx.beans.Observable;
import javafx.scene.control.ScrollBar;
import javafx.scene.control.ScrollPane;

class ScrollPaneSkin$4
  implements InvalidationListener
{
  ScrollPaneSkin$4(ScrollPaneSkin paramScrollPaneSkin) {}
  
  public void invalidated(Observable paramObservable)
  {
    if (!PlatformUtil.isEmbedded()) {
      ScrollPaneSkin.access$802(this$0, Utils.clamp(((ScrollPane)this$0.getSkinnable()).getVmin(), this$0.vsb.getValue(), ((ScrollPane)this$0.getSkinnable()).getVmax()));
    } else {
      ScrollPaneSkin.access$802(this$0, this$0.vsb.getValue());
    }
    ScrollPaneSkin.access$1800(this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.scene.control.skin.ScrollPaneSkin.4
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.scene.control.skin;

import com.sun.javafx.PlatformUtil;
import com.sun.javafx.Utils;
import javafx.beans.InvalidationListener;
import javafx.beans.Observable;
import javafx.scene.control.ScrollBar;
import javafx.scene.control.ScrollPane;

class ScrollPaneSkin$5
  implements InvalidationListener
{
  ScrollPaneSkin$5(ScrollPaneSkin paramScrollPaneSkin) {}
  
  public void invalidated(Observable paramObservable)
  {
    if (!PlatformUtil.isEmbedded()) {
      ScrollPaneSkin.access$1202(this$0, Utils.clamp(((ScrollPane)this$0.getSkinnable()).getHmin(), this$0.hsb.getValue(), ((ScrollPane)this$0.getSkinnable()).getHmax()));
    } else {
      ScrollPaneSkin.access$1202(this$0, this$0.hsb.getValue());
    }
    ScrollPaneSkin.access$1900(this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.scene.control.skin.ScrollPaneSkin.5
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.scene.control.skin;

import com.sun.javafx.PlatformUtil;
import javafx.event.EventHandler;
import javafx.scene.control.ScrollBar;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.StackPane;

class ScrollPaneSkin$6
  implements EventHandler<MouseEvent>
{
  ScrollPaneSkin$6(ScrollPaneSkin paramScrollPaneSkin) {}
  
  public void handle(MouseEvent paramMouseEvent)
  {
    if (PlatformUtil.isEmbedded()) {
      this$0.startSBReleasedAnimation();
    }
    ScrollPaneSkin.access$2002(this$0, true);
    this$0.pressX = (paramMouseEvent.getX() + ScrollPaneSkin.access$2100(this$0).getLayoutX());
    this$0.pressY = (paramMouseEvent.getY() + ScrollPaneSkin.access$2100(this$0).getLayoutY());
    this$0.ohvalue = this$0.hsb.getValue();
    this$0.ovvalue = this$0.vsb.getValue();
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.scene.control.skin.ScrollPaneSkin.6
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.scene.control.skin;

import com.sun.javafx.PlatformUtil;
import javafx.event.EventHandler;
import javafx.scene.Cursor;
import javafx.scene.control.ScrollPane;
import javafx.scene.input.MouseEvent;

class ScrollPaneSkin$7
  implements EventHandler<MouseEvent>
{
  ScrollPaneSkin$7(ScrollPaneSkin paramScrollPaneSkin) {}
  
  public void handle(MouseEvent paramMouseEvent)
  {
    if (PlatformUtil.isEmbedded()) {
      this$0.startSBReleasedAnimation();
    }
    if (((ScrollPane)this$0.getSkinnable()).isPannable())
    {
      ScrollPaneSkin.access$2202(this$0, true);
      if (ScrollPaneSkin.access$2300(this$0) == null)
      {
        ScrollPaneSkin.access$2302(this$0, this$0.getCursor());
        if (ScrollPaneSkin.access$2300(this$0) == null) {
          ScrollPaneSkin.access$2302(this$0, Cursor.DEFAULT);
        }
        this$0.setCursor(Cursor.MOVE);
        this$0.requestLayout();
      }
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.scene.control.skin.ScrollPaneSkin.7
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.scene.control.skin;

import com.sun.javafx.PlatformUtil;
import javafx.event.EventHandler;
import javafx.scene.control.ScrollPane;
import javafx.scene.input.MouseEvent;

class ScrollPaneSkin$8
  implements EventHandler<MouseEvent>
{
  ScrollPaneSkin$8(ScrollPaneSkin paramScrollPaneSkin) {}
  
  public void handle(MouseEvent paramMouseEvent)
  {
    if (PlatformUtil.isEmbedded()) {
      this$0.startSBReleasedAnimation();
    }
    ScrollPaneSkin.access$2002(this$0, false);
    if (ScrollPaneSkin.access$2200(this$0) == true)
    {
      if (ScrollPaneSkin.access$2300(this$0) != null)
      {
        this$0.setCursor(ScrollPaneSkin.access$2300(this$0));
        ScrollPaneSkin.access$2302(this$0, null);
        this$0.requestLayout();
      }
      ScrollPaneSkin.access$2202(this$0, false);
    }
    if (((ScrollPaneSkin.access$800(this$0) > ((ScrollPane)this$0.getSkinnable()).getVmax()) || (ScrollPaneSkin.access$800(this$0) < ((ScrollPane)this$0.getSkinnable()).getVmin()) || (ScrollPaneSkin.access$1200(this$0) > ((ScrollPane)this$0.getSkinnable()).getHmax()) || (ScrollPaneSkin.access$1200(this$0) < ((ScrollPane)this$0.getSkinnable()).getHmin())) && (!ScrollPaneSkin.access$2400(this$0))) {
      this$0.startContentsToViewport();
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.scene.control.skin.ScrollPaneSkin.8
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.scene.control.skin;

import com.sun.javafx.PlatformUtil;
import javafx.event.EventHandler;
import javafx.scene.control.ScrollBar;
import javafx.scene.control.ScrollPane;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.StackPane;

class ScrollPaneSkin$9
  implements EventHandler<MouseEvent>
{
  ScrollPaneSkin$9(ScrollPaneSkin paramScrollPaneSkin) {}
  
  public void handle(MouseEvent paramMouseEvent)
  {
    if (PlatformUtil.isEmbedded()) {
      this$0.startSBReleasedAnimation();
    }
    if ((((ScrollPane)this$0.getSkinnable()).isPannable()) || (PlatformUtil.isEmbedded()))
    {
      double d1 = this$0.pressX - (paramMouseEvent.getX() + ScrollPaneSkin.access$2100(this$0).getLayoutX());
      double d2 = this$0.pressY - (paramMouseEvent.getY() + ScrollPaneSkin.access$2100(this$0).getLayoutY());
      double d3;
      if ((this$0.hsb.getVisibleAmount() > 0.0D) && (this$0.hsb.getVisibleAmount() < this$0.hsb.getMax()) && (Math.abs(d1) > 0.5D))
      {
        d3 = this$0.ohvalue + d1 / (ScrollPaneSkin.access$000(this$0) - ScrollPaneSkin.access$2100(this$0).getWidth()) * (this$0.hsb.getMax() - this$0.hsb.getMin());
        if (!PlatformUtil.isEmbedded())
        {
          if (d3 > this$0.hsb.getMax()) {
            d3 = this$0.hsb.getMax();
          } else if (d3 < this$0.hsb.getMin()) {
            d3 = this$0.hsb.getMin();
          }
          this$0.hsb.setValue(d3);
        }
        else
        {
          this$0.hsb.setValue(d3);
        }
      }
      if ((this$0.vsb.getVisibleAmount() > 0.0D) && (this$0.vsb.getVisibleAmount() < this$0.vsb.getMax()) && (Math.abs(d2) > 0.5D))
      {
        d3 = this$0.ovvalue + d2 / (ScrollPaneSkin.access$100(this$0) - ScrollPaneSkin.access$2100(this$0).getHeight()) * (this$0.vsb.getMax() - this$0.vsb.getMin());
        if (!PlatformUtil.isEmbedded())
        {
          if (d3 > this$0.vsb.getMax()) {
            d3 = this$0.vsb.getMax();
          } else if (d3 < this$0.vsb.getMin()) {
            d3 = this$0.vsb.getMin();
          }
          this$0.vsb.setValue(d3);
        }
        else
        {
          this$0.vsb.setValue(d3);
        }
      }
    }
    paramMouseEvent.consume();
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.scene.control.skin.ScrollPaneSkin.9
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.scene.control.skin;

import com.sun.javafx.PlatformUtil;
import com.sun.javafx.scene.control.behavior.ScrollPaneBehavior;
import com.sun.javafx.scene.traversal.TraversalEngine;
import com.sun.javafx.scene.traversal.TraverseListener;
import javafx.animation.Animation.Status;
import javafx.animation.KeyFrame;
import javafx.animation.KeyValue;
import javafx.animation.Timeline;
import javafx.beans.InvalidationListener;
import javafx.beans.Observable;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.DoublePropertyBase;
import javafx.beans.property.ReadOnlyObjectProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.event.Event;
import javafx.event.EventDispatchChain;
import javafx.event.EventDispatcher;
import javafx.event.EventHandler;
import javafx.geometry.BoundingBox;
import javafx.geometry.Bounds;
import javafx.geometry.Insets;
import javafx.geometry.Orientation;
import javafx.scene.Cursor;
import javafx.scene.Node;
import javafx.scene.control.ScrollBar;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.ScrollPane.ScrollBarPolicy;
import javafx.scene.input.MouseEvent;
import javafx.scene.input.ScrollEvent;
import javafx.scene.input.TouchEvent;
import javafx.scene.layout.StackPane;
import javafx.scene.shape.Rectangle;
import javafx.util.Duration;

public class ScrollPaneSkin
  extends SkinBase<ScrollPane, ScrollPaneBehavior>
  implements TraverseListener
{
  private static final double DEFAULT_PREF_SIZE = 100.0D;
  private static final double DEFAULT_MIN_SIZE = 36.0D;
  private static final double DEFAULT_SB_BREADTH = 12.0D;
  private static final double PAN_THRESHOLD = 0.5D;
  private Node scrollNode;
  private double nodeWidth;
  private double nodeHeight;
  private double posX;
  private double posY;
  private boolean hsbvis;
  private boolean vsbvis;
  private double hsbHeight;
  private double vsbWidth;
  private StackPane viewRect;
  private double contentWidth;
  private double contentHeight;
  private StackPane corner;
  protected ScrollBar hsb;
  protected ScrollBar vsb;
  double pressX;
  double pressY;
  double ohvalue;
  double ovvalue;
  private Cursor saveCursor = null;
  private boolean dragDetected = false;
  private boolean touchDetected = false;
  private boolean mouseDown = false;
  Rectangle clipRect;
  private final InvalidationListener nodeListener = new InvalidationListener()
  {
    public void invalidated(Observable paramAnonymousObservable)
    {
      if ((nodeWidth != -1.0D) && (nodeHeight != -1.0D)) {
        if ((vsbvis != ScrollPaneSkin.this.determineVerticalSBVisible()) || (hsbvis != ScrollPaneSkin.this.determineHorizontalSBVisible()))
        {
          requestLayout();
        }
        else
        {
          ScrollPaneSkin.this.updateVerticalSB();
          ScrollPaneSkin.this.updateHorizontalSB();
        }
      }
    }
  };
  private final ChangeListener<Bounds> boundsChangeListener = new ChangeListener()
  {
    public void changed(ObservableValue<? extends Bounds> paramAnonymousObservableValue, Bounds paramAnonymousBounds1, Bounds paramAnonymousBounds2)
    {
      double d1 = paramAnonymousBounds1.getHeight();
      double d2 = paramAnonymousBounds2.getHeight();
      double d5;
      if (d1 != d2)
      {
        d3 = snapPosition(getInsets().getTop() - posY / (vsb.getMax() - vsb.getMin()) * (d1 - contentHeight));
        d4 = snapPosition(getInsets().getTop() - posY / (vsb.getMax() - vsb.getMin()) * (d2 - contentHeight));
        d5 = d3 / d4 * vsb.getValue();
        if (d5 < 0.0D) {
          vsb.setValue(0.0D);
        } else if (d5 < 1.0D) {
          vsb.setValue(d5);
        } else if (d5 > 1.0D) {
          vsb.setValue(1.0D);
        }
      }
      double d3 = paramAnonymousBounds1.getWidth();
      double d4 = paramAnonymousBounds2.getWidth();
      if (d3 != d4)
      {
        d5 = snapPosition(getInsets().getLeft() - posX / (hsb.getMax() - hsb.getMin()) * (d3 - contentWidth));
        double d6 = snapPosition(getInsets().getLeft() - posX / (hsb.getMax() - hsb.getMin()) * (d4 - contentWidth));
        double d7 = d5 / d6 * hsb.getValue();
        if (d7 < 0.0D) {
          hsb.setValue(0.0D);
        } else if (d7 < 1.0D) {
          hsb.setValue(d7);
        } else if (d7 > 1.0D) {
          hsb.setValue(1.0D);
        }
      }
    }
  };
  Timeline sbTouchTimeline;
  KeyFrame sbTouchKF1;
  KeyFrame sbTouchKF2;
  Timeline contentsToViewTimeline;
  KeyFrame contentsToViewKF1;
  KeyFrame contentsToViewKF2;
  KeyFrame contentsToViewKF3;
  private boolean tempVisibility;
  private DoubleProperty contentPosX;
  private DoubleProperty contentPosY;
  
  public ScrollPaneSkin(ScrollPane paramScrollPane)
  {
    super(paramScrollPane, new ScrollPaneBehavior(paramScrollPane));
    initialize();
    registerChangeListener(paramScrollPane.contentProperty(), "NODE");
    registerChangeListener(paramScrollPane.fitToWidthProperty(), "FIT_TO_WIDTH");
    registerChangeListener(paramScrollPane.fitToHeightProperty(), "FIT_TO_HEIGHT");
    registerChangeListener(paramScrollPane.hbarPolicyProperty(), "HBAR_POLICY");
    registerChangeListener(paramScrollPane.vbarPolicyProperty(), "VBAR_POLICY");
    registerChangeListener(paramScrollPane.hvalueProperty(), "HVALUE");
    registerChangeListener(paramScrollPane.vvalueProperty(), "VVALUE");
    registerChangeListener(paramScrollPane.prefViewportWidthProperty(), "PREF_VIEWPORT_WIDTH");
    registerChangeListener(paramScrollPane.prefViewportHeightProperty(), "PREF_VIEWPORT_HEIGHT");
  }
  
  private void initialize()
  {
    setManaged(false);
    ScrollPane localScrollPane = (ScrollPane)getSkinnable();
    scrollNode = localScrollPane.getContent();
    if (scrollNode != null)
    {
      scrollNode.layoutBoundsProperty().addListener(nodeListener);
      scrollNode.layoutBoundsProperty().addListener(boundsChangeListener);
    }
    viewRect = new StackPane()
    {
      public void requestLayout()
      {
        nodeWidth = -1.0D;
        nodeHeight = -1.0D;
        super.requestLayout();
      }
      
      protected void layoutChildren()
      {
        if ((nodeWidth == -1.0D) || (nodeHeight == -1.0D)) {
          ScrollPaneSkin.this.computeScrollNodeSize(getWidth(), getHeight());
        }
        if ((scrollNode != null) && (scrollNode.isResizable()))
        {
          scrollNode.resize(snapSize(nodeWidth), snapSize(nodeHeight));
          if ((vsbvis != ScrollPaneSkin.this.determineVerticalSBVisible()) || (hsbvis != ScrollPaneSkin.this.determineHorizontalSBVisible())) {
            ScrollPaneSkin.this.requestLayout();
          }
        }
        if (scrollNode != null) {
          scrollNode.relocate(0.0D, 0.0D);
        }
      }
    };
    viewRect.setManaged(false);
    clipRect = new Rectangle();
    viewRect.setClip(clipRect);
    hsb = new ScrollBar();
    vsb = new ScrollBar();
    vsb.setOrientation(Orientation.VERTICAL);
    corner = new StackPane();
    corner.getStyleClass().setAll(new String[] { "corner" });
    viewRect.getChildren().clear();
    if (scrollNode != null) {
      viewRect.getChildren().add(scrollNode);
    }
    getChildren().clear();
    getChildren().addAll(new Node[] { viewRect, vsb, hsb, corner });
    InvalidationListener local4 = new InvalidationListener()
    {
      public void invalidated(Observable paramAnonymousObservable)
      {
        if (!PlatformUtil.isEmbedded()) {
          posY = com.sun.javafx.Utils.clamp(((ScrollPane)getSkinnable()).getVmin(), vsb.getValue(), ((ScrollPane)getSkinnable()).getVmax());
        } else {
          posY = vsb.getValue();
        }
        ScrollPaneSkin.this.updatePosY();
      }
    };
    vsb.valueProperty().addListener(local4);
    InvalidationListener local5 = new InvalidationListener()
    {
      public void invalidated(Observable paramAnonymousObservable)
      {
        if (!PlatformUtil.isEmbedded()) {
          posX = com.sun.javafx.Utils.clamp(((ScrollPane)getSkinnable()).getHmin(), hsb.getValue(), ((ScrollPane)getSkinnable()).getHmax());
        } else {
          posX = hsb.getValue();
        }
        ScrollPaneSkin.this.updatePosX();
      }
    };
    hsb.valueProperty().addListener(local5);
    viewRect.setOnMousePressed(new EventHandler()
    {
      public void handle(MouseEvent paramAnonymousMouseEvent)
      {
        if (PlatformUtil.isEmbedded()) {
          startSBReleasedAnimation();
        }
        mouseDown = true;
        pressX = (paramAnonymousMouseEvent.getX() + viewRect.getLayoutX());
        pressY = (paramAnonymousMouseEvent.getY() + viewRect.getLayoutY());
        ohvalue = hsb.getValue();
        ovvalue = vsb.getValue();
      }
    });
    viewRect.setOnDragDetected(new EventHandler()
    {
      public void handle(MouseEvent paramAnonymousMouseEvent)
      {
        if (PlatformUtil.isEmbedded()) {
          startSBReleasedAnimation();
        }
        if (((ScrollPane)getSkinnable()).isPannable())
        {
          dragDetected = true;
          if (saveCursor == null)
          {
            saveCursor = getCursor();
            if (saveCursor == null) {
              saveCursor = Cursor.DEFAULT;
            }
            setCursor(Cursor.MOVE);
            requestLayout();
          }
        }
      }
    });
    viewRect.addEventFilter(MouseEvent.MOUSE_RELEASED, new EventHandler()
    {
      public void handle(MouseEvent paramAnonymousMouseEvent)
      {
        if (PlatformUtil.isEmbedded()) {
          startSBReleasedAnimation();
        }
        mouseDown = false;
        if (dragDetected == true)
        {
          if (saveCursor != null)
          {
            setCursor(saveCursor);
            saveCursor = null;
            requestLayout();
          }
          dragDetected = false;
        }
        if (((posY > ((ScrollPane)getSkinnable()).getVmax()) || (posY < ((ScrollPane)getSkinnable()).getVmin()) || (posX > ((ScrollPane)getSkinnable()).getHmax()) || (posX < ((ScrollPane)getSkinnable()).getHmin())) && (!touchDetected)) {
          startContentsToViewport();
        }
      }
    });
    viewRect.setOnMouseDragged(new EventHandler()
    {
      public void handle(MouseEvent paramAnonymousMouseEvent)
      {
        if (PlatformUtil.isEmbedded()) {
          startSBReleasedAnimation();
        }
        if ((((ScrollPane)getSkinnable()).isPannable()) || (PlatformUtil.isEmbedded()))
        {
          double d1 = pressX - (paramAnonymousMouseEvent.getX() + viewRect.getLayoutX());
          double d2 = pressY - (paramAnonymousMouseEvent.getY() + viewRect.getLayoutY());
          double d3;
          if ((hsb.getVisibleAmount() > 0.0D) && (hsb.getVisibleAmount() < hsb.getMax()) && (Math.abs(d1) > 0.5D))
          {
            d3 = ohvalue + d1 / (nodeWidth - viewRect.getWidth()) * (hsb.getMax() - hsb.getMin());
            if (!PlatformUtil.isEmbedded())
            {
              if (d3 > hsb.getMax()) {
                d3 = hsb.getMax();
              } else if (d3 < hsb.getMin()) {
                d3 = hsb.getMin();
              }
              hsb.setValue(d3);
            }
            else
            {
              hsb.setValue(d3);
            }
          }
          if ((vsb.getVisibleAmount() > 0.0D) && (vsb.getVisibleAmount() < vsb.getMax()) && (Math.abs(d2) > 0.5D))
          {
            d3 = ovvalue + d2 / (nodeHeight - viewRect.getHeight()) * (vsb.getMax() - vsb.getMin());
            if (!PlatformUtil.isEmbedded())
            {
              if (d3 > vsb.getMax()) {
                d3 = vsb.getMax();
              } else if (d3 < vsb.getMin()) {
                d3 = vsb.getMin();
              }
              vsb.setValue(d3);
            }
            else
            {
              vsb.setValue(d3);
            }
          }
        }
        paramAnonymousMouseEvent.consume();
      }
    });
    final EventDispatcher local10 = new EventDispatcher()
    {
      public Event dispatchEvent(Event paramAnonymousEvent, EventDispatchChain paramAnonymousEventDispatchChain)
      {
        return paramAnonymousEvent;
      }
    };
    final EventDispatcher localEventDispatcher1 = hsb.getEventDispatcher();
    hsb.setEventDispatcher(new EventDispatcher()
    {
      public Event dispatchEvent(Event paramAnonymousEvent, EventDispatchChain paramAnonymousEventDispatchChain)
      {
        if ((paramAnonymousEvent.getEventType() == ScrollEvent.SCROLL) && (!((ScrollEvent)paramAnonymousEvent).isDirect()))
        {
          paramAnonymousEventDispatchChain = paramAnonymousEventDispatchChain.prepend(local10);
          paramAnonymousEventDispatchChain = paramAnonymousEventDispatchChain.prepend(localEventDispatcher1);
          return paramAnonymousEventDispatchChain.dispatchEvent(paramAnonymousEvent);
        }
        return localEventDispatcher1.dispatchEvent(paramAnonymousEvent, paramAnonymousEventDispatchChain);
      }
    });
    final EventDispatcher localEventDispatcher2 = vsb.getEventDispatcher();
    vsb.setEventDispatcher(new EventDispatcher()
    {
      public Event dispatchEvent(Event paramAnonymousEvent, EventDispatchChain paramAnonymousEventDispatchChain)
      {
        if ((paramAnonymousEvent.getEventType() == ScrollEvent.SCROLL) && (!((ScrollEvent)paramAnonymousEvent).isDirect()))
        {
          paramAnonymousEventDispatchChain = paramAnonymousEventDispatchChain.prepend(local10);
          paramAnonymousEventDispatchChain = paramAnonymousEventDispatchChain.prepend(localEventDispatcher2);
          return paramAnonymousEventDispatchChain.dispatchEvent(paramAnonymousEvent);
        }
        return localEventDispatcher2.dispatchEvent(paramAnonymousEvent, paramAnonymousEventDispatchChain);
      }
    });
    setOnScroll(new EventHandler()
    {
      public void handle(ScrollEvent paramAnonymousScrollEvent)
      {
        if (PlatformUtil.isEmbedded()) {
          startSBReleasedAnimation();
        }
        double d1;
        double d2;
        double d3;
        if (vsb.getVisibleAmount() < vsb.getMax())
        {
          d1 = ((ScrollPane)getSkinnable()).getVmax() - ((ScrollPane)getSkinnable()).getVmin();
          if (nodeHeight > 0.0D) {
            d2 = d1 / nodeHeight;
          } else {
            d2 = 0.0D;
          }
          d3 = vsb.getValue() + -paramAnonymousScrollEvent.getDeltaY() * d2;
          if (!PlatformUtil.isEmbedded())
          {
            if (((paramAnonymousScrollEvent.getDeltaY() > 0.0D) && (vsb.getValue() > vsb.getMin())) || ((paramAnonymousScrollEvent.getDeltaY() < 0.0D) && (vsb.getValue() < vsb.getMax())))
            {
              vsb.setValue(d3);
              paramAnonymousScrollEvent.consume();
            }
          }
          else if ((!paramAnonymousScrollEvent.isInertia()) || ((paramAnonymousScrollEvent.isInertia()) && ((contentsToViewTimeline == null) || (contentsToViewTimeline.getStatus() == Animation.Status.STOPPED))))
          {
            vsb.setValue(d3);
            if (((d3 > vsb.getMax()) || (d3 < vsb.getMin())) && (!mouseDown) && (!touchDetected)) {
              startContentsToViewport();
            }
            paramAnonymousScrollEvent.consume();
          }
        }
        if (hsb.getVisibleAmount() < hsb.getMax())
        {
          d1 = ((ScrollPane)getSkinnable()).getHmax() - ((ScrollPane)getSkinnable()).getHmin();
          if (nodeWidth > 0.0D) {
            d2 = d1 / nodeWidth;
          } else {
            d2 = 0.0D;
          }
          d3 = hsb.getValue() + -paramAnonymousScrollEvent.getDeltaX() * d2;
          if (!PlatformUtil.isEmbedded())
          {
            if (((paramAnonymousScrollEvent.getDeltaX() > 0.0D) && (hsb.getValue() > hsb.getMin())) || ((paramAnonymousScrollEvent.getDeltaX() < 0.0D) && (hsb.getValue() < hsb.getMax())))
            {
              hsb.setValue(d3);
              paramAnonymousScrollEvent.consume();
            }
          }
          else if ((!paramAnonymousScrollEvent.isInertia()) || ((paramAnonymousScrollEvent.isInertia()) && ((contentsToViewTimeline == null) || (contentsToViewTimeline.getStatus() == Animation.Status.STOPPED))))
          {
            hsb.setValue(d3);
            if (((d3 > hsb.getMax()) || (d3 < hsb.getMin())) && (!mouseDown) && (!touchDetected)) {
              startContentsToViewport();
            }
            paramAnonymousScrollEvent.consume();
          }
        }
      }
    });
    setOnTouchPressed(new EventHandler()
    {
      public void handle(TouchEvent paramAnonymousTouchEvent)
      {
        touchDetected = true;
        startSBReleasedAnimation();
        paramAnonymousTouchEvent.consume();
      }
    });
    setOnTouchReleased(new EventHandler()
    {
      public void handle(TouchEvent paramAnonymousTouchEvent)
      {
        touchDetected = false;
        startSBReleasedAnimation();
        paramAnonymousTouchEvent.consume();
      }
    });
    TraversalEngine localTraversalEngine = new TraversalEngine(this, false);
    localTraversalEngine.addTraverseListener(this);
    setImpl_traversalEngine(localTraversalEngine);
    consumeMouseEvents(false);
  }
  
  protected void handleControlPropertyChanged(String paramString)
  {
    super.handleControlPropertyChanged(paramString);
    if (paramString == "NODE")
    {
      if (scrollNode != ((ScrollPane)getSkinnable()).getContent())
      {
        if (scrollNode != null)
        {
          scrollNode.layoutBoundsProperty().removeListener(nodeListener);
          scrollNode.layoutBoundsProperty().removeListener(boundsChangeListener);
          viewRect.getChildren().remove(scrollNode);
        }
        scrollNode = ((ScrollPane)getSkinnable()).getContent();
        if (scrollNode != null)
        {
          nodeWidth = snapSize(scrollNode.getLayoutBounds().getWidth());
          nodeHeight = snapSize(scrollNode.getLayoutBounds().getHeight());
          viewRect.getChildren().setAll(new Node[] { scrollNode });
          scrollNode.layoutBoundsProperty().addListener(nodeListener);
          scrollNode.layoutBoundsProperty().addListener(boundsChangeListener);
        }
      }
      requestLayout();
    }
    else if (paramString == "FIT_TO_WIDTH")
    {
      requestLayout();
      viewRect.requestLayout();
    }
    else if (paramString == "FIT_TO_HEIGHT")
    {
      requestLayout();
      viewRect.requestLayout();
    }
    else if (paramString == "HBAR_POLICY")
    {
      ((ScrollPane)getSkinnable()).requestLayout();
      requestLayout();
    }
    else if (paramString == "VBAR_POLICY")
    {
      ((ScrollPane)getSkinnable()).requestLayout();
      r
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