本文整理汇总了Java中edu.umd.cs.piccolo.PNode.fullPick方法的典型用法代码示例。如果您正苦于以下问题:Java PNode.fullPick方法的具体用法?Java PNode.fullPick怎么用?Java PNode.fullPick使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.umd.cs.piccolo.PNode
的用法示例。
在下文中一共展示了PNode.fullPick方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fullPick
import edu.umd.cs.piccolo.PNode; //导入方法依赖的package包/类
public boolean fullPick( PPickPath pickPath ) {
if ( !clipEnabled ) {
return super.fullPick( pickPath );
}
if ( getPickable() && fullIntersects( pickPath.getPickBounds() ) ) {
pickPath.pushNode( this );
pickPath.pushTransform( getTransformReference( false ) );
if ( pick( pickPath ) ) {
return true;
}
if ( getChildrenPickable() && getPathReference().intersects( pickPath.getPickBounds() ) ) {
int count = getChildrenCount();
for ( int i = count - 1; i >= 0; i-- ) {
PNode each = getChild( i );
if ( each.fullPick( pickPath ) ) {
return true;
}
}
}
if ( pickAfterChildren( pickPath ) ) {
return true;
}
pickPath.popTransform( getTransformReference( false ) );
pickPath.popNode( this );
}
return false;
}
示例2: fullPick
import edu.umd.cs.piccolo.PNode; //导入方法依赖的package包/类
/**
* Try to pick this node and all of its descendants if they are visible in
* the clipping region.
*
* @param pickPath the pick path to add the node to if its picked
* @return true if this node or one of its descendants was picked.
*/
public boolean fullPick(final PPickPath pickPath) {
if (getPickable() && fullIntersects(pickPath.getPickBounds())) {
pickPath.pushNode(this);
pickPath.pushTransform(getTransformReference(false));
if (pick(pickPath)) {
return true;
}
if (getChildrenPickable() && getPathReference().intersects(pickPath.getPickBounds())) {
final int count = getChildrenCount();
for (int i = count - 1; i >= 0; i--) {
final PNode each = getChild(i);
if (each.fullPick(pickPath)) {
return true;
}
}
}
if (pickAfterChildren(pickPath)) {
return true;
}
pickPath.popTransform(getTransformReference(false));
pickPath.popNode(this);
}
return false;
}