当前位置: 首页>>代码示例>>Java>>正文


Java PositionConstants.NONE属性代码示例

本文整理汇总了Java中org.eclipse.draw2d.PositionConstants.NONE属性的典型用法代码示例。如果您正苦于以下问题:Java PositionConstants.NONE属性的具体用法?Java PositionConstants.NONE怎么用?Java PositionConstants.NONE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.eclipse.draw2d.PositionConstants的用法示例。


在下文中一共展示了PositionConstants.NONE属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createSelectionHandles

/**
 * This method override the ResizableEditPolicy createSelectionHandle(). It's identical to 3.7 and later methods, but
 * different from previous versions. In this way the behavior of this handle under eclipse 3.6 and eclipse 3.7+ is
 * uniformed
 */
@Override
protected List createSelectionHandles() {
	if (getResizeDirections() == PositionConstants.NONE) {
		// non resizable, so delegate to super implementation
		return super.createSelectionHandles();
	}

	// resizable in at least one direction
	List list = new ArrayList();
	createMoveHandle(list);
	createResizeHandle(list, PositionConstants.NORTH);
	createResizeHandle(list, PositionConstants.EAST);
	createResizeHandle(list, PositionConstants.SOUTH);
	createResizeHandle(list, PositionConstants.WEST);
	createResizeHandle(list, PositionConstants.SOUTH_EAST);
	createResizeHandle(list, PositionConstants.SOUTH_WEST);
	createResizeHandle(list, PositionConstants.NORTH_WEST);
	createResizeHandle(list, PositionConstants.NORTH_EAST);
	return list;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:25,代码来源:ElementResizableEditPolicy.java

示例2: createSelectionHandles

/**
 * @see org.eclipse.gef.editpolicies.SelectionHandlesEditPolicy#createSelectionHandles()
 */
protected List createSelectionHandles() {
	if (resizeDirections == PositionConstants.NONE) {
		// non resizable, so delegate to super implementation
		return super.createSelectionHandles();
	}

	// resizable in at least one direction
	List list = new ArrayList();
	createMoveHandle(list);
	createResizeHandle(list, PositionConstants.NORTH);
	createResizeHandle(list, PositionConstants.EAST);
	createResizeHandle(list, PositionConstants.SOUTH);
	createResizeHandle(list, PositionConstants.WEST);
	createResizeHandle(list, PositionConstants.SOUTH_EAST);
	createResizeHandle(list, PositionConstants.SOUTH_WEST);
	createResizeHandle(list, PositionConstants.NORTH_WEST);
	createResizeHandle(list, PositionConstants.NORTH_EAST);
	return list;
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:22,代码来源:ResizableEditPolicy.java

示例3: getPosition

/**
 * <P>
 * Returns an integer which represents the position of the given point with
 * respect to this rectangle. Possible return values are bitwise ORs of the
 * constants WEST, EAST, NORTH, and SOUTH as found in
 * {@link org.eclipse.draw2d.PositionConstants}.
 * 
 * <P>
 * Returns PositionConstant.NONE if the given point is inside this
 * Rectangle.
 * 
 * @param p
 *            The Point whose position has to be determined
 * @return An <code>int</code> which is a PositionConstant
 * @see org.eclipse.draw2d.PositionConstants
 * @since 2.0
 */
public int getPosition(Point p) {
	int result = PositionConstants.NONE;

	if (contains(p))
		return result;

	if (p.x() < x)
		result = PositionConstants.WEST;
	else if (p.x() >= (x + width))
		result = PositionConstants.EAST;

	if (p.y() < y)
		result = result | PositionConstants.NORTH;
	else if (p.y() >= (y + height))
		result = result | PositionConstants.SOUTH;

	return result;
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:35,代码来源:Rectangle.java

示例4: createSelectionHandles

@Override
protected List createSelectionHandles() {
	if (getResizeDirections() == PositionConstants.NONE) {
		// non resizable, so delegate to super implementation
		return super.createSelectionHandles();
	}

	// resizable in at least one direction
	List list = new ArrayList();
	createMoveHandle(list);
	return list;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:12,代码来源:PinMoveEditPolicy.java

示例5: createSelectionHandles

@Override
protected List<?> createSelectionHandles() {
	if (getResizeDirections() == PositionConstants.NONE) {
		// non resizable, so delegate to super implementation
		return super.createSelectionHandles();
	}

	// resizable in at least one direction
	List<?> list = new ArrayList();
	createMoveHandle(list);
	createResizeHandle(list, PositionConstants.SOUTH_EAST);
	return list;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:13,代码来源:CalloutElementResizableEditPolicy.java

示例6: getHorizontalAligment

/**
 * Returns the effective horizontal alignment. This method will never return
 * {@link PositionConstants#NONE}. If the value is none, it will return the
 * inherited alignment. If no alignment was inherited, it will return the
 * default alignment ({@link PositionConstants#LEFT}).
 * 
 * @return the effective alignment
 */
public int getHorizontalAligment() {
	if (alignment != PositionConstants.NONE)
		return alignment;
	IFigure parent = getParent();
	while (parent != null && !(parent instanceof BlockFlow))
		parent = parent.getParent();
	if (parent != null)
		return ((BlockFlow) parent).getHorizontalAligment();
	return PositionConstants.LEFT;
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:18,代码来源:BlockFlow.java


注:本文中的org.eclipse.draw2d.PositionConstants.NONE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。