Java 类javafx.scene.control.ComboBoxBase 实例源码

项目:OftenPorter    文件:ComboBoxBaseBinder.java   
public ComboBoxBaseBinder(ComboBoxBase view)
{
    super(view);
    changeListener = new ChangeListener<Object>()
    {
        @Override
        public synchronized void changed(ObservableValue<?> observable, Object oldValue, Object newValue)
        {
            doOnchange(oldValue, newValue);
        }
    };
    view.valueProperty().addListener(changeListener);
}
项目:javafx-dpi-scaling    文件:AdjusterTest.java   
@Test
public void testGetComboBoxBaseAdjuster() {
    Adjuster adjuster = Adjuster.getAdjuster(ComboBoxBase.class);

    assertThat(adjuster, is(instanceOf(ControlAdjuster.class)));
    assertThat(adjuster.getNodeClass(), is(sameInstance(Control.class)));
}
项目:OftenPorter    文件:ComboBoxBinder.java   
public ComboBoxBinder(ComboBoxBase view)
{
    super(view);
}
项目:JVx.javafx    文件:JavaFXFocusUtil.java   
/**
 * Gathers all focusable {@link Node}s from the given {@link Parent} and all
 * its children.
 * 
 * @param pParent the {@link Parent} at which to start.
 * @param pIndexedOnly {@code true} only {@link Node}s which do have a tab
 *            index set will be returned. {@code false} will return all
 *            focusable {@link Node}s.
 * @return all focusable {@link Node}s.
 */
public static List<Node> gatherFocusableNodes(Parent pParent, boolean pIndexedOnly)
{
    if (pParent instanceof FXDesktopPane)
    {
        FXInternalWindow activeWindow = ((FXDesktopPane)pParent).getActiveWindow();

        if (activeWindow != null)
        {
            return gatherFocusableNodes(activeWindow, pIndexedOnly);
        }
    }

    List<Node> nodes = pParent.getChildrenUnmodifiable();

    if (nodes.isEmpty())
    {
        return Collections.emptyList();
    }

    if (isReverseOrderNeeded(pParent))
    {
        nodes = new ArrayList<>(nodes);
        Collections.reverse(nodes);
    }

    List<Node> focusableNodes = new ArrayList<>();

    for (Node node : nodes)
    {
        if (isTraversable(node))
        {
            if (node instanceof ComboBoxBase)
            {
                // The ComboBoxBase does contain a text field (and some other stuff)
                // which we might accidentally include in our list.
                if (isFocusable(node) && (!pIndexedOnly || getTabIndex(node) != null))
                {
                    focusableNodes.add(node);
                }
            }
            else if (node instanceof TabPane)
            {
                // We need to check for a TabPane because Nodes on a tab that
                // is not the selected one can not be distinguished from others.

                TabPane tabPane = (TabPane)node;

                focusableNodes.add(tabPane);

                Tab selectedTab = tabPane.getSelectionModel().getSelectedItem();

                if (selectedTab != null && selectedTab.getContent() != null)
                {
                    focusableNodes.addAll(gatherFocusableNodes((Parent)selectedTab.getContent(), pIndexedOnly));
                }
            }
            else
            {
                List<Node> newFocusableNodes = gatherFocusableNodes((Parent)node, pIndexedOnly);
                focusableNodes.addAll(newFocusableNodes);

                if (newFocusableNodes.isEmpty() && isFocusable(node) && (!pIndexedOnly || getTabIndex(node) != null))
                {
                    focusableNodes.add(node);
                }
            }
        }
    }

    return focusableNodes;
}
项目:HubTurbo    文件:UITest.java   
public <T> void waitForValue(ComboBoxBase<T> comboBoxBase) {
    GuiTest.waitUntil(comboBoxBase, c -> c.getValue() != null);
}