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


Java ComboBoxBase类代码示例

本文整理汇总了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);
}
 
开发者ID:gzxishan,项目名称:OftenPorter,代码行数:14,代码来源:ComboBoxBaseBinder.java

示例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)));
}
 
开发者ID:yumix,项目名称:javafx-dpi-scaling,代码行数:8,代码来源:AdjusterTest.java

示例3: ComboBoxBinder

import javafx.scene.control.ComboBoxBase; //导入依赖的package包/类
public ComboBoxBinder(ComboBoxBase view)
{
    super(view);
}
 
开发者ID:gzxishan,项目名称:OftenPorter,代码行数:5,代码来源:ComboBoxBinder.java

示例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;
}
 
开发者ID:ivartanian,项目名称:JVx.javafx,代码行数:82,代码来源:JavaFXFocusUtil.java

示例5: waitForValue

import javafx.scene.control.ComboBoxBase; //导入依赖的package包/类
public <T> void waitForValue(ComboBoxBase<T> comboBoxBase) {
    GuiTest.waitUntil(comboBoxBase, c -> c.getValue() != null);
}
 
开发者ID:HubTurbo,项目名称:HubTurbo,代码行数:4,代码来源:UITest.java


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