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


Java Parent.getChildrenUnmodifiable方法代码示例

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


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

示例1: found

import javafx.scene.Parent; //导入方法依赖的package包/类
protected List<IJavaFXElement> found(List<IJavaFXElement> pElements, IJavaFXAgent driver) {
    List<IJavaFXElement> r = new ArrayList<IJavaFXElement>();
    for (IJavaFXElement je : pElements) {
        Node component = je.getComponent();
        if (!(component instanceof Parent)) {
            continue;
        }
        int index = getIndexOfComponentInParent(component);
        if (index < 0) {
            continue;
        }
        Parent parent = component.getParent();
        JFXWindow topContainer = driver.switchTo().getTopContainer();
        ObservableList<Node> children = parent.getChildrenUnmodifiable();
        for (int i = index + 1; i < children.size(); i++) {
            Node c = children.get(i);
            IJavaFXElement je2 = JavaFXElementFactory.createElement(c, driver, driver.switchTo().getTopContainer());
            if (sibling.matchesSelector(je2).size() > 0) {
                IJavaFXElement e = topContainer.addElement(JavaFXElementFactory.createElement(c, driver, topContainer));
                if (!r.contains(e)) {
                    r.add(e);
                }
            }
        }
    }
    return r;
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:28,代码来源:GeneralSiblingSelector.java

示例2: setState

import javafx.scene.Parent; //导入方法依赖的package包/类
public void setState(int state)
{
	// 0 is on, 1 is off
	for (int index = 0; index < segments.size(); index++)
	{
		int maskedBit = (state >> index) & 1;
		boolean isOn = (maskedBit == 0);

		String color = isOn ? OFF_COLOR : ON_COLOR;
		Parent segment = segments.get(index);
		for (Node section : segment.getChildrenUnmodifiable())
		{
			section.setStyle("-fx-background-color: " + color);
		}
	}
}
 
开发者ID:dhawal9035,项目名称:WebPLP,代码行数:17,代码来源:SevenSegmentPanel.java

示例3: doFindEntryView

import javafx.scene.Parent; //导入方法依赖的package包/类
private EntryViewBase<?> doFindEntryView(Parent parent, Entry<?> entry) {
    EntryViewBase<?> result = null;

    for (Node node : parent.getChildrenUnmodifiable()) {
        if (node instanceof EntryViewBase) {
            EntryViewBase<?> base = (EntryViewBase<?>) node;
            if (base.getEntry().equals(entry)) {
                result = base;
                break;
            }
        } else if (node instanceof Parent) {
            result = doFindEntryView((Parent) node, entry);
            if (result != null) {
                break;
            }
        }
    }

    return result;
}
 
开发者ID:dlemmermann,项目名称:CalendarFX,代码行数:21,代码来源:DateControl.java

示例4: addAllDescendents

import javafx.scene.Parent; //导入方法依赖的package包/类
private static void addAllDescendents(Parent parent, ArrayList<Node> nodes) {
    for (Node node : parent.getChildrenUnmodifiable()) {
        nodes.add(node);
        if (node instanceof Parent)
            addAllDescendents((Parent)node, nodes);
    }
}
 
开发者ID:Roxas240,项目名称:CryptoPayAPI,代码行数:8,代码来源:PaymentPopup.java

示例5: getIndexOfComponentInParent

import javafx.scene.Parent; //导入方法依赖的package包/类
private int getIndexOfComponentInParent(Node component) {
    Parent parent = component.getParent();
    if (parent == null) {
        return -1;
    }
    ObservableList<Node> components = parent.getChildrenUnmodifiable();
    for (int i = 0; i < components.size(); i++) {
        if (components.get(i) == component) {
            return i;
        }
    }
    return -1;
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:14,代码来源:AdjacentSiblingSelector.java

示例6: search

import javafx.scene.Parent; //导入方法依赖的package包/类
private void search(UIPlatform uiPlatform, Parent parent)
{
    ObservableList<Node> list = parent.getChildrenUnmodifiable();
    if (list.size() == 0)
    {
        return;
    }
    final String idPrefix = getPrefix().idPrefix;
    final String pathPrefix = getPrefix().pathPrefix;
    IdDeal idDeal = uiPlatform.getIdDeal();
    BinderFactory factory = uiPlatform.getBinderFactory();
    for (int i = 0; i < list.size(); i++)
    {
        Node node = list.get(i);
        UiId id = UiId.newInstance(node.getId(), idPrefix);
        if (id != null)
        {
            IdDeal.Result result = idDeal.dealId(id, pathPrefix);
            if (result != null)
            {
                hashMap.put(id, factory.getBinder(node));
            }
        }
        if (node instanceof Parent)
        {
            search(uiPlatform, (Parent) node);
        }
        if (node instanceof MenuBar)
        {
            search(uiPlatform, (MenuBar) node);
        }
    }
}
 
开发者ID:gzxishan,项目名称:OftenPorter,代码行数:34,代码来源:FXUIProvider.java

示例7: addAllDescendents

import javafx.scene.Parent; //导入方法依赖的package包/类
private static void addAllDescendents(Parent parent, ArrayList<Node> nodes) {
  for (Node node : parent.getChildrenUnmodifiable()) {
    nodes.add(node);
    if (node instanceof Parent)
      addAllDescendents((Parent) node, nodes);
  }
}
 
开发者ID:BITPlan,项目名称:can4eve,代码行数:8,代码来源:TestAppGUI.java


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