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

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

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

Node.setMouseTransparent介绍

暂无

代码示例

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

/**
 * this method is used to set some nodes in cell content as mouse transparent nodes
 * so clicking on them will trigger the ripple effect.
 */
protected void makeChildrenTransparent() {
  for (Node child : getChildren()) {
    if (child instanceof Label) {
      Set<Node> texts = child.lookupAll("Text");
      for (Node text : texts) {
        text.setMouseTransparent(true);
      }
    } else if (child instanceof Shape) {
      child.setMouseTransparent(true);
    }
  }
}

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

@Override
protected void updateChildren() {
  super.updateChildren();
  if(buttonRippler!=null)
    getChildren().add(0, buttonRippler);
  for (int i = 1; i < getChildren().size(); i++) {
    final Node child = getChildren().get(i);
    if(child instanceof Text)
      child.setMouseTransparent(true);
  }
}

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

@Override
protected void updateChildren() {
  super.updateChildren();
  if (rippler != null) {
    getChildren().add(0, rippler);
  }
  for (int i = 1; i < getChildren().size(); i++) {
    getChildren().get(i).setMouseTransparent(true);
  }
}

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

dragItem = node;
dragImageView.setMouseTransparent(true);
node.setMouseTransparent(true);
node.setCursor(Cursor.CLOSED_HAND);
dragItem = null;
dragImageView.setMouseTransparent(false);
node.setMouseTransparent(false);
node.setCursor(Cursor.DEFAULT);
sceneRoot.getChildren().remove(dragImageView);

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

/**
 * this method is used to set some nodes in cell content as mouse transparent nodes
 * so clicking on them will trigger the ripple effect.
 */
protected void makeChildrenTransparent() {
  for (Node child : getChildren()) {
    if (child instanceof Label) {
      Set<Node> texts = child.lookupAll("Text");
      for (Node text : texts) {
        text.setMouseTransparent(true);
      }
    } else if (child instanceof Shape) {
      child.setMouseTransparent(true);
    }
  }
}

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

@Override public void run() {
    final Node macRB2 = macWindowContent.lookup("#RadioButton2");
    macRB2.setMouseTransparent(true);
    macRB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
    final Node windows7RB2 = windows7WindowContent.lookup("#RadioButton2");
    windows7RB2.setMouseTransparent(true);
    windows7RB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
    final Node windows8RB2 = windows8WindowContent.lookup("#RadioButton2");
    windows8RB2.setMouseTransparent(true);
    windows8RB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
    final Node ubuntuRB2 = ubuntuWindowContent.lookup("#RadioButton2");
    ubuntuRB2.setMouseTransparent(true);
    ubuntuRB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
  }
});

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

public void configureEditCapability(boolean notEditable) {
    Optional<Boolean> disableEditing
        = getModel().getVisualizationRequest().
        get(VisualizationRequest.KEY_DISABLE_EDITING);

    if (disableEditing.isPresent()) {
      notEditable = disableEditing.get();
    }

    senderShape.getNode().setMouseTransparent(notEditable);
    receiverConnectorUI.setMouseTransparent(notEditable);
    connectionPath.setMouseTransparent(notEditable);
  }
}

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

@Override
protected void updateChildren() {
  super.updateChildren();
  if (rippler != null) {
    getChildren().add(0, rippler);
  }
  for (int i = 1; i < getChildren().size(); i++) {
    getChildren().get(i).setMouseTransparent(true);
  }
}

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

n.setMouseTransparent(!result);

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

@Override
protected void updateChildren() {
  super.updateChildren();
  if(buttonRippler!=null)
    getChildren().add(0, buttonRippler);
  for (int i = 1; i < getChildren().size(); i++) {
    final Node child = getChildren().get(i);
    if(child instanceof Text)
      child.setMouseTransparent(true);
  }
}

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

connectorShape.getNode().setMouseTransparent(notEditable);

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

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

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

lidarScanRootNode.setMouseTransparent(true);
bufferOcTreeMeshView.setMouseTransparent(true);
ocTreeViewer.getRoot().setMouseTransparent(true);
boundingBoxMeshView.setMouseTransparent(true);
root.getChildren().addAll(lidarScanRootNode, bufferOcTreeMeshView, ocTreeViewer.getRoot(), planarRegionMeshView, intersectionsMeshView, boundingBoxMeshView);

相关文章

微信公众号

最新文章

更多

Node类方法