// Path: src/main/java/com/github/haixing_hu/javafx/geometry/Size.java
// public class Size {
// 
//   public double width;
// 
//   public double height;
// 
//   public Size() {
//     width = 0;
//     height = 0;
//   }
// 
//   public Size(double width, double height) {
//     this.width = width;
//     this.height = height;
//   }
// 
//   @Override
//   public int hashCode() {
//     final int prime = 31;
//     int result = 1;
//     long temp;
//     temp = Double.doubleToLongBits(height);
//     result = (prime * result) + (int) (temp ^ (temp >>> 32));
//     temp = Double.doubleToLongBits(width);
//     result = (prime * result) + (int) (temp ^ (temp >>> 32));
//     return result;
//   }
// 
//   @Override
//   public boolean equals(Object obj) {
//     if (this == obj) {
//       return true;
//     }
//     if (obj == null) {
//       return false;
//     }
//     if (getClass() != obj.getClass()) {
//       return false;
//     }
//     final Size other = (Size) obj;
//     if (Double.doubleToLongBits(height) != Double
//         .doubleToLongBits(other.height)) {
//       return false;
//     }
//     if (Double.doubleToLongBits(width) != Double.doubleToLongBits(other.width)) {
//       return false;
//     }
//     return true;
//   }
// 
//   @Override
//   public String toString() {
//     return "Size [width=" + width + ", height=" + height + "]";
//   }
// 
// }


import javafx.scene.Node;
import com.github.haixing_hu.javafx.geometry.Size;
import static javafx.scene.layout.Region.USE_COMPUTED_SIZE;
/******************************************************************************
 *
 * Copyright (c) 2014  Haixing Hu
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Haixing Hu (https://github.com/Haixing-Hu/) - Initial implementation and API.
 *
 ******************************************************************************/

package com.github.haixing_hu.javafx.pane;




/**
 * The layout data of the {@link FillPane}.
 *
 * @author Haixing Hu
 */
class FillData {

  double defaultWidth = - 1;
  double defaultHeight = - 1;
  double currentWhint;
  double currentHhint;
  double currentWidth = - 1;
  double currentHeight = - 1;

// Path: src/main/java/com/github/haixing_hu/javafx/geometry/Size.java
// public class Size {
// 
//   public double width;
// 
//   public double height;
// 
//   public Size() {
//     width = 0;
//     height = 0;
//   }
// 
//   public Size(double width, double height) {
//     this.width = width;
//     this.height = height;
//   }
// 
//   @Override
//   public int hashCode() {
//     final int prime = 31;
//     int result = 1;
//     long temp;
//     temp = Double.doubleToLongBits(height);
//     result = (prime * result) + (int) (temp ^ (temp >>> 32));
//     temp = Double.doubleToLongBits(width);
//     result = (prime * result) + (int) (temp ^ (temp >>> 32));
//     return result;
//   }
// 
//   @Override
//   public boolean equals(Object obj) {
//     if (this == obj) {
//       return true;
//     }
//     if (obj == null) {
//       return false;
//     }
//     if (getClass() != obj.getClass()) {
//       return false;
//     }
//     final Size other = (Size) obj;
//     if (Double.doubleToLongBits(height) != Double
//         .doubleToLongBits(other.height)) {
//       return false;
//     }
//     if (Double.doubleToLongBits(width) != Double.doubleToLongBits(other.width)) {
//       return false;
//     }
//     return true;
//   }
// 
//   @Override
//   public String toString() {
//     return "Size [width=" + width + ", height=" + height + "]";
//   }
// 
// }


// Path: src/main/java/com/github/haixing_hu/javafx/pane/FillData.java
import javafx.scene.Node;
import com.github.haixing_hu.javafx.geometry.Size;
import static javafx.scene.layout.Region.USE_COMPUTED_SIZE;

/******************************************************************************
 *
 * Copyright (c) 2014  Haixing Hu
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Haixing Hu (https://github.com/Haixing-Hu/) - Initial implementation and API.
 *
 ******************************************************************************/

package com.github.haixing_hu.javafx.pane;




/**
 * The layout data of the {@link FillPane}.
 *
 * @author Haixing Hu
 */
class FillData {

  double defaultWidth = - 1;
  double defaultHeight = - 1;
  double currentWhint;
  double currentHhint;
  double currentWidth = - 1;
  double currentHeight = - 1;

  Size computeSize(Node control, double wHint, double hHint, boolean flushCache) {