public static LayoutConstraintsDescriptor createLayoutConstraintsDescriptor(LayoutConstraintsType layoutConstraints) { return LayoutConstraintsDescriptor.getLayoutConstraints(layoutConstraints.getPrefWidth(), layoutConstraints.getPrefHeight()); }
private void recalculateLayoutConstraints() { double prefWidth = 0; double prefHeight = 0; for (DockingSplitPaneChildBase child : dockingSplitPaneChildren) { LayoutConstraintsDescriptor childLayoutConstraints = child.getLayoutConstraints(); if (LayoutConstraintsDescriptor.isPreferred(prefWidth) && (LayoutConstraintsDescriptor.isFlexible(childLayoutConstraints.getPrefWidth()) || childLayoutConstraints.getPrefWidth() > prefWidth)) { prefWidth = childLayoutConstraints.getPrefWidth(); } if (LayoutConstraintsDescriptor.isPreferred(prefHeight) && (LayoutConstraintsDescriptor.isFlexible(childLayoutConstraints.getPrefHeight()) || childLayoutConstraints.getPrefHeight() > prefHeight)) { prefHeight = childLayoutConstraints.getPrefHeight(); } if (LayoutConstraintsDescriptor.isFlexible(prefWidth) && LayoutConstraintsDescriptor.isFlexible(prefHeight)) { break; } } final LayoutConstraintsDescriptor layoutConstraintsDescriptor = LayoutConstraintsDescriptor.getLayoutConstraints(prefWidth, prefHeight); setLayoutConstraints(layoutConstraintsDescriptor); }