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

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

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

Node.setMouseTransparent介绍

暂无

代码示例

代码示例来源:origin: jfoenixadmin/JFoenix

  1. /**
  2. * this method is used to set some nodes in cell content as mouse transparent nodes
  3. * so clicking on them will trigger the ripple effect.
  4. */
  5. protected void makeChildrenTransparent() {
  6. for (Node child : getChildren()) {
  7. if (child instanceof Label) {
  8. Set<Node> texts = child.lookupAll("Text");
  9. for (Node text : texts) {
  10. text.setMouseTransparent(true);
  11. }
  12. } else if (child instanceof Shape) {
  13. child.setMouseTransparent(true);
  14. }
  15. }
  16. }

代码示例来源:origin: jfoenixadmin/JFoenix

  1. @Override
  2. protected void updateChildren() {
  3. super.updateChildren();
  4. if(buttonRippler!=null)
  5. getChildren().add(0, buttonRippler);
  6. for (int i = 1; i < getChildren().size(); i++) {
  7. final Node child = getChildren().get(i);
  8. if(child instanceof Text)
  9. child.setMouseTransparent(true);
  10. }
  11. }

代码示例来源:origin: jfoenixadmin/JFoenix

  1. @Override
  2. protected void updateChildren() {
  3. super.updateChildren();
  4. if (rippler != null) {
  5. getChildren().add(0, rippler);
  6. }
  7. for (int i = 1; i < getChildren().size(); i++) {
  8. getChildren().get(i).setMouseTransparent(true);
  9. }
  10. }

代码示例来源:origin: stackoverflow.com

  1. dragItem = node;
  2. dragImageView.setMouseTransparent(true);
  3. node.setMouseTransparent(true);
  4. node.setCursor(Cursor.CLOSED_HAND);
  5. dragItem = null;
  6. dragImageView.setMouseTransparent(false);
  7. node.setMouseTransparent(false);
  8. node.setCursor(Cursor.DEFAULT);
  9. sceneRoot.getChildren().remove(dragImageView);

代码示例来源:origin: com.jfoenix/jfoenix

  1. /**
  2. * this method is used to set some nodes in cell content as mouse transparent nodes
  3. * so clicking on them will trigger the ripple effect.
  4. */
  5. protected void makeChildrenTransparent() {
  6. for (Node child : getChildren()) {
  7. if (child instanceof Label) {
  8. Set<Node> texts = child.lookupAll("Text");
  9. for (Node text : texts) {
  10. text.setMouseTransparent(true);
  11. }
  12. } else if (child instanceof Shape) {
  13. child.setMouseTransparent(true);
  14. }
  15. }
  16. }

代码示例来源: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.aquafx-project/aquafx

  1. @Override public void run() {
  2. final Node macRB2 = macWindowContent.lookup("#RadioButton2");
  3. macRB2.setMouseTransparent(true);
  4. macRB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
  5. final Node windows7RB2 = windows7WindowContent.lookup("#RadioButton2");
  6. windows7RB2.setMouseTransparent(true);
  7. windows7RB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
  8. final Node windows8RB2 = windows8WindowContent.lookup("#RadioButton2");
  9. windows8RB2.setMouseTransparent(true);
  10. windows8RB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
  11. final Node ubuntuRB2 = ubuntuWindowContent.lookup("#RadioButton2");
  12. ubuntuRB2.setMouseTransparent(true);
  13. ubuntuRB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
  14. }
  15. });

代码示例来源:origin: eu.mihosoft.vrl.workflow/vworkflows-fx

  1. public void configureEditCapability(boolean notEditable) {
  2. Optional<Boolean> disableEditing
  3. = getModel().getVisualizationRequest().
  4. get(VisualizationRequest.KEY_DISABLE_EDITING);
  5. if (disableEditing.isPresent()) {
  6. notEditable = disableEditing.get();
  7. }
  8. senderShape.getNode().setMouseTransparent(notEditable);
  9. receiverConnectorUI.setMouseTransparent(notEditable);
  10. connectionPath.setMouseTransparent(notEditable);
  11. }
  12. }

代码示例来源:origin: com.jfoenix/jfoenix

  1. @Override
  2. protected void updateChildren() {
  3. super.updateChildren();
  4. if (rippler != null) {
  5. getChildren().add(0, rippler);
  6. }
  7. for (int i = 1; i < getChildren().size(); i++) {
  8. getChildren().get(i).setMouseTransparent(true);
  9. }
  10. }

代码示例来源:origin: stackoverflow.com

  1. n.setMouseTransparent(!result);

代码示例来源:origin: com.jfoenix/jfoenix

  1. @Override
  2. protected void updateChildren() {
  3. super.updateChildren();
  4. if(buttonRippler!=null)
  5. getChildren().add(0, buttonRippler);
  6. for (int i = 1; i < getChildren().size(); i++) {
  7. final Node child = getChildren().get(i);
  8. if(child instanceof Text)
  9. child.setMouseTransparent(true);
  10. }
  11. }

代码示例来源:origin: eu.mihosoft.vrl.workflow/vworkflows-fx

  1. connectorShape.getNode().setMouseTransparent(notEditable);

代码示例来源:origin: org.controlsfx/controlsfx

  1. Node foregroundNode = createButton();
  2. foregroundNode.getStyleClass().add(STRONG);
  3. foregroundNode.setMouseTransparent(true);

代码示例来源:origin: us.ihmc/robot-environment-awareness

  1. lidarScanRootNode.setMouseTransparent(true);
  2. bufferOcTreeMeshView.setMouseTransparent(true);
  3. ocTreeViewer.getRoot().setMouseTransparent(true);
  4. boundingBoxMeshView.setMouseTransparent(true);
  5. root.getChildren().addAll(lidarScanRootNode, bufferOcTreeMeshView, ocTreeViewer.getRoot(), planarRegionMeshView, intersectionsMeshView, boundingBoxMeshView);

相关文章

Node类方法