| /** |
| * |
| * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Florian Pirchner <florian.pirchner@gmail.com> - Initial implementation |
| */ |
| package org.eclipse.osbp.vaadin.addons.designer.overlay.client.widgets; |
| |
| // TODO: Auto-generated Javadoc |
| /** |
| * Alignment enum with FILL literals. |
| */ |
| public enum AlignmentInfo { |
| |
| /** The bottom left. */ |
| BOTTOM_LEFT, |
| /** The bottom center. */ |
| BOTTOM_CENTER, |
| /** The bottom right. */ |
| BOTTOM_RIGHT, |
| /** The bottom fill. */ |
| BOTTOM_FILL, |
| /** The middle left. */ |
| MIDDLE_LEFT, |
| /** The middle center. */ |
| MIDDLE_CENTER, |
| /** The middle right. */ |
| MIDDLE_RIGHT, |
| /** The middle fill. */ |
| MIDDLE_FILL, |
| /** The top left. */ |
| TOP_LEFT, |
| /** The top center. */ |
| TOP_CENTER, |
| /** The top right. */ |
| TOP_RIGHT, |
| /** The top fill. */ |
| TOP_FILL, |
| /** The fill fill. */ |
| FILL_FILL, |
| /** The fill left. */ |
| FILL_LEFT, |
| /** The fill center. */ |
| FILL_CENTER, |
| /** The fill right. */ |
| FILL_RIGHT; |
| |
| /** |
| * Checks if is top. |
| * |
| * @return true, if is top |
| */ |
| public boolean isTop() { |
| return this == TOP_LEFT || this == TOP_CENTER || this == TOP_RIGHT || this == TOP_FILL; |
| } |
| |
| /** |
| * Checks if is middle. |
| * |
| * @return true, if is middle |
| */ |
| public boolean isMiddle() { |
| return this == MIDDLE_LEFT || this == MIDDLE_CENTER || this == MIDDLE_RIGHT || this == MIDDLE_FILL; |
| } |
| |
| /** |
| * Checks if is bottom. |
| * |
| * @return true, if is bottom |
| */ |
| public boolean isBottom() { |
| return this == BOTTOM_LEFT || this == BOTTOM_CENTER || this == BOTTOM_RIGHT || this == BOTTOM_FILL; |
| } |
| |
| /** |
| * Checks if is left. |
| * |
| * @return true, if is left |
| */ |
| public boolean isLeft() { |
| return this == TOP_LEFT || this == MIDDLE_LEFT || this == BOTTOM_LEFT || this == FILL_LEFT; |
| } |
| |
| /** |
| * Checks if is center. |
| * |
| * @return true, if is center |
| */ |
| public boolean isCenter() { |
| return this == TOP_CENTER || this == MIDDLE_CENTER || this == BOTTOM_CENTER || this == FILL_CENTER; |
| } |
| |
| /** |
| * Checks if is right. |
| * |
| * @return true, if is right |
| */ |
| public boolean isRight() { |
| return this == TOP_RIGHT || this == MIDDLE_RIGHT || this == BOTTOM_RIGHT || this == FILL_RIGHT; |
| } |
| |
| /** |
| * Checks if is horizontal fill. |
| * |
| * @return true, if is horizontal fill |
| */ |
| public boolean isHorizontalFill() { |
| return this == TOP_FILL || this == MIDDLE_FILL || this == BOTTOM_FILL || this == FILL_FILL; |
| } |
| |
| /** |
| * Checks if is vertical fill. |
| * |
| * @return true, if is vertical fill |
| */ |
| public boolean isVerticalFill() { |
| return this == FILL_LEFT || this == FILL_CENTER || this == FILL_RIGHT || this == FILL_FILL; |
| } |
| } |