本文整理匯總了Java中org.piccolo2d.extras.nodes.PComposite.getChild方法的典型用法代碼示例。如果您正苦於以下問題:Java PComposite.getChild方法的具體用法?Java PComposite.getChild怎麽用?Java PComposite.getChild使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.piccolo2d.extras.nodes.PComposite
的用法示例。
在下文中一共展示了PComposite.getChild方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: repaintNodes
import org.piccolo2d.extras.nodes.PComposite; //導入方法依賴的package包/類
@Override
public synchronized void repaintNodes(NodeType pType) {
LOGGER.trace("Method repaintNodes("
+ pType + ") called.");
for (Object key : mMapNode.keySet()) {
PComposite vCom = mMapNode.get(key);
PPath vNode = (PPath) vCom.getChild(0);
PText vText = (PText) vCom.getChild(1);
if (pType == NodeType.IDENTIFIER) {
if (vCom.getAttribute("type").equals(pType)) {
NodeIdentifier i = (NodeIdentifier) key;
Identifier identifier = i.getIdentifier();
paintIdentifierNode(identifier, vNode, vText);
}
} else if (pType == NodeType.METADATA) {
if (vCom.getAttribute("type").equals(pType)) {
NodeMetadata m = (NodeMetadata) key;
Metadata metadata = m.getMetadata();
paintMetadataNode(metadata, vNode, vText);
}
}
}
}
示例2: getNodes
import org.piccolo2d.extras.nodes.PComposite; //導入方法依賴的package包/類
@SuppressWarnings("unchecked")
@Override
public List<GraphicWrapper> getNodes() {
ArrayList<PComposite> nodes = (ArrayList<PComposite>) mNode.getAttribute("nodes");
List<GraphicWrapper> edgesNodes = new ArrayList<GraphicWrapper>();
if (nodes != null) {
for (PComposite vCom : nodes) {
PPath vNode = (PPath) vCom.getChild(0);
PText vText = (PText) vCom.getChild(1);
GraphicWrapper g = Piccolo2DGraphicWrapperFactory.create(vNode, vText);
edgesNodes.add(g);
}
}
return edgesNodes;
}
示例3: getEdgesNodes
import org.piccolo2d.extras.nodes.PComposite; //導入方法依賴的package包/類
@Override
public List<GraphicWrapper> getEdgesNodes() {
List<GraphicWrapper> edgesNodes = new ArrayList<GraphicWrapper>();
for (PComposite vCom : getEdgesCompositeNodes()) {
PPath vNode = (PPath) vCom.getChild(0);
PText vText = (PText) vCom.getChild(1);
if (vNode != mNode) {
GraphicWrapper g = Piccolo2DGraphicWrapperFactory.create(vNode, vText);
edgesNodes.add(g);
}
}
return edgesNodes;
}