Examples of DisplayIndependentDimension


Examples of org.eclipse.zest.layouts.dataStructures.DisplayIndependentDimension

    double width, height;
    if (entitiesToLayout.length == 1) {
      width = 0.8;
      height = 0.8;
    } else {
      DisplayIndependentDimension minimumDistance = getMinimumDistance(entitiesToLayout);
      width = 0.8 * minimumDistance.width;
      height = 0.8 * minimumDistance.height;
    }
    return Math.max(width, height);
  }
View Full Code Here

Examples of org.eclipse.zest.layouts.dataStructures.DisplayIndependentDimension

   *
   * 
   *
   */
  private DisplayIndependentDimension getMinimumDistance(InternalNode[] entitiesToLayout) {
    DisplayIndependentDimension horAndVertdistance = new DisplayIndependentDimension(Double.MAX_VALUE, Double.MAX_VALUE);
    double minDistance = Double.MAX_VALUE; // the minimum distance between all the nodes
    //TODO: Very Slow!
    for (int i = 0; i < entitiesToLayout.length; i++) {
      InternalNode layoutEntity1 = entitiesToLayout[i];
      double x1 = layoutEntity1.getInternalX();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.