13
13
import java .util .Arrays ;
14
14
import java .util .Collections ;
15
15
import java .util .Comparator ;
16
- import java .util .EnumSet ;
17
16
import java .util .LinkedList ;
18
17
import java .util .List ;
19
18
import java .util .ListIterator ;
20
19
import java .util .PriorityQueue ;
21
20
import java .util .Queue ;
22
- import java .util .Set ;
23
21
24
22
import org .eclipse .elk .core .AbstractLayoutProvider ;
25
23
import org .eclipse .elk .core .math .ElkPadding ;
26
24
import org .eclipse .elk .core .math .KVector ;
27
25
import org .eclipse .elk .core .options .BoxLayouterOptions ;
28
- import org .eclipse .elk .core .options .ContentAlignment ;
29
26
import org .eclipse .elk .core .options .CoreOptions ;
30
27
import org .eclipse .elk .graph .ElkNode ;
31
28
55
52
*/
56
53
public class BoxLayoutProvider extends AbstractLayoutProvider {
57
54
58
- public static final Set <ContentAlignment > DEFAULT_ALIGNMENT =
59
- EnumSet .of (ContentAlignment .H_CENTER , ContentAlignment .V_TOP );
60
-
61
55
/** default value for aspect ratio. */
62
56
public static final double DEF_ASPECT_RATIO = 1.3 ;
63
57
@@ -70,8 +64,6 @@ public void layout(final ElkNode layoutNode, final IElkProgressMonitor progressM
70
64
boolean expandNodes = layoutNode .getProperty (BoxLayouterOptions .EXPAND_NODES );
71
65
boolean interactive = layoutNode .getProperty (BoxLayouterOptions .INTERACTIVE );
72
66
73
- // Set custom default for content alignment.
74
-
75
67
switch (layoutNode .getProperty (BoxLayouterOptions .BOX_PACKING_MODE )) {
76
68
case SIMPLE :
77
69
placeBoxes (layoutNode , objSpacing , padding , expandNodes , interactive );
@@ -268,8 +260,7 @@ private KVector placeBoxes(final List<ElkNode> sortedBoxes, final double minSpac
268
260
double oldWidth = box .getWidth ();
269
261
box .setWidth (newWidth );
270
262
// Content alignment
271
- ElkUtil .translate (box , new KVector (newWidth , newHeight ), new KVector (oldWidth , oldHeight ),
272
- DEFAULT_ALIGNMENT );
263
+ ElkUtil .translate (box , new KVector (newWidth , newHeight ), new KVector (oldWidth , oldHeight ));
273
264
}
274
265
xpos += box .getWidth () + minSpacing ;
275
266
}
0 commit comments