本文整理汇总了Java中javafx.scene.control.ComboBoxBase类的典型用法代码示例。如果您正苦于以下问题:Java ComboBoxBase类的具体用法?Java ComboBoxBase怎么用?Java ComboBoxBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ComboBoxBase类属于javafx.scene.control包,在下文中一共展示了ComboBoxBase类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ComboBoxBaseBinder
import javafx.scene.control.ComboBoxBase; //导入依赖的package包/类
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);
}
示例2: testGetComboBoxBaseAdjuster
import javafx.scene.control.ComboBoxBase; //导入依赖的package包/类
@Test
public void testGetComboBoxBaseAdjuster() {
Adjuster adjuster = Adjuster.getAdjuster(ComboBoxBase.class);
assertThat(adjuster, is(instanceOf(ControlAdjuster.class)));
assertThat(adjuster.getNodeClass(), is(sameInstance(Control.class)));
}
示例3: ComboBoxBinder
import javafx.scene.control.ComboBoxBase; //导入依赖的package包/类
public ComboBoxBinder(ComboBoxBase view)
{
super(view);
}
示例4: gatherFocusableNodes
import javafx.scene.control.ComboBoxBase; //导入依赖的package包/类
/**
* 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;
}
示例5: waitForValue
import javafx.scene.control.ComboBoxBase; //导入依赖的package包/类
public <T> void waitForValue(ComboBoxBase<T> comboBoxBase) {
GuiTest.waitUntil(comboBoxBase, c -> c.getValue() != null);
}