javafx.scene.Node.setFocusTraversable()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(506)

本文整理了Java中javafx.scene.Node.setFocusTraversable()方法的一些代码示例,展示了Node.setFocusTraversable()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.setFocusTraversable()方法的具体详情如下:
包路径:javafx.scene.Node
类名称:Node
方法名:setFocusTraversable

Node.setFocusTraversable介绍

暂无

代码示例

代码示例来源:origin: com.aquafx-project/aquafx

  1. static <T extends Node> T withState(T node, String state) {
  2. if (node != null && state != null) {
  3. // stop user from being able to change state
  4. node.setMouseTransparent(true);
  5. node.setFocusTraversable(false);
  6. // set state to chosen state
  7. final String[] pseudoClasses = (state).split("[\\s,]+");
  8. for (String pseudoClass : pseudoClasses) {
  9. node.pseudoClassStateChanged(PseudoClass.getPseudoClass(pseudoClass), true);
  10. }
  11. }
  12. return node;
  13. }

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

  1. /**
  2. * @{inheritedDoc}
  3. */
  4. @Override
  5. public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) {
  6. List<IBuildable> links = ComponentUtils.resolveAndGenerate((AbstractViewController) controller, configuration.getSubcomponents());
  7. NodeHelper.styleClassSetAll(topToolbar, configuration, "header-center-toolbar");
  8. for (final IBuildable action : links) {
  9. action.getDisplay().setFocusTraversable(false);
  10. addItem(action.getDisplay());
  11. }
  12. }

代码示例来源:origin: org.tentackle/tentackle-fx

  1. @Override
  2. protected void updateChangeable(boolean changeable) {
  3. // the default for components is to use the disabled property
  4. getNode().setDisable(!changeable);
  5. // non-changeable components should not be focus traversable
  6. getNode().setFocusTraversable(changeable);
  7. // mandatory is only shown if component is changeable as well
  8. updateMandatoryStyle(isMandatory());
  9. updateInfoStyle(changeable && infoMessage != null);
  10. updateErrorStyle(changeable && errorMessage != null);
  11. }

代码示例来源:origin: org.tentackle/tentackle-fx

  1. @Override
  2. protected void updateChangeable(boolean changeable) {
  3. if (getComponent() instanceof TextInputControl) {
  4. // map to editable property
  5. ((TextInputControl) getComponent()).setEditable(changeable);
  6. getNode().setFocusTraversable(changeable);
  7. // mandatory is only shown if component is changeable as well
  8. updateMandatoryStyle(isMandatory());
  9. }
  10. else {
  11. // use disabled property
  12. super.updateChangeable(changeable);
  13. }
  14. }

相关文章

Node类方法