use of org.apache.pivot.wtk.VerticalAlignment in project pivot by apache.
the class BoxPanes method updateBoxPaneState.
private void updateBoxPaneState() {
Orientation orientation = null;
if (horizontalOrientationButton.isSelected()) {
orientation = Orientation.HORIZONTAL;
} else if (verticalOrientationButton.isSelected()) {
orientation = Orientation.VERTICAL;
}
if (orientation != null) {
boxPane.setOrientation(orientation);
}
HorizontalAlignment horizontalAlignment = null;
if (horizontalAlignmentLeftButton.isSelected()) {
horizontalAlignment = HorizontalAlignment.LEFT;
} else if (horizontalAlignmentRightButton.isSelected()) {
horizontalAlignment = HorizontalAlignment.RIGHT;
} else if (horizontalAlignmentCenterButton.isSelected()) {
horizontalAlignment = HorizontalAlignment.CENTER;
}
if (horizontalAlignment != null) {
boxPane.getStyles().put(Style.horizontalAlignment, horizontalAlignment);
}
VerticalAlignment verticalAlignment = null;
if (verticalAlignmentTopButton.isSelected()) {
verticalAlignment = VerticalAlignment.TOP;
} else if (verticalAlignmentBottomButton.isSelected()) {
verticalAlignment = VerticalAlignment.BOTTOM;
} else if (verticalAlignmentCenterButton.isSelected()) {
verticalAlignment = VerticalAlignment.CENTER;
}
if (verticalAlignment != null) {
boxPane.getStyles().put(Style.verticalAlignment, verticalAlignment);
}
boxPane.getStyles().put(Style.fill, fillCheckbox.isSelected());
}
Aggregations