Package javafx.geometry

Examples of javafx.geometry.BoundingBox


  private void setRectangle(MUIElement node, Bounds bounds) {
    if (node.widget instanceof Node) {
      Node ctrl = (Node) node.widget;
      ctrl.resizeRelocate(bounds.getMinX(), bounds.getMinY(), bounds.getWidth(), bounds.getHeight());
    } else if (node instanceof MGenericTile) {
      Bounds newRect = new BoundingBox(bounds.getMinX(), bounds.getMinY(), bounds.getWidth(),
          bounds.getHeight());
      node.widget = newRect;
    }
  }
View Full Code Here


    MUIElement prev = null;
    for (MUIElement subNode : visibleChildren) {
      // Add a 'sash' between this node and the 'prev'
      if (prev != null) {
        Bounds sashRect = sashContainer.horizontal ? new BoundingBox(
            tilePos, bounds.getMinY(), sashWidth.get(), bounds.getHeight())
            : new BoundingBox(bounds.getMinX(), tilePos, bounds.getWidth(),
                sashWidth.get());
        sashes.add(new SashRect(sashRect, sashContainer, prev, subNode));
        tilePos += sashWidth.get();
      }

      // Calc the new size as a %'age of the total
      double ratio = getWeight(subNode) / totalWeight;
      double newSize = availableWidth * ratio;
     
      Bounds subBounds = sashContainer.horizontal ? new BoundingBox(
          tilePos, bounds.getMinY(), newSize, bounds.getHeight()) : new BoundingBox(
          bounds.getMinX(), tilePos, bounds.getWidth(), newSize);
         
         
      tilePos += newSize;

View Full Code Here

TOP

Related Classes of javafx.geometry.BoundingBox

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.