SHARE
TWEET

ScrollBarSkin.class

a guest Nov 16th, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //
  2. // Source code recreated from a .class file by IntelliJ IDEA
  3. // (powered by Fernflower decompiler)
  4. //
  5.  
  6. package javafx.scene.control.skin;
  7.  
  8. import com.sun.javafx.scene.control.Properties;
  9. import com.sun.javafx.scene.control.behavior.ScrollBarBehavior;
  10. import com.sun.javafx.util.Utils;
  11. import java.util.function.Consumer;
  12. import javafx.beans.value.ObservableValue;
  13. import javafx.geometry.Orientation;
  14. import javafx.geometry.Point2D;
  15. import javafx.scene.AccessibleAction;
  16. import javafx.scene.AccessibleAttribute;
  17. import javafx.scene.AccessibleRole;
  18. import javafx.scene.Node;
  19. import javafx.scene.control.ScrollBar;
  20. import javafx.scene.control.SkinBase;
  21. import javafx.scene.input.MouseButton;
  22. import javafx.scene.input.ScrollEvent;
  23. import javafx.scene.layout.Region;
  24. import javafx.scene.layout.StackPane;
  25.  
  26. public class ScrollBarSkin extends SkinBase<ScrollBar> {
  27.     private final ScrollBarBehavior behavior;
  28.     private StackPane thumb;
  29.     private StackPane trackBackground;
  30.     private StackPane track;
  31.     private ScrollBarSkin.EndButton incButton;
  32.     private ScrollBarSkin.EndButton decButton;
  33.     private double trackLength;
  34.     private double thumbLength;
  35.     private double preDragThumbPos;
  36.     private Point2D dragStart;
  37.     private double trackPos;
  38.  
  39.     public ScrollBarSkin(ScrollBar control) {
  40.         super(control);
  41.         this.behavior = new ScrollBarBehavior(control);
  42.         this.initialize();
  43.         ((ScrollBar)this.getSkinnable()).requestLayout();
  44.         Consumer<ObservableValue<?>> consumer = (e) -> {
  45.             this.positionThumb();
  46.             ((ScrollBar)this.getSkinnable()).requestLayout();
  47.         };
  48.         this.registerChangeListener(control.minProperty(), consumer);
  49.         this.registerChangeListener(control.maxProperty(), consumer);
  50.         this.registerChangeListener(control.visibleAmountProperty(), consumer);
  51.         this.registerChangeListener(control.valueProperty(), (e) -> {
  52.             this.positionThumb();
  53.         });
  54.         this.registerChangeListener(control.orientationProperty(), (e) -> {
  55.             ((ScrollBar)this.getSkinnable()).requestLayout();
  56.         });
  57.     }
  58.  
  59.     public void dispose() {
  60.         super.dispose();
  61.         if (this.behavior != null) {
  62.             this.behavior.dispose();
  63.         }
  64.  
  65.     }
  66.  
  67.     protected void layoutChildren(double x, double y, double w, double h) {
  68.         ScrollBar s = (ScrollBar)this.getSkinnable();
  69.         double visiblePortion;
  70.         if (s.getMax() > s.getMin()) {
  71.             visiblePortion = s.getVisibleAmount() / (s.getMax() - s.getMin());
  72.         } else {
  73.             visiblePortion = 1.0D;
  74.         }
  75.  
  76.         double decHeight;
  77.         double incHeight;
  78.         if (s.getOrientation() == Orientation.VERTICAL) {
  79.             if (!Properties.IS_TOUCH_SUPPORTED) {
  80.                 decHeight = this.snapSizeY(this.decButton.prefHeight(-1.0D));
  81.                 incHeight = this.snapSizeY(this.incButton.prefHeight(-1.0D));
  82.                 this.decButton.resize(w, decHeight);
  83.                 this.incButton.resize(w, incHeight);
  84.                 this.trackLength = this.snapSizeY(h - (decHeight + incHeight));
  85.                 this.thumbLength = this.snapSizeY(Utils.clamp(this.minThumbLength(), this.trackLength * visiblePortion, this.trackLength));
  86.                 this.trackBackground.resizeRelocate(this.snapPositionX(x), this.snapPositionY(y), w, this.trackLength + decHeight + incHeight);
  87.                 this.decButton.relocate(this.snapPositionX(x), this.snapPositionY(y));
  88.                 this.incButton.relocate(this.snapPositionX(x), this.snapPositionY(y + h - incHeight));
  89.                 this.track.resizeRelocate(this.snapPositionX(x), this.snapPositionY(y + decHeight), w, this.trackLength);
  90.                 this.thumb.resize(this.snapSizeX(x >= 0.0D ? w : w + x), this.thumbLength);
  91.                 this.positionThumb();
  92.             } else {
  93.                 this.trackLength = this.snapSizeY(h);
  94.                 this.thumbLength = this.snapSizeY(Utils.clamp(this.minThumbLength(), this.trackLength * visiblePortion, this.trackLength));
  95.                 this.track.resizeRelocate(this.snapPositionX(x), this.snapPositionY(y), w, this.trackLength);
  96.                 this.thumb.resize(this.snapSizeX(x >= 0.0D ? w : w + x), this.thumbLength);
  97.                 this.positionThumb();
  98.             }
  99.         } else {
  100.             if (!Properties.IS_TOUCH_SUPPORTED) {
  101.                 decHeight = this.snapSizeX(this.decButton.prefWidth(-1.0D));
  102.                 incHeight = this.snapSizeX(this.incButton.prefWidth(-1.0D));
  103.                 this.decButton.resize(decHeight, h);
  104.                 this.incButton.resize(incHeight, h);
  105.                 this.trackLength = this.snapSizeX(w - (decHeight + incHeight));
  106.                 this.thumbLength = this.snapSizeX(Utils.clamp(this.minThumbLength(), this.trackLength * visiblePortion, this.trackLength));
  107.                 this.trackBackground.resizeRelocate(this.snapPositionX(x), this.snapPositionY(y), this.trackLength + decHeight + incHeight, h);
  108.                 this.decButton.relocate(this.snapPositionX(x), this.snapPositionY(y));
  109.                 this.incButton.relocate(this.snapPositionX(x + w - incHeight), this.snapPositionY(y));
  110.                 this.track.resizeRelocate(this.snapPositionX(x + decHeight), this.snapPositionY(y), this.trackLength, h);
  111.                 this.thumb.resize(this.thumbLength, this.snapSizeY(y >= 0.0D ? h : h + y));
  112.                 this.positionThumb();
  113.             } else {
  114.                 this.trackLength = this.snapSizeX(w);
  115.                 this.thumbLength = this.snapSizeX(Utils.clamp(this.minThumbLength(), this.trackLength * visiblePortion, this.trackLength));
  116.                 this.track.resizeRelocate(this.snapPositionX(x), this.snapPositionY(y), this.trackLength, h);
  117.                 this.thumb.resize(this.thumbLength, this.snapSizeY(y >= 0.0D ? h : h + y));
  118.                 this.positionThumb();
  119.             }
  120.  
  121.             s.resize(this.snapSizeX(s.getWidth()), this.snapSizeY(s.getHeight()));
  122.         }
  123.  
  124.         if (s.getOrientation() == Orientation.VERTICAL && h >= this.computeMinHeight(-1.0D, (double)((int)y), this.snappedRightInset(), this.snappedBottomInset(), (double)((int)x)) - (y + this.snappedBottomInset()) || s.getOrientation() == Orientation.HORIZONTAL && w >= this.computeMinWidth(-1.0D, (double)((int)y), this.snappedRightInset(), this.snappedBottomInset(), (double)((int)x)) - (x + this.snappedRightInset())) {
  125.             this.trackBackground.setVisible(true);
  126.             this.track.setVisible(true);
  127.             this.thumb.setVisible(true);
  128.             if (!Properties.IS_TOUCH_SUPPORTED) {
  129.                 this.incButton.setVisible(true);
  130.                 this.decButton.setVisible(true);
  131.             }
  132.         } else {
  133.             this.trackBackground.setVisible(false);
  134.             this.track.setVisible(false);
  135.             this.thumb.setVisible(false);
  136.             if (!Properties.IS_TOUCH_SUPPORTED) {
  137.                 if (h >= this.decButton.computeMinWidth(-1.0D)) {
  138.                     this.decButton.setVisible(true);
  139.                 } else {
  140.                     this.decButton.setVisible(false);
  141.                 }
  142.  
  143.                 if (h >= this.incButton.computeMinWidth(-1.0D)) {
  144.                     this.incButton.setVisible(true);
  145.                 } else {
  146.                     this.incButton.setVisible(false);
  147.                 }
  148.             }
  149.         }
  150.  
  151.     }
  152.  
  153.     protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
  154.         if (((ScrollBar)this.getSkinnable()).getOrientation() == Orientation.VERTICAL) {
  155.             return this.getBreadth();
  156.         } else {
  157.             return !Properties.IS_TOUCH_SUPPORTED ? this.decButton.minWidth(-1.0D) + this.incButton.minWidth(-1.0D) + this.minTrackLength() + leftInset + rightInset : this.minTrackLength() + leftInset + rightInset;
  158.         }
  159.     }
  160.  
  161.     protected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
  162.         if (((ScrollBar)this.getSkinnable()).getOrientation() == Orientation.VERTICAL) {
  163.             return !Properties.IS_TOUCH_SUPPORTED ? this.decButton.minHeight(-1.0D) + this.incButton.minHeight(-1.0D) + this.minTrackLength() + topInset + bottomInset : this.minTrackLength() + topInset + bottomInset;
  164.         } else {
  165.             return this.getBreadth();
  166.         }
  167.     }
  168.  
  169.     protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
  170.         ScrollBar s = (ScrollBar)this.getSkinnable();
  171.         return s.getOrientation() == Orientation.VERTICAL ? this.getBreadth() : 100.0D + leftInset + rightInset;
  172.     }
  173.  
  174.     protected double computePrefHeight(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
  175.         ScrollBar s = (ScrollBar)this.getSkinnable();
  176.         return s.getOrientation() == Orientation.VERTICAL ? 100.0D + topInset + bottomInset : this.getBreadth();
  177.     }
  178.  
  179.     protected double computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
  180.         ScrollBar s = (ScrollBar)this.getSkinnable();
  181.         return s.getOrientation() == Orientation.VERTICAL ? s.prefWidth(-1.0D) : 1.7976931348623157E308D;
  182.     }
  183.  
  184.     protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
  185.         ScrollBar s = (ScrollBar)this.getSkinnable();
  186.         return s.getOrientation() == Orientation.VERTICAL ? 1.7976931348623157E308D : s.prefHeight(-1.0D);
  187.     }
  188.  
  189.     private void initialize() {
  190.         this.track = new StackPane();
  191.         this.track.getStyleClass().setAll(new String[]{"track"});
  192.         this.trackBackground = new StackPane();
  193.         this.trackBackground.getStyleClass().setAll(new String[]{"track-background"});
  194.         this.thumb = new StackPane() {
  195.             public Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters) {
  196.                 switch(attribute) {
  197.                 case VALUE:
  198.                     return ((ScrollBar)ScrollBarSkin.this.getSkinnable()).getValue();
  199.                 default:
  200.                     return super.queryAccessibleAttribute(attribute, parameters);
  201.                 }
  202.             }
  203.         };
  204.         this.thumb.getStyleClass().setAll(new String[]{"thumb"});
  205.         this.thumb.setAccessibleRole(AccessibleRole.THUMB);
  206.         if (!Properties.IS_TOUCH_SUPPORTED) {
  207.             this.incButton = new ScrollBarSkin.EndButton("increment-button", "increment-arrow") {
  208.                 public void executeAccessibleAction(AccessibleAction action, Object... parameters) {
  209.                     switch(action) {
  210.                     case FIRE:
  211.                         ((ScrollBar)ScrollBarSkin.this.getSkinnable()).increment();
  212.                         break;
  213.                     default:
  214.                         super.executeAccessibleAction(action, parameters);
  215.                     }
  216.  
  217.                 }
  218.             };
  219.             this.incButton.setAccessibleRole(AccessibleRole.INCREMENT_BUTTON);
  220.             this.incButton.setOnMousePressed((me) -> {
  221.                 if (!this.thumb.isVisible() || this.trackLength > this.thumbLength) {
  222.                     this.behavior.incButtonPressed();
  223.                 }
  224.  
  225.                 me.consume();
  226.             });
  227.             this.incButton.setOnMouseReleased((me) -> {
  228.                 if (!this.thumb.isVisible() || this.trackLength > this.thumbLength) {
  229.                     this.behavior.incButtonReleased();
  230.                 }
  231.  
  232.                 me.consume();
  233.             });
  234.             this.decButton = new ScrollBarSkin.EndButton("decrement-button", "decrement-arrow") {
  235.                 public void executeAccessibleAction(AccessibleAction action, Object... parameters) {
  236.                     switch(action) {
  237.                     case FIRE:
  238.                         ((ScrollBar)ScrollBarSkin.this.getSkinnable()).decrement();
  239.                         break;
  240.                     default:
  241.                         super.executeAccessibleAction(action, parameters);
  242.                     }
  243.  
  244.                 }
  245.             };
  246.             this.decButton.setAccessibleRole(AccessibleRole.DECREMENT_BUTTON);
  247.             this.decButton.setOnMousePressed((me) -> {
  248.                 if (!this.thumb.isVisible() || this.trackLength > this.thumbLength) {
  249.                     this.behavior.decButtonPressed();
  250.                 }
  251.  
  252.                 me.consume();
  253.             });
  254.             this.decButton.setOnMouseReleased((me) -> {
  255.                 if (!this.thumb.isVisible() || this.trackLength > this.thumbLength) {
  256.                     this.behavior.decButtonReleased();
  257.                 }
  258.  
  259.                 me.consume();
  260.             });
  261.         }
  262.  
  263.         this.track.setOnMousePressed((me) -> {
  264.             if (!this.thumb.isPressed() && me.getButton() == MouseButton.PRIMARY) {
  265.                 if (((ScrollBar)this.getSkinnable()).getOrientation() == Orientation.VERTICAL) {
  266.                     if (this.trackLength != 0.0D) {
  267.                         this.behavior.trackPress(me.getY() / this.trackLength);
  268.                         me.consume();
  269.                     }
  270.                 } else if (this.trackLength != 0.0D) {
  271.                     this.behavior.trackPress(me.getX() / this.trackLength);
  272.                     me.consume();
  273.                 }
  274.             }
  275.  
  276.         });
  277.         this.track.setOnMouseReleased((me) -> {
  278.             this.behavior.trackRelease();
  279.             me.consume();
  280.         });
  281.         this.thumb.setOnMousePressed((me) -> {
  282.             if (me.isSynthesized()) {
  283.                 me.consume();
  284.             } else {
  285.                 if (((ScrollBar)this.getSkinnable()).getMax() > ((ScrollBar)this.getSkinnable()).getMin()) {
  286.                     this.dragStart = this.thumb.localToParent(me.getX(), me.getY());
  287.                     double clampedValue = Utils.clamp(((ScrollBar)this.getSkinnable()).getMin(), ((ScrollBar)this.getSkinnable()).getValue(), ((ScrollBar)this.getSkinnable()).getMax());
  288.                     this.preDragThumbPos = (clampedValue - ((ScrollBar)this.getSkinnable()).getMin()) / (((ScrollBar)this.getSkinnable()).getMax() - ((ScrollBar)this.getSkinnable()).getMin());
  289.                     me.consume();
  290.                 }
  291.  
  292.             }
  293.         });
  294.         this.thumb.setOnMouseDragged((me) -> {
  295.             if (me.isSynthesized()) {
  296.                 me.consume();
  297.             } else {
  298.                 if (((ScrollBar)this.getSkinnable()).getMax() > ((ScrollBar)this.getSkinnable()).getMin()) {
  299.                     if (this.trackLength > this.thumbLength) {
  300.                         Point2D cur = this.thumb.localToParent(me.getX(), me.getY());
  301.                         if (this.dragStart == null) {
  302.                             this.dragStart = this.thumb.localToParent(me.getX(), me.getY());
  303.                         }
  304.  
  305.                         double dragPos = ((ScrollBar)this.getSkinnable()).getOrientation() == Orientation.VERTICAL ? cur.getY() - this.dragStart.getY() : cur.getX() - this.dragStart.getX();
  306.                         this.behavior.thumbDragged(this.preDragThumbPos + dragPos / (this.trackLength - this.thumbLength));
  307.                     }
  308.  
  309.                     me.consume();
  310.                 }
  311.  
  312.             }
  313.         });
  314.         this.thumb.setOnScrollStarted((se) -> {
  315.             if (se.isDirect() && ((ScrollBar)this.getSkinnable()).getMax() > ((ScrollBar)this.getSkinnable()).getMin()) {
  316.                 this.dragStart = this.thumb.localToParent(se.getX(), se.getY());
  317.                 double clampedValue = Utils.clamp(((ScrollBar)this.getSkinnable()).getMin(), ((ScrollBar)this.getSkinnable()).getValue(), ((ScrollBar)this.getSkinnable()).getMax());
  318.                 this.preDragThumbPos = (clampedValue - ((ScrollBar)this.getSkinnable()).getMin()) / (((ScrollBar)this.getSkinnable()).getMax() - ((ScrollBar)this.getSkinnable()).getMin());
  319.                 se.consume();
  320.             }
  321.  
  322.         });
  323.         this.thumb.setOnScroll((event) -> {
  324.             if (event.isDirect() && ((ScrollBar)this.getSkinnable()).getMax() > ((ScrollBar)this.getSkinnable()).getMin()) {
  325.                 if (this.trackLength > this.thumbLength) {
  326.                     Point2D cur = this.thumb.localToParent(event.getX(), event.getY());
  327.                     if (this.dragStart == null) {
  328.                         this.dragStart = this.thumb.localToParent(event.getX(), event.getY());
  329.                     }
  330.  
  331.                     double dragPos = ((ScrollBar)this.getSkinnable()).getOrientation() == Orientation.VERTICAL ? cur.getY() - this.dragStart.getY() : cur.getX() - this.dragStart.getX();
  332.                     this.behavior.thumbDragged(this.preDragThumbPos + dragPos / (this.trackLength - this.thumbLength));
  333.                 }
  334.  
  335.                 event.consume();
  336.             }
  337.         });
  338.         ((ScrollBar)this.getSkinnable()).addEventHandler(ScrollEvent.SCROLL, (event) -> {
  339.             if (this.trackLength > this.thumbLength) {
  340.                 double dx = event.getDeltaX();
  341.                 double dy = event.getDeltaY();
  342.                 dx = Math.abs(dx) < Math.abs(dy) ? dy : dx;
  343.                 ScrollBar sb = (ScrollBar)this.getSkinnable();
  344.                 double delta = ((ScrollBar)this.getSkinnable()).getOrientation() == Orientation.VERTICAL ? dy : dx;
  345.                 if (event.isDirect()) {
  346.                     if (this.trackLength > this.thumbLength) {
  347.                         this.behavior.thumbDragged((((ScrollBar)this.getSkinnable()).getOrientation() == Orientation.VERTICAL ? event.getY() : event.getX()) / this.trackLength);
  348.                         event.consume();
  349.                     }
  350.                 } else if (delta > 0.0D && sb.getValue() > sb.getMin()) {
  351.                     sb.decrement();
  352.                     event.consume();
  353.                 } else if (delta < 0.0D && sb.getValue() < sb.getMax()) {
  354.                     sb.increment();
  355.                     event.consume();
  356.                 }
  357.             }
  358.  
  359.         });
  360.         this.getChildren().clear();
  361.         if (!Properties.IS_TOUCH_SUPPORTED) {
  362.             this.getChildren().addAll(new Node[]{this.trackBackground, this.incButton, this.decButton, this.track, this.thumb});
  363.         } else {
  364.             this.getChildren().addAll(new Node[]{this.track, this.thumb});
  365.         }
  366.  
  367.     }
  368.  
  369.     double getBreadth() {
  370.         if (!Properties.IS_TOUCH_SUPPORTED) {
  371.             return ((ScrollBar)this.getSkinnable()).getOrientation() == Orientation.VERTICAL ? Math.max(this.decButton.prefWidth(-1.0D), this.incButton.prefWidth(-1.0D)) + this.snappedLeftInset() + this.snappedRightInset() : Math.max(this.decButton.prefHeight(-1.0D), this.incButton.prefHeight(-1.0D)) + this.snappedTopInset() + this.snappedBottomInset();
  372.         } else {
  373.             return ((ScrollBar)this.getSkinnable()).getOrientation() == Orientation.VERTICAL ? Math.max(8.0D, 8.0D) + this.snappedLeftInset() + this.snappedRightInset() : Math.max(8.0D, 8.0D) + this.snappedTopInset() + this.snappedBottomInset();
  374.         }
  375.     }
  376.  
  377.     double minThumbLength() {
  378.         return 1.5D * this.getBreadth();
  379.     }
  380.  
  381.     double minTrackLength() {
  382.         return 2.0D * this.getBreadth();
  383.     }
  384.  
  385.     void positionThumb() {
  386.         ScrollBar s = (ScrollBar)this.getSkinnable();
  387.         double clampedValue = Utils.clamp(s.getMin(), s.getValue(), s.getMax());
  388.         this.trackPos = s.getMax() - s.getMin() > 0.0D ? (this.trackLength - this.thumbLength) * (clampedValue - s.getMin()) / (s.getMax() - s.getMin()) : 0.0D;
  389.         if (!Properties.IS_TOUCH_SUPPORTED) {
  390.             if (s.getOrientation() == Orientation.VERTICAL) {
  391.                 this.trackPos += this.decButton.prefHeight(-1.0D);
  392.             } else {
  393.                 this.trackPos += this.decButton.prefWidth(-1.0D);
  394.             }
  395.         }
  396.  
  397.         this.thumb.setTranslateX(this.snapPositionX(s.getOrientation() == Orientation.VERTICAL ? this.snappedLeftInset() : this.trackPos + this.snappedLeftInset()));
  398.         this.thumb.setTranslateY(this.snapPositionY(s.getOrientation() == Orientation.VERTICAL ? this.trackPos + this.snappedTopInset() : this.snappedTopInset()));
  399.     }
  400.  
  401.     private Node getThumb() {
  402.         return this.thumb;
  403.     }
  404.  
  405.     private Node getTrack() {
  406.         return this.track;
  407.     }
  408.  
  409.     private Node getIncrementButton() {
  410.         return this.incButton;
  411.     }
  412.  
  413.     private Node getDecrementButton() {
  414.         return this.decButton;
  415.     }
  416.  
  417.     private static class EndButton extends Region {
  418.         private Region arrow;
  419.  
  420.         private EndButton(String styleClass, String arrowStyleClass) {
  421.             this.getStyleClass().setAll(new String[]{styleClass});
  422.             this.arrow = new Region();
  423.             this.arrow.getStyleClass().setAll(new String[]{arrowStyleClass});
  424.             this.getChildren().setAll(new Node[]{this.arrow});
  425.             this.requestLayout();
  426.         }
  427.  
  428.         protected void layoutChildren() {
  429.             double top = this.snappedTopInset();
  430.             double left = this.snappedLeftInset();
  431.             double bottom = this.snappedBottomInset();
  432.             double right = this.snappedRightInset();
  433.             double aw = this.snapSizeX(this.arrow.prefWidth(-1.0D));
  434.             double ah = this.snapSizeY(this.arrow.prefHeight(-1.0D));
  435.             double yPos = this.snapPositionY((this.getHeight() - (top + bottom + ah)) / 2.0D);
  436.             double xPos = this.snapPositionX((this.getWidth() - (left + right + aw)) / 2.0D);
  437.             this.arrow.resizeRelocate(xPos + left, yPos + top, aw, ah);
  438.         }
  439.  
  440.         protected double computeMinHeight(double width) {
  441.             return this.prefHeight(-1.0D);
  442.         }
  443.  
  444.         protected double computeMinWidth(double height) {
  445.             return this.prefWidth(-1.0D);
  446.         }
  447.  
  448.         protected double computePrefWidth(double height) {
  449.             double left = this.snappedLeftInset();
  450.             double right = this.snappedRightInset();
  451.             double aw = this.snapSizeX(this.arrow.prefWidth(-1.0D));
  452.             return left + aw + right;
  453.         }
  454.  
  455.         protected double computePrefHeight(double width) {
  456.             double top = this.snappedTopInset();
  457.             double bottom = this.snappedBottomInset();
  458.             double ah = this.snapSizeY(this.arrow.prefHeight(-1.0D));
  459.             return top + ah + bottom;
  460.         }
  461.     }
  462. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top