Package org.eclipse.wb.draw2d

Examples of org.eclipse.wb.draw2d.RelativeLocator


   * @return {@link ILocator} that positions handles on component side.
   */
  private final ILocator createComponentLocator(int direction, double percent) {
    Figure reference = getHostFigure();
    if (direction == IPositionConstants.WEST) {
      return new RelativeLocator(reference, 0, percent);
    } else if (direction == IPositionConstants.EAST) {
      return new RelativeLocator(reference, 1, percent);
    } else if (direction == IPositionConstants.NORTH) {
      return new RelativeLocator(reference, percent, 0);
    } else if (direction == IPositionConstants.SOUTH) {
      return new RelativeLocator(reference, percent, 1);
    }
    throw new IllegalArgumentException("Unknown direction: " + direction);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.wb.draw2d.RelativeLocator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.