本文整理了Java中javafx.scene.Node.setFocusTraversable()
方法的一些代码示例,展示了Node.setFocusTraversable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.setFocusTraversable()
方法的具体详情如下:
包路径:javafx.scene.Node
类名称:Node
方法名:setFocusTraversable
暂无
代码示例来源:origin: com.aquafx-project/aquafx
static <T extends Node> T withState(T node, String state) {
if (node != null && state != null) {
// stop user from being able to change state
node.setMouseTransparent(true);
node.setFocusTraversable(false);
// set state to chosen state
final String[] pseudoClasses = (state).split("[\\s,]+");
for (String pseudoClass : pseudoClasses) {
node.pseudoClassStateChanged(PseudoClass.getPseudoClass(pseudoClass), true);
}
}
return node;
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* @{inheritedDoc}
*/
@Override
public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) {
List<IBuildable> links = ComponentUtils.resolveAndGenerate((AbstractViewController) controller, configuration.getSubcomponents());
NodeHelper.styleClassSetAll(topToolbar, configuration, "header-center-toolbar");
for (final IBuildable action : links) {
action.getDisplay().setFocusTraversable(false);
addItem(action.getDisplay());
}
}
代码示例来源:origin: org.tentackle/tentackle-fx
@Override
protected void updateChangeable(boolean changeable) {
// the default for components is to use the disabled property
getNode().setDisable(!changeable);
// non-changeable components should not be focus traversable
getNode().setFocusTraversable(changeable);
// mandatory is only shown if component is changeable as well
updateMandatoryStyle(isMandatory());
updateInfoStyle(changeable && infoMessage != null);
updateErrorStyle(changeable && errorMessage != null);
}
代码示例来源:origin: org.tentackle/tentackle-fx
@Override
protected void updateChangeable(boolean changeable) {
if (getComponent() instanceof TextInputControl) {
// map to editable property
((TextInputControl) getComponent()).setEditable(changeable);
getNode().setFocusTraversable(changeable);
// mandatory is only shown if component is changeable as well
updateMandatoryStyle(isMandatory());
}
else {
// use disabled property
super.updateChangeable(changeable);
}
}
内容来源于网络,如有侵权,请联系作者删除!