當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。