javafx.scene.control.Tooltip Java Examples
The following examples show how to use
javafx.scene.control.Tooltip.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ImageManufactureBatchController.java From MyBox with Apache License 2.0 | 6 votes |
@Override public void initTargetSection() { super.initTargetSection(); fileTypeGroup.selectedToggleProperty().addListener(new ChangeListener<Toggle>() { @Override public void changed(ObservableValue<? extends Toggle> ov, Toggle old_toggle, Toggle new_toggle) { checkFileType(); } }); checkFileType(); if (pcxRadio != null) { FxmlControl.setTooltip(pcxRadio, new Tooltip(message("PcxComments"))); } browseButton.setDisable(true); }
Example #2
Source File: FXUIUtils.java From marathonv5 with Apache License 2.0 | 6 votes |
public static ButtonBase _initButtonBase(String name, String toolTip, boolean enabled, String buttonText, ButtonBase button) { button.setId(name + "Button"); button.setTooltip(new Tooltip(toolTip)); Node enabledIcon = getImageFrom(name, "icons/", FromOptions.NULL_IF_NOT_EXISTS); if (enabledIcon != null) { button.setText(null); button.setGraphic(enabledIcon); } if (buttonText != null) { button.setText(buttonText); } else if (enabledIcon == null) { button.setText(name); } button.setDisable(!enabled); button.setMinWidth(Region.USE_PREF_SIZE); return button; }
Example #3
Source File: UndoButtons.java From phoebus with Eclipse Public License 1.0 | 6 votes |
/** @param undo_manager {@link UndoableActionManager} * @return Undo and Redo button */ public static Button[] createButtons(final UndoableActionManager undo_manager) { final Button undo_btn = new Button(); undo_btn.setGraphic(ImageCache.getImageView(UndoButtons.class, "/icons/undo.png")); undo_btn.setTooltip(new Tooltip(Messages.Undo_TT)); undo_btn.setDisable(!undo_manager.canUndo()); undo_btn.setOnAction(event -> undo_manager.undoLast()); final Button redo_btn = new Button(); redo_btn.setGraphic(ImageCache.getImageView(UndoButtons.class, "/icons/redo.png")); redo_btn.setTooltip(new Tooltip(Messages.Redo_TT)); redo_btn.setDisable(!undo_manager.canRedo()); redo_btn.setOnAction(event -> undo_manager.redoLast()); // Automatically enable/disable based on what's possible undo_manager.addListener((to_undo, to_redo) -> Platform.runLater(()-> { undo_btn.setDisable(to_undo == null); redo_btn.setDisable(to_redo == null); }) ); return new Button[] { undo_btn, redo_btn }; }
Example #4
Source File: Utils.java From dolphin-platform with Apache License 2.0 | 6 votes |
public static void registerTooltip(Control node, WithDescription bean) { Tooltip tooltip = new Tooltip(); tooltip.textProperty().bind(FXWrapper.wrapStringProperty(bean.descriptionProperty())); FXWrapper.wrapStringProperty(bean.descriptionProperty()).addListener(e -> { if (bean.getDescription() == null || bean.getDescription().isEmpty()) { node.setTooltip(null); } else { node.setTooltip(tooltip); } }); if (bean.getDescription() == null || bean.getDescription().isEmpty()) { node.setTooltip(null); } else { node.setTooltip(tooltip); } }
Example #5
Source File: DockItemWithInput.java From phoebus with Eclipse Public License 1.0 | 6 votes |
/** Set input * * <p>Registers the input to be persisted and restored. * The tab tooltip indicates complete input, * while tab label will be set to basic name (sans path and extension). * For custom name, call <code>setLabel</code> after updating input * in <code>Platform.runLater()</code> * * @param input Input * @see DockItemWithInput#setLabel(String) */ public void setInput(final URI input) { this.input = input; final String name = input == null ? null : extract_name(input.getPath()); // Tooltip update must be on UI thread Platform.runLater(() -> { if (input == null) name_tab.setTooltip(new Tooltip(Messages.DockNotSaved)); else { name_tab.setTooltip(new Tooltip(input.toString())); setLabel(name); } }); }
Example #6
Source File: GUIUtil.java From bisq with GNU Affero General Public License v3.0 | 6 votes |
public static void updateConfidence(TransactionConfidence confidence, Tooltip tooltip, TxConfidenceIndicator txConfidenceIndicator) { if (confidence != null) { switch (confidence.getConfidenceType()) { case UNKNOWN: tooltip.setText(Res.get("confidence.unknown")); txConfidenceIndicator.setProgress(0); break; case PENDING: tooltip.setText(Res.get("confidence.seen", confidence.numBroadcastPeers())); txConfidenceIndicator.setProgress(-1.0); break; case BUILDING: tooltip.setText(Res.get("confidence.confirmed", confidence.getDepthInBlocks())); txConfidenceIndicator.setProgress(Math.min(1, (double) confidence.getDepthInBlocks() / 6.0)); break; case DEAD: tooltip.setText(Res.get("confidence.invalid")); txConfidenceIndicator.setProgress(0); break; } txConfidenceIndicator.setPrefSize(24, 24); } }
Example #7
Source File: ASTTreeCell.java From pmd-designer with BSD 2-Clause "Simplified" License | 6 votes |
private ContextMenu buildContextMenu(Node item) { ContextMenu contextMenu = new ContextMenuWithNoArrows(); CustomMenuItem menuItem = new CustomMenuItem(new Label("Export subtree...", new FontIcon("fas-external-link-alt"))); Tooltip tooltip = new Tooltip("Export subtree to a text format"); Tooltip.install(menuItem.getContent(), tooltip); menuItem.setOnAction( e -> getService(DesignerRoot.TREE_EXPORT_WIZARD).apply(x -> x.showYourself(x.bindToNode(item))) ); contextMenu.getItems().add(menuItem); return contextMenu; }
Example #8
Source File: StreamChart.java From charts with Apache License 2.0 | 6 votes |
private void initGraphics() { if (Double.compare(getPrefWidth(), 0.0) <= 0 || Double.compare(getPrefHeight(), 0.0) <= 0 || Double.compare(getWidth(), 0.0) <= 0 || Double.compare(getHeight(), 0.0) <= 0) { if (getPrefWidth() > 0 && getPrefHeight() > 0) { setPrefSize(getPrefWidth(), getPrefHeight()); } else { setPrefSize(PREFERRED_WIDTH, PREFERRED_HEIGHT); } } canvas = new Canvas(PREFERRED_WIDTH, PREFERRED_HEIGHT); ctx = canvas.getGraphicsContext2D(); tooltip = new Tooltip(); tooltip.setAutoHide(true); getChildren().setAll(canvas); }
Example #9
Source File: RTTimePlot.java From phoebus with Eclipse Public License 1.0 | 6 votes |
/** @param enabled <code>true</code> to enable scrolling */ public void setScrolling(final boolean enabled) { //TODO: Fix graphics size to button size final ScheduledFuture<?> was_scrolling; if (enabled) { // Show that scrolling is 'on', and tool tip explains that it can be turned off scroll_img.imageProperty().set(scroll_on); scroll.setTooltip(new Tooltip(Messages.Scroll_Off_TT)); // Scroll once so that end of axis == 'now', // because otherwise one of the listeners might right away // disable scrolling scroll(); final long scroll_period = scroll_step.toMillis(); was_scrolling = scrolling.getAndSet(Activator.thread_pool.scheduleAtFixedRate(RTTimePlot.this::scroll, scroll_period, scroll_period, TimeUnit.MILLISECONDS)); } else { // Other way around scroll_img.imageProperty().set(scroll_off); scroll.setTooltip(new Tooltip(Messages.Scroll_On_TT)); was_scrolling = scrolling.getAndSet(null); } if (was_scrolling != null) was_scrolling.cancel(false); }
Example #10
Source File: ViewText.java From latexdraw with GNU General Public License v3.0 | 6 votes |
private void updateImageText(final Tuple<Image, String> values) { if(currentCompilation != null && currentCompilation.isDone()) { currentCompilation = null; } compiledText.setUserData(values.b); // A text will be used to render the text shape. if(values.a == null) { compileTooltip.setText(SystemUtils.getInstance().getLatexErrorMessageFromLog(values.b)); Tooltip.install(text, compileTooltip); setImageTextEnable(false); compiledText.setImage(null); }else { // An image will be used to render the text shape. compileTooltip.setText(null); Tooltip.uninstall(text, compileTooltip); compiledText.setImage(values.a); setImageTextEnable(true); updateTranslationCompiledText(); getCanvasParent().ifPresent(canvas -> canvas.update()); } }
Example #11
Source File: UndoRedoManager.java From latexdraw with GNU General Public License v3.0 | 6 votes |
@Override public void initialize(final URL location, final ResourceBundle resources) { setActivated(true); undoB.setDisable(true); redoB.setDisable(true); addDisposable(UndoCollector.getInstance().redos().subscribe(redoable -> { redoB.setDisable(redoable.isEmpty()); redoB.setTooltip(redoable.map(u -> new Tooltip(u.getUndoName(lang))).orElse(null)); })); addDisposable(UndoCollector.getInstance().undos().subscribe(undoable -> { undoB.setDisable(undoable.isEmpty()); undoB.setTooltip(undoable.map(u -> new Tooltip(u.getUndoName(lang))).orElse(null)); })); }
Example #12
Source File: HandCard.java From metastone with GNU General Public License v2.0 | 6 votes |
@Override public void setCard(GameContext context, Card card, Player player) { super.setCard(context, card, player); if (tooltipContent == null) { tooltip = new Tooltip(); tooltipContent = new CardTooltip(); tooltipContent.setCard(context, card, player); tooltip.setGraphic(tooltipContent); Tooltip.install(this, tooltip); } else { tooltipContent.setCard(context, card, player); } hideCard(player.hideCards()); if (player.hideCards()) { Tooltip.uninstall(this, tooltip); tooltipContent = null; tooltip = null; } }
Example #13
Source File: NodeDetailPaneController.java From pmd-designer with BSD 2-Clause "Simplified" License | 6 votes |
@Override protected void beforeParentInit() { additionalInfoListView.setPlaceholder(new Label("No additional info")); Val<Node> currentSelection = initNodeSelectionHandling(getDesignerRoot(), EventStreams.never(), false); // pin to see updates currentSelection.pin(); hideCommonAttributesProperty() .values() .distinct() .subscribe(show -> setFocusNode(currentSelection.getValue(), new DataHolder())); attrValueColumn.setCellValueFactory(param -> Val.constant(DesignerUtil.attrToXpathString(param.getValue()))); attrNameColumn.setCellValueFactory(param -> Val.constant("@" + param.getValue().getName())); attrNameColumn.setCellFactory(col -> new AttributeNameTableCell()); Label valueColGraphic = new Label("Value"); valueColGraphic.setTooltip(new Tooltip("This is the XPath 2.0 representation")); attrValueColumn.setGraphic(valueColGraphic); }
Example #14
Source File: DataSourceTitledPane.java From constellation with Apache License 2.0 | 6 votes |
public DataSourceTitledPane(final DataAccessPlugin plugin, final ImageView dataSourceIcon, final PluginParametersPaneListener top, final Set<String> globalParamLabels) { this.plugin = plugin; this.top = top; this.globalParamLabels = globalParamLabels; isLoaded = false; enabled = new CheckBox(); label = new Label(plugin.getName(), dataSourceIcon); setGraphic(createTitleBar()); enabled.setDisable(true); final boolean isExpanded = DataAccessPreferences.isExpanded(plugin.getName(), false); createParameters(isExpanded, null); setPadding(Insets.EMPTY); setTooltip(new Tooltip(plugin.getDescription())); }
Example #15
Source File: AttributeNode.java From constellation with Apache License 2.0 | 6 votes |
public final void setAttribute(Attribute attribute, boolean isKey) { if (attribute != this.attribute || this.isKey != isKey) { this.attribute = attribute; this.isKey = isKey; setText(attribute.getName()); if (isKey) { setGraphic(new ImageView(KEY_IMAGE)); } else if (attribute instanceof NewAttribute) { setGraphic(new ImageView(ADD_IMAGE)); } else { setGraphic(null); } setTooltip(new Tooltip(String.format("%s: %s", attribute.getAttributeType(), attribute.getDescription()))); deleteMenu.setDisable(!(attribute instanceof NewAttribute)); } }
Example #16
Source File: ClickableBitcoinAddress.java From devcoretalk with GNU General Public License v2.0 | 6 votes |
public ClickableBitcoinAddress() { try { FXMLLoader loader = new FXMLLoader(getClass().getResource("bitcoin_address.fxml")); loader.setRoot(this); loader.setController(this); // The following line is supposed to help Scene Builder, although it doesn't seem to be needed for me. loader.setClassLoader(getClass().getClassLoader()); loader.load(); AwesomeDude.setIcon(copyWidget, AwesomeIcon.COPY); Tooltip.install(copyWidget, new Tooltip("Copy address to clipboard")); AwesomeDude.setIcon(qrCode, AwesomeIcon.QRCODE); Tooltip.install(qrCode, new Tooltip("Show a barcode scannable with a mobile phone for this address")); addressStr = convert(address); addressLabel.textProperty().bind(addressStr); } catch (IOException e) { throw new RuntimeException(e); } }
Example #17
Source File: FXUtil.java From arma-dialog-creator with MIT License | 6 votes |
/** As of Java 8, setting the tooltip show delay isn't possible. Until an official implementation, this is one way to configure the tooltip show delay @param tooltip tooltip to change delay of @param delayMillis milliseconds before the tooltip can appear */ public static void hackTooltipStartTiming(Tooltip tooltip, double delayMillis) { try { Field fieldBehavior = tooltip.getClass().getDeclaredField("BEHAVIOR"); fieldBehavior.setAccessible(true); Object objBehavior = fieldBehavior.get(tooltip); Field fieldTimer = objBehavior.getClass().getDeclaredField("activationTimer"); fieldTimer.setAccessible(true); Timeline objTimer = (Timeline) fieldTimer.get(objBehavior); objTimer.getKeyFrames().clear(); objTimer.getKeyFrames().add(new KeyFrame(new Duration(delayMillis))); } catch (Exception e) { e.printStackTrace(System.out); } }
Example #18
Source File: ChartCanvas.java From ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * Sets the tooltip text, with the (x, y) location being used for the * anchor. If the text is {@code null}, no tooltip will be displayed. * This method is intended for calling by the {@link TooltipHandlerFX} * class, you won't normally call it directly. * * @param text the text ({@code null} permitted). * @param x the x-coordinate of the mouse pointer. * @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); } } else { Tooltip.uninstall(this, this.tooltip); this.tooltip = null; } }
Example #19
Source File: LowerRightRegion.java From tilesfx with Apache License 2.0 | 5 votes |
public void setTooltipText(final String TEXT) { if (null == TEXT || TEXT.isEmpty()) { Tooltip.uninstall(path, tooltip); } else { tooltip.setText(TEXT); Tooltip.install(path, tooltip); } }
Example #20
Source File: PVTable.java From phoebus with Eclipse Public License 1.0 | 5 votes |
private Button createButton(final String icon, final String tooltip, final EventHandler<ActionEvent> handler) { final Button button = new Button(); button.setGraphic(new ImageView(PVTableApplication.getIcon(icon))); button.setTooltip(new Tooltip(tooltip)); button.setOnAction(handler); return button; }
Example #21
Source File: SunburstChart.java From tilesfx with Apache License 2.0 | 5 votes |
private Path createSegment(final double START_ANGLE, final double END_ANGLE, final double INNER_RADIUS, final double OUTER_RADIUS, final Color FILL, final Color STROKE, final TreeNode<ChartData> NODE) { double startAngleRad = Math.toRadians(START_ANGLE + 90); double endAngleRad = Math.toRadians(END_ANGLE + 90); boolean largeAngle = Math.abs(END_ANGLE - START_ANGLE) > 180.0; double x1 = centerX + INNER_RADIUS * Math.sin(startAngleRad); double y1 = centerY - INNER_RADIUS * Math.cos(startAngleRad); double x2 = centerX + OUTER_RADIUS * Math.sin(startAngleRad); double y2 = centerY - OUTER_RADIUS * Math.cos(startAngleRad); double x3 = centerX + OUTER_RADIUS * Math.sin(endAngleRad); double y3 = centerY - OUTER_RADIUS * Math.cos(endAngleRad); double x4 = centerX + INNER_RADIUS * Math.sin(endAngleRad); double y4 = centerY - INNER_RADIUS * Math.cos(endAngleRad); MoveTo moveTo1 = new MoveTo(x1, y1); LineTo lineTo2 = new LineTo(x2, y2); ArcTo arcTo3 = new ArcTo(OUTER_RADIUS, OUTER_RADIUS, 0, x3, y3, largeAngle, true); LineTo lineTo4 = new LineTo(x4, y4); ArcTo arcTo1 = new ArcTo(INNER_RADIUS, INNER_RADIUS, 0, x1, y1, largeAngle, false); Path path = new Path(moveTo1, lineTo2, arcTo3, lineTo4, arcTo1); path.setFill(FILL); path.setStroke(STROKE); String tooltipText = new StringBuilder(NODE.getItem().getName()).append("\n").append(String.format(Locale.US, formatString, NODE.getItem().getValue())).toString(); Tooltip.install(path, new Tooltip(tooltipText)); path.setOnMousePressed(new WeakEventHandler<>(e -> NODE.getTreeRoot().fireTreeNodeEvent(new TreeNodeEvent(NODE, EventType.NODE_SELECTED)))); return path; }
Example #22
Source File: ProjectSelection.java From marathonv5 with Apache License 2.0 | 5 votes |
@Override protected void updateItem(ProjectInfo item, boolean empty) { super.updateItem(item, empty); if (item != null) { String description = item.getDescription(); if (description != null && !description.equals("")) { setTooltip(new Tooltip(description)); } } }
Example #23
Source File: PeriodicTableDialogController.java From mzmine3 with GNU General Public License v2.0 | 5 votes |
@FXML public void handleMouseEnter(MouseEvent event) { Node source = (Node) event.getSource(); Button b = (Button) source; Elements element = Elements.ofString(b.getText()); elementSymbol = element.symbol(); String result = element.name(); b.setTooltip(new Tooltip(result)); textLabelup.setText(result + " (" + elementSymbol + ")"); textLabelup.setFont(new Font(30)); textLabelbottom.setText("Atomic number" + " " + element.number() + (", " + "Group" + " " + element.group()) + ", " + "Period" + " " + element.period() + "\n\n\n" + "CAS RN:" + " " + PeriodicTable.getCASId(elementSymbol) + "\n" + "Element Category:" + " " + serieTranslator(PeriodicTable.getChemicalSeries(elementSymbol)) + "\n" + "State:" + " " + phaseTranslator(PeriodicTable.getPhase(elementSymbol)) + "\n" + "Electronegativity:" + " " + (PeriodicTable.getPaulingElectronegativity(elementSymbol) == null ? "undefined" : PeriodicTable.getPaulingElectronegativity(elementSymbol))); StringBuilder sb_up = new StringBuilder("<html><FONT SIZE=+2>" + result + " (" + elementSymbol + ")</FONT><br> " + "Atomic number" + " " + element.number() + (", " + "Group" + " " + element.group()) + ", " + "Period" + " " + element.period() + "</html>"); StringBuilder sb_Center = new StringBuilder("<html><FONT> " + "CAS RN:" + " " + PeriodicTable.getCASId(elementSymbol) + "<br> " + "Element Category:" + " " + serieTranslator(PeriodicTable.getChemicalSeries(elementSymbol)) + "<br> " + "State:" + " " + phaseTranslator(PeriodicTable.getPhase(elementSymbol)) + "<br> " + "Electronegativity:" + " " + (PeriodicTable.getPaulingElectronegativity(elementSymbol) == null ? "undefined" : PeriodicTable.getPaulingElectronegativity(elementSymbol)) + "<br>" + "</FONT></html>"); }
Example #24
Source File: ApkItemView.java From ApkToolPlus with Apache License 2.0 | 5 votes |
public void initialize() { label.setText(apk.getName()); progressBar.setProgress(0); btnRemove.setTooltip(new Tooltip(apk.getAbsolutePath())); btnOpenDir.setTooltip(new Tooltip(apk.getParent())); btnOpenDir.setOnAction(event -> FileHelper.showInExplorer(apk)); setWaiting(); }
Example #25
Source File: ImageViewerController.java From MyBox with Apache License 2.0 | 5 votes |
protected void initOperationBox() { if (imageView != null) { if (operationBox != null) { operationBox.disableProperty().bind(Bindings.isNull(imageView.imageProperty())); } if (leftPaneControl != null) { leftPaneControl.visibleProperty().bind(Bindings.isNotNull(imageView.imageProperty())); } if (rightPaneControl != null) { rightPaneControl.visibleProperty().bind(Bindings.isNotNull(imageView.imageProperty())); } } if (selectAreaCheck != null) { selectAreaCheck.selectedProperty().addListener(new ChangeListener<Boolean>() { @Override public void changed(ObservableValue ov, Boolean oldValue, Boolean newValue) { AppVariables.setUserConfigValue("ImageSelect", selectAreaCheck.isSelected()); checkSelect(); } }); selectAreaCheck.setSelected(AppVariables.getUserConfigBoolean("ImageSelect", false)); checkSelect(); FxmlControl.setTooltip(selectAreaCheck, new Tooltip("CTRL+t")); } }
Example #26
Source File: Arrow.java From LogFX with GNU General Public License v3.0 | 5 votes |
public static Button arrowButton( Direction direction, EventHandler<ActionEvent> eventEventHandler, String toolTipText ) { Button button = new Button( "", new Arrow( direction ) ); button.setFont( Font.font( 4.0 ) ); button.setMinWidth( 16 ); button.setMinHeight( 8 ); button.setTooltip( new Tooltip( toolTipText ) ); button.getTooltip().setFont( Font.font( 12.0 ) ); button.setOnAction( eventEventHandler ); return button; }
Example #27
Source File: HeroToken.java From metastone with GNU General Public License v2.0 | 5 votes |
private void updateWeapon(Weapon weapon) { boolean hasWeapon = weapon != null; weaponPane.setVisible(hasWeapon); if (hasWeapon) { weaponNameLabel.setText(weapon.getName()); setScoreValue(weaponAttackAnchor, weapon.getWeaponDamage(), weapon.getBaseAttack()); setScoreValue(weaponDurabilityAnchor, weapon.getDurability(), weapon.getBaseDurability(), weapon.getMaxDurability()); Tooltip tooltip = new Tooltip(); CardTooltip tooltipContent = new CardTooltip(); tooltipContent.setCard(weapon.getSourceCard()); tooltip.setGraphic(tooltipContent); Tooltip.install(weaponPane, tooltip); } }
Example #28
Source File: LogButton.java From pdfsam with GNU Affero General Public License v3.0 | 5 votes |
LogButton() { super(MaterialDesignIcon.COMMENT_ALERT_OUTLINE); setOnAction(e -> eventStudio().broadcast(action, "LogStage")); setTooltip(new Tooltip(DefaultI18nContext.getInstance().i18n("Application messages"))); anim = Animations.shake(this); eventStudio().addAnnotatedListeners(this); }
Example #29
Source File: EditDataSet.java From chart-fx with Apache License 2.0 | 5 votes |
@Override protected void updateItem(ShiftConstraint shiftConstraint, boolean empty) { super.updateItem(shiftConstraint, empty); if (shiftConstraint == null || empty) { setGraphic(null); return; } Glyph result; Tooltip tooltip = new Tooltip(); switch (shiftConstraint) { case SHIFTX: result = new Glyph(FONT_AWESOME, FontAwesome.Glyph.ARROWS_H).size(FONT_SIZE_COMBO); tooltip.setText("Allow to modify the x value of the points"); setText("shift x"); break; case SHIFTXY: result = new Glyph(FONT_AWESOME, FontAwesome.Glyph.ARROWS).size(FONT_SIZE_COMBO); tooltip.setText("Allow to modify the the points freely"); setText("shift xy"); break; case SHIFTY: result = new Glyph(FONT_AWESOME, FontAwesome.Glyph.ARROWS_V).size(FONT_SIZE_COMBO); tooltip.setText("Allow to modify the x value of the points"); setText("shift y"); break; default: result = new Glyph(FONT_AWESOME, FontAwesome.Glyph.QUESTION_CIRCLE).size(FONT_SIZE_COMBO); setText("-"); } result.setTextFill(Color.DARKBLUE); result.setPadding(Insets.EMPTY); setGraphic(result); }
Example #30
Source File: PerfMonButton.java From phoebus with Eclipse Public License 1.0 | 5 votes |
public PerfMonButton() { updateFPS(60.0); fps_monitor = new FPSMonitor(this::updateFPS); fps_monitor.start(); setTooltip(new Tooltip("Press for GC")); setOnAction(event -> { Runtime.getRuntime().gc(); }); }