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

x33g5p2x  于2022-01-23 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(153)

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

Label.setOnMouseClicked介绍

暂无

代码示例

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

selectedHourLabel.setTextFill(Color.WHITE);
selectedHourLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 42));
selectedHourLabel.setOnMouseClicked((click) -> unit.set(TimeUnit.HOURS));
selectedHourLabel.setMinWidth(49);
selectedHourLabel.setAlignment(Pos.CENTER_RIGHT);
selectedMinLabel.setTextFill(fadedColor);
selectedMinLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 42));
selectedMinLabel.setOnMouseClicked((click) -> unit.set(TimeUnit.MINUTES));
periodPMLabel.setTextFill(fadedColor);
periodPMLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 14));
periodPMLabel.setOnMouseClicked((click) -> period.set("PM"));
periodAMLabel.setTextFill(fadedColor);
periodAMLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 14));
periodAMLabel.setOnMouseClicked((click) -> period.set("AM"));

代码示例来源:origin: nl.cloudfarming.client/calendar-api

listViewHeaderPane.getChildren().add(labelHide);
labelHide.setOnMouseClicked(new EventHandler<MouseEvent>() {
  @Override
  public void handle(MouseEvent mouseEvent) {
labelShow.setOnMouseClicked(new EventHandler<MouseEvent>() {

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

selectedHourLabel.setTextFill(Color.WHITE);
selectedHourLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 42));
selectedHourLabel.setOnMouseClicked((click) -> unit.set(TimeUnit.HOURS));
selectedHourLabel.setMinWidth(49);
selectedHourLabel.setAlignment(Pos.CENTER_RIGHT);
selectedMinLabel.setTextFill(fadedColor);
selectedMinLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 42));
selectedMinLabel.setOnMouseClicked((click) -> unit.set(TimeUnit.MINUTES));
periodPMLabel.setTextFill(fadedColor);
periodPMLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 14));
periodPMLabel.setOnMouseClicked((click) -> period.set("PM"));
periodAMLabel.setTextFill(fadedColor);
periodAMLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 14));
periodAMLabel.setOnMouseClicked((click) -> period.set("AM"));

代码示例来源:origin: ch.sahits.game/OpenPatricianJavaFX

control.getNextButtonNode().hoverProperty().addListener(changeListenerNext);
} else {
  nextLbl.setOnMouseClicked(nextButtonEventHandler);
  backLbl.setOnMouseClicked(backButtonEventHandler);
  backLbl.hoverProperty().addListener(changeListenerBack);
  nextLbl.hoverProperty().addListener(changeListenerNext);

相关文章