javafx.scene.layout.HBox.setOnMouseClicked()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(211)

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

HBox.setOnMouseClicked介绍

暂无

代码示例

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

yearLabelContainer.setAlignment(Pos.CENTER_LEFT);
yearLabelContainer.setFillHeight(false);
yearLabelContainer.setOnMouseClicked((click) -> {
  if (!yearsListView.isVisible()) {
    scrollToYear();
selectedDateContainer.getStyleClass().add("spinner");
selectedDateContainer.setAlignment(Pos.CENTER_LEFT);
selectedDateContainer.setOnMouseClicked((click) -> {
  if (yearsListView.isVisible()) {
    showTransition.stop();

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

HBox hbox = new HBox();
// the text of the "button"
Label lbl_txt = new Label("Text");
// the icon of the "button", i am using Labels for icon(with css)
Label lbl_ico = new Label("ico");
hbox.getChildren().addAll(lbl_txt, lbl_ico);
hbox.setOnMouseClicked(new EventHandler<MouseEvent>() {
  @Override
  public void handle(MouseEvent t) {
    // alternative to Button click
  }
});

代码示例来源:origin: Tristan971/Lyrebird

private void bindActionImageToLoadingView(
    final HBox imageBox,
    final FxComponent fxComponent
) {
  imageBox.setOnMouseClicked(e -> {
    currentViewButton.setValue(imageBox);
    rootScreenController.setContent(fxComponent);
  });
}

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

canvas.setOnMouseClicked(e -> System.out.println("Mouse click: canvas"));
HBox statusBar = new HBox(new Label("Status"));
statusBar.setOnMouseClicked(e -> System.out.println("Mouse click: statusBar"));
BorderPane borderPane = new BorderPane(canvas, statusBar, null, null, null);

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

canvas.setOnMouseClicked(e -> System.out.println("Mouse click: canvas"));
HBox statusBar = new HBox(new Label("Status"));
statusBar.setOnMouseClicked(e -> System.out.println("Mouse click: statusBar"));
BorderPane borderPane = new BorderPane(canvas, statusBar, null, null, null);

代码示例来源:origin: Tristan971/Lyrebird

/**
 * Makes sure the tweet button appears as a nice circle through CSS and clipping work.
 */
private void setUpTweetButton() {
  tweet.setOnMouseClicked(e -> this.openTweetWindow());
  tweet.setClip(Clipping.getCircleClip(28.0));
}

代码示例来源:origin: Tristan971/Lyrebird

/**
 * Binds click on a button to its expected action
 */
private void setUpInteractionActions() {
  replyButton.setOnMouseClicked(e -> this.onReply());
  replyButton.setClip(Clipping.getCircleClip(INTERACTION_BUTTON_CLIP_RADIUS));
  likeButton.setOnMouseClicked(e -> this.onLike());
  likeButton.setClip(Clipping.getCircleClip(INTERACTION_BUTTON_CLIP_RADIUS));
  retweetButton.setOnMouseClicked(e -> this.onRetweet());
  retweetButton.setClip(Clipping.getCircleClip(INTERACTION_BUTTON_CLIP_RADIUS));
}

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

layout.setOnMouseClicked(event -> stage.hide());

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

yearLabelContainer.setAlignment(Pos.CENTER_LEFT);
yearLabelContainer.setFillHeight(false);
yearLabelContainer.setOnMouseClicked((click) -> {
  if (!yearsListView.isVisible()) {
    scrollToYear();
selectedDateContainer.getStyleClass().add("spinner");
selectedDateContainer.setAlignment(Pos.CENTER_LEFT);
selectedDateContainer.setOnMouseClicked((click) -> {
  if (yearsListView.isVisible()) {
    showTransition.stop();

代码示例来源:origin: Tristan971/Lyrebird

@Override
public void initialize() {
  currentViewButton.addListener((o, prev, current) -> {
    if (prev != null) {
      prev.setDisable(false);
      prev.setOpacity(1.0);
    }
    current.setDisable(true);
    current.setOpacity(0.5);
  });
  setUpTweetButton();
  bindActionImageToLoadingView(timeline, TIMELINE);
  bindActionImageToLoadingView(mentions, MENTIONS);
  bindActionImageToLoadingView(directMessages, DIRECT_MESSAGES);
  credits.setOnMouseClicked(e -> openCreditsView());
  sessionManager.isLoggedInProperty().addListener((o, prev, cur) -> handleLogStatusChange(prev, cur));
  handleLogStatusChange(false, sessionManager.isLoggedInProperty().getValue());
  loadCurrentAccountPanel();
  update.managedProperty().bind(updateService.isUpdateAvailableProperty());
  update.visibleProperty().bind(updateService.isUpdateAvailableProperty());
  update.setOnMouseClicked(e -> openUpdatesScreen());
}

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

infoPanel.getStyleClass().add("info-panel"); //$NON-NLS-1$
infoPanel.setCursor(Cursor.HAND);
infoPanel.setOnMouseClicked(new EventHandler<MouseEvent>() {
  @Override public void handle(MouseEvent e) {
    if (! control.isShowOnHover()) {

相关文章