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


Java PPickPath.getPickedNode方法代码示例

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


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

示例1: fullPick

import org.piccolo2d.util.PPickPath; //导入方法依赖的package包/类
/**
 * Return true if this node or any pickable descendants are picked. If a
 * pick occurs the pickPath is modified so that this node is always returned
 * as the picked node, event if it was a descendant node that initially
 * reported the pick.
 * 
 * @param pickPath the pick path to add the nodes to if they are picked
 * @return true if this node or one of its descendants was picked
 */
public boolean fullPick(final PPickPath pickPath) {
    if (super.fullPick(pickPath)) {
        PNode picked = pickPath.getPickedNode();

        // this code won't work with internal cameras, because it doesn't
        // pop the cameras view transform.
        while (picked != this) {
            pickPath.popTransform(picked.getTransformReference(false));
            pickPath.popNode(picked);
            picked = pickPath.getPickedNode();
        }

        return true;
    }
    return false;
}
 
开发者ID:piccolo2d,项目名称:piccolo2d.java,代码行数:26,代码来源:PComposite.java

示例2: mouseExited

import org.piccolo2d.util.PPickPath; //导入方法依赖的package包/类
/**
 * When mouse leaves, pop cursor from stack.
 * 
 * @param aEvent the mouse exited event
 */
public void mouseExited(final PInputEvent aEvent) {
    if (cursorPushed) {
        final PPickPath focus = aEvent.getInputManager().getMouseFocus();

        if (focus == null || focus.getPickedNode() != PBoundsHandle.this) {
            aEvent.popCursor();
            cursorPushed = false;
        }
    }
}
 
开发者ID:piccolo2d,项目名称:piccolo2d.java,代码行数:16,代码来源:PBoundsHandle.java

示例3: getPickedNode

import org.piccolo2d.util.PPickPath; //导入方法依赖的package包/类
/**
 * Returns picked node on pickPath if pickPath is not null, or null.
 * 
 * @param pickPath from which to extract picked node
 * 
 * @return the picked node or null if pickPath is null
 */
private PNode getPickedNode(final PPickPath pickPath) {
    if (pickPath == null) {
        return null;
    }
    else {
        return pickPath.getPickedNode();
    }
}
 
开发者ID:piccolo2d,项目名称:piccolo2d.java,代码行数:16,代码来源:PInputManager.java

示例4: isNewFocus

import org.piccolo2d.util.PPickPath; //导入方法依赖的package包/类
private boolean isNewFocus(final PPickPath focus) {
    return (focus == null || focus.getPickedNode() != PSWTBoundsHandle.this);
}
 
开发者ID:piccolo2d,项目名称:piccolo2d.java,代码行数:4,代码来源:PSWTBoundsHandle.java

示例5: getPickedNode

import org.piccolo2d.util.PPickPath; //导入方法依赖的package包/类
private PNode getPickedNode(Point2D pos, PCamera cam){
	final PPickPath p = cam.pick(pos.getX(), pos.getY(), 1);
	if(p==null)
		return null;
	return p.getPickedNode();
}
 
开发者ID:clearlyspam23,项目名称:JAnGLE,代码行数:7,代码来源:TileDragCommand.java


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