本文整理汇总了Java中javafx.scene.Parent.getParent方法的典型用法代码示例。如果您正苦于以下问题:Java Parent.getParent方法的具体用法?Java Parent.getParent怎么用?Java Parent.getParent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.Parent
的用法示例。
在下文中一共展示了Parent.getParent方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findContextHeirarchy
import javafx.scene.Parent; //导入方法依赖的package包/类
public JSONObject findContextHeirarchy(Parent parent) {
JSONObject r = null;
JSONObject current = null;
while (parent != null) {
if (ContextManager.isContext(parent)) {
JSONObject pContext = getContextJSONObject(parent);
if (r == null) {
r = pContext;
}
if (current != null) {
current.put("container", pContext);
}
current = pContext;
}
parent = parent.getParent();
}
return addWindowParents(r, current);
}
示例2: getParentScrollPane
import javafx.scene.Parent; //导入方法依赖的package包/类
private ScrollPane getParentScrollPane(Node target) {
Parent p = target.getParent();
while (p != null && !(p instanceof ScrollPane)) {
p = p.getParent();
}
return (ScrollPane) p;
}
示例3: getFieldNames
import javafx.scene.Parent; //导入方法依赖的package包/类
final public List<String> getFieldNames() {
List<String> fieldNames = new ArrayList<String>();
Parent container = node.getParent();
while (container != null) {
findFields(node, container, fieldNames);
container = container.getParent();
}
return fieldNames;
}
示例4: processMouseClick
import javafx.scene.Parent; //导入方法依赖的package包/类
/**
* Handle a click to a tab.
*/
private void processMouseClick(@NotNull final MouseEvent event) {
final EventTarget target = event.getTarget();
if (!(target instanceof Node)) return;
final Node node = (Node) target;
if (!(node instanceof Text) || node.getStyleClass().contains("tab-container")) {
return;
}
final Parent label = node.getParent();
if (!(label instanceof Label)) {
return;
}
final Parent tabContainer = label.getParent();
if (!tabContainer.getStyleClass().contains("tab-container")) {
return;
}
if (isChangingTab()) {
setChangingTab(false);
return;
}
processExpandOrCollapse();
}
示例5: getParentScrollPane
import javafx.scene.Parent; //导入方法依赖的package包/类
private ScrollPane getParentScrollPane(Node target) {
Parent p = target.getParent();
while (p != null && !(p instanceof ScrollPane))
p = p.getParent();
return (ScrollPane) p;
}