| /** |
| * |
| * 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.absolutelayout.client; |
| |
| // TODO: Auto-generated Javadoc |
| /** |
| * The Enum OResizeLocation. |
| */ |
| public enum OResizeLocation { |
| |
| /** The top left. */ |
| TOP_LEFT, |
| /** The top. */ |
| TOP, |
| /** The top right. */ |
| TOP_RIGHT, |
| /** The right. */ |
| RIGHT, |
| /** The bottom right. */ |
| BOTTOM_RIGHT, |
| /** The bottom. */ |
| BOTTOM, |
| /** The bottom left. */ |
| BOTTOM_LEFT, |
| /** The left. */ |
| LEFT; |
| |
| /** |
| * Checks if is top. |
| * |
| * @return true, if is top |
| */ |
| public boolean isTop(){ |
| return this == OResizeLocation.TOP_LEFT || this == OResizeLocation.TOP || this == OResizeLocation.TOP_RIGHT; |
| } |
| |
| /** |
| * Checks if is bottom. |
| * |
| * @return true, if is bottom |
| */ |
| public boolean isBottom(){ |
| return this == OResizeLocation.BOTTOM_LEFT || this == OResizeLocation.BOTTOM || this == OResizeLocation.BOTTOM_RIGHT; |
| } |
| |
| /** |
| * Checks if is left. |
| * |
| * @return true, if is left |
| */ |
| public boolean isLeft(){ |
| return this == OResizeLocation.TOP_LEFT || this == OResizeLocation.LEFT || this == OResizeLocation.BOTTOM_LEFT; |
| } |
| |
| /** |
| * Checks if is right. |
| * |
| * @return true, if is right |
| */ |
| public boolean isRight(){ |
| return this == OResizeLocation.TOP_RIGHT || this == OResizeLocation.RIGHT || this == OResizeLocation.BOTTOM_RIGHT; |
| } |
| |
| /** |
| * Checks if is y. |
| * |
| * @return true, if is y |
| */ |
| public boolean isY(){ |
| return isTop() || isBottom(); |
| } |
| |
| /** |
| * Checks if is x. |
| * |
| * @return true, if is x |
| */ |
| public boolean isX(){ |
| return isLeft() || isRight(); |
| } |
| } |
| |