public class AlgorithmHelper
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MIN_NODE_SIZE |
static double |
PADDING_PERCENT |
| Constructor and Description |
|---|
AlgorithmHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
fitWithinBounds(IEntityLayout[] entities,
Rectangle destinationBounds,
boolean resize)
Fits given entities within given bounds, preserving their relative
locations.
|
static Rectangle |
getLayoutBounds(IEntityLayout[] entities,
boolean includeNodeSize)
Find the bounds in which the nodes are located.
|
static Dimension |
getMinimumDistance(IEntityLayout[] entities)
minDistance is the closest that any two points are together.
|
static void |
maximizeSizes(IEntityLayout[] entities)
Resizes the nodes so that they have a maximal area without overlapping
each other, with additional empty space of 20% of node's width (or
height, if bigger).
|
public static int MIN_NODE_SIZE
public static double PADDING_PERCENT
public static void fitWithinBounds(IEntityLayout[] entities, Rectangle destinationBounds, boolean resize)
entities - destinationBounds - resize - public static void maximizeSizes(IEntityLayout[] entities)
entities - public static Rectangle getLayoutBounds(IEntityLayout[] entities, boolean includeNodeSize)
public static Dimension getMinimumDistance(IEntityLayout[] entities)
_______
| |
| |
| + |
| |\ |
|___|_\_|_____
| | \ |
| | \ |
+-|---+ |
| |
|_______|
Copyright (c) 2014 itemis AG and others. All rights reserved.