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();
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 } });
private void bindActionImageToLoadingView( final HBox imageBox, final FxComponent fxComponent ) { imageBox.setOnMouseClicked(e -> { currentViewButton.setValue(imageBox); rootScreenController.setContent(fxComponent); }); }
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);
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);
/** * 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)); }
/** * 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)); }
layout.setOnMouseClicked(event -> stage.hide());
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();
@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()); }
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()) {