Package javafx.scene.control

Examples of javafx.scene.control.Tooltip


      int bytecodeSize = Integer.parseInt(lblBytecodeSizeVal.getText());
     
      if (bytecodeSize < DEFAULT_FREQ_INLINE_SIZE)
      {
        lblBytecodeSizeVal.setStyle(STYLE_VALUE + " -fx-background-color: #00ff00");
        lblBytecodeSizeVal.setTooltip(new Tooltip("Will be inlined"));
      }
      else if (bytecodeSize < DEFAULT_MAX_INLINE_SIZE)
      {
        lblBytecodeSizeVal.setStyle(STYLE_VALUE + " -fx-background-color: #ffff00");
        lblBytecodeSizeVal.setTooltip(new Tooltip("Will be inlined if hot"));
      }
      else
      {
        lblBytecodeSizeVal.setStyle(STYLE_VALUE + " -fx-background-color: #ff0000");
        lblBytecodeSizeVal.setTooltip(new Tooltip("Will not be inlined"));
      }
    }
    catch(NumberFormatException nfe)
    {
      lblBytecodeSizeVal.setStyle(STYLE_VALUE);
View Full Code Here


        heightProperty().addListener(o -> resize());
        symbolType.addListener(o -> Platform.runLater(() -> { symbolRegion.setId(getSymbolType().STYLE_CLASS); resize(); }));
        color.addListener(o -> symbolRegion.setStyle("-symbol-color: " + getColor().toString().replace("0x", "#") + ";"));
        sceneProperty().addListener(o -> {
            if (null != getScene()) {
                tooltip = new Tooltip(tooltipText);
                Tooltip.install(this, tooltip);
            }
        });
    }
View Full Code Here

     * @param y  the y-coordinate of the mouse pointer.
     */
    public void setTooltip(String text, double x, double y) {
        if (text != null) {
            if (this.tooltip == null) {
                this.tooltip = new Tooltip(text);
                Tooltip.install(this, this.tooltip);
            } else {
                this.tooltip.setText(text);          
                this.tooltip.setAnchorX(x);
                this.tooltip.setAnchorY(y);
View Full Code Here

                    minimize.setVisible(!fullscreenState.booleanValue());
                    resize.setVisible(!fullscreenState.booleanValue());
                    if (fullscreenState.booleanValue()) {
                        // String and icon
                        fullscreen.getStyleClass().add("decoration-button-unfullscreen");
                        fullscreen.setTooltip(new Tooltip(LOC.getString("Restore")));

                        undecoratorController.saveFullScreenBounds();
                        if (fullscreenButtonTransition != null) {
                            fullscreenButtonTransition.stop();
                        }
                        // Animate the fullscreen button
                        fullscreenButtonTransition = TranslateTransitionBuilder.create()
                                .duration(Duration.millis(3000))
                                .toX(66)
                                .node(fullscreen)
                                .onFinished(new EventHandler<ActionEvent>() {
                            @Override
                            public void handle(ActionEvent t) {
                                fullscreenButtonTransition = null;
                            }
                        })
                                .build();
                        fullscreenButtonTransition.play();
                        fullscreen.setOpacity(0.2);
                    } else {
                        // String and icon
                        fullscreen.getStyleClass().remove("decoration-button-unfullscreen");
                        fullscreen.setTooltip(new Tooltip(LOC.getString("FullScreen")));

                        undecoratorController.restoreFullScreenSavedBounds(stage);
                        fullscreen.setOpacity(1);
                        if (fullscreenButtonTransition != null) {
                            fullscreenButtonTransition.stop();
View Full Code Here

                }
            }
        });

        // Close button
        close.setTooltip(new Tooltip(LOC.getString("Close")));
        close.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent t) {
                switchClose();
            }
        });

        // Maximize button
        // If changed via contextual menu
        maximizeProperty().addListener(new ChangeListener<Boolean>() {
            @Override
            public void changed(ObservableValue<? extends Boolean> ov, Boolean t, Boolean t1) {
                Tooltip tooltip = maximize.getTooltip();
                if (tooltip.getText().equals(LOC.getString("Maximize"))) {
                    tooltip.setText(LOC.getString("Restore"));
                    maximizeMenuItem.setText(LOC.getString("Restore"));
                    maximize.getStyleClass().add("decoration-button-restore");
                    resize.setVisible(false);
                } else {
                    tooltip.setText(LOC.getString("Maximize"));
                    maximizeMenuItem.setText(LOC.getString("Maximize"));
                    maximize.getStyleClass().remove("decoration-button-restore");
                    resize.setVisible(true);
                }
            }
        });

        if (maximize != null) { // Utility Stage
            maximize.setTooltip(new Tooltip(LOC.getString("Maximize")));
            maximize.setOnAction(new EventHandler<ActionEvent>() {
                @Override
                public void handle(ActionEvent t) {
                    switchMaximize();
                }
            });
        }
        if (fullscreen != null) { // Utility Stage
            fullscreen.setTooltip(new Tooltip(LOC.getString("FullScreen")));
            fullscreen.setOnAction(new EventHandler<ActionEvent>() {
                @Override
                public void handle(ActionEvent t) {
                    switchFullscreen();
                }
            });
        }

        // Minimize button
        if (minimize != null) { // Utility Stage
            minimize.setTooltip(new Tooltip(LOC.getString("Minimize")));
            minimize.setOnAction(new EventHandler<ActionEvent>() {
                @Override
                public void handle(ActionEvent t) {
                    switchMinimize();
                }
View Full Code Here

//        });

        bgTaskProgressBar.progressProperty().bind(controller.regroupProgress());

        Platform.runLater(() -> {
            staleLabel.setTooltip(new Tooltip("Some data may be out of date.  Enable listening to ingest in Tools | Options | Image /Video Analyzer , after ingest is complete to update."));
        });
        staleLabel.visibleProperty().bind(controller.stale());
    }
View Full Code Here

        } else {
            hashHitImageView.setImage(null);
        }

        nameLabel.setText(text);
        nameLabel.setTooltip(new Tooltip(text));
    }
View Full Code Here

        protected void updateItem(NavTreeNode item, boolean empty) {
            super.updateItem(item, empty);
            if (item != null) {
                final String text = item.getDescription() + " (" + item.getCount() + ")";
                setText(text);
                setTooltip(new Tooltip(text));
                Rectangle rect = new Rectangle(24, 24);
                rect.setArcHeight(5);
                rect.setArcWidth(5);
                rect.setStrokeWidth(2);
                rect.setStroke(item.getType().getColor());
View Full Code Here

                setGraphic(null);
            });
        } else {
            final String name = StringUtils.defaultIfBlank(tNode.getPath(), DrawableGroup.UNKNOWN);
            Platform.runLater(() -> {
                setTooltip(new Tooltip(name));
            });
           

            if (tNode.getGroup() == null) {
                Platform.runLater(() -> {
View Full Code Here

        private void setTooltip() {
            final X start = getSpanStart();
            final X end = getSpanEnd();
            Tooltip.uninstall(this, tooltip);
            tooltip = new Tooltip("Double-click to zoom into range:\n" + formatSpan(start) + " to " + formatSpan(end) + "\nRight-click to clear.");
            Tooltip.install(this, tooltip);
        }
View Full Code Here

TOP

Related Classes of javafx.scene.control.Tooltip

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.