public void setDirection(int direction) { this.direction = new AlignmentInfo(direction); }
@Override public void setComponentAlignment(Component childComponent, Alignment alignment) { ChildComponentData childComponentData = getState().childData .get(childComponent); if (childComponentData == null) { throw new IllegalArgumentException( "Component must be added to layout before using setComponentAlignment()"); } else { if (alignment == null) { childComponentData.alignment = GridLayoutState.ALIGNMENT_DEFAULT .getBitMask(); } else { childComponentData.alignment = alignment.getBitMask(); } } }
if (!alignment.isLeft()) { double usedWidth; if (isRelativeWidth()) { usedWidth = getWidgetWidth() + indicatorsWidth; if (alignment.isHorizontalCenter()) { currentLocation += (allocatedSpace - usedWidth) / 2d; if (captionAboveComponent) {
if (!alignment.isTop()) { double usedHeight; if (isRelativeHeight()) { usedHeight = getUsedHeight(); if (alignment.isVerticalCenter()) { currentLocation += (allocatedSpace - usedHeight) / 2d; } else {
if (direction.isHorizontalCenter()) { left -= (popup.getOffsetWidth() - getPopupPositionWidget().getOffsetWidth()) / 2; } else if (direction.isLeft()) { left -= popup.getOffsetWidth() - getPopupPositionWidget().getOffsetWidth();
if (direction.isHorizontalCenter()) { left -= (popup.getOffsetWidth() - getPopupPositionWidget().getOffsetWidth()) / 2; } else if (direction.isLeft()) { left -= popup.getOffsetWidth() - getPopupPositionWidget().getOffsetWidth();
public void setDirection(int direction) { this.direction = new AlignmentInfo(direction); }
if (direction.isHorizontalCenter()) { left -= (popup.getOffsetWidth() - getPopupPositionWidget().getOffsetWidth()) / 2; } else if (direction.isLeft()) { left -= popup.getOffsetWidth() - getPopupPositionWidget().getOffsetWidth();
public void setDirection(int direction) { this.direction = new AlignmentInfo(direction); }