@Override public Node createLabel() { final Label l = new Label(label); l.setTooltip( new Tooltip(tooltip) ); return l; }
TreeTableColumn<String, ArrayList<String>> col = new TreeTableColumn<>(); Label label = new Label(ent.getValue()); col.setGraphic(label); label.setTooltip(new Tooltip("Tooltip text goes here"));
@Override public Node createLabel() { final Label l = new Label(label); l.setTooltip( new Tooltip(tooltip) ); return l; }
/** * @param operationResult */ protected void handleResult(IOperationResult operationResult) { final ObjectModel account = (ObjectModel) operationResult.rootData(); label.setText(account.getName()); label.setTooltip(new Tooltip(account.getName())); }
/** * Dispaly current value */ protected void displayValue() { String currVal = getCurrentDisplayText(); Label currValLabel = new Label(); currentValuesPresenter.getChildren().clear(); currentValuesPresenter.getChildren().add(currValLabel); if (StringUtils.isNotBlank(currVal)) { String[] t = currVal.split(File.separator); String val = t[t.length - 1]; currValLabel.setText(val); currValLabel.setMaxWidth(100); currValLabel.setTooltip(new Tooltip(currVal)); } }
label.setTooltip(new Tooltip(description));
private Node createDecorationNode(ValidationMessage message) { Node graphic = Severity.ERROR == message.getSeverity() ? createErrorNode() : createWarningNode(); graphic.setStyle(SHADOW_EFFECT); Label label = new Label(); label.setGraphic(graphic); label.setTooltip(createTooltip(message)); label.setAlignment(Pos.CENTER); return label; }
/** * @{inheritedDoc} */ @Override public void build(IInputComponentWrapper inputComponentWrapper) { super.build(inputComponentWrapper); final String labelKey = configuration.getPropertyValue(XMLConstants.LABEL); label.setText(controller.getLocalised(labelKey)); label.setWrapText(true); NodeHelper.styleClassAddAll(label, getConfiguration(), "viewStyleClass", "form-info-value"); label.setTooltip(new Tooltip(controller.getLocalised(labelKey))); }
/** * @{inheritedDoc} */ @Override public void displayError() { if(isNotValid()) { String errorMessage = getFirstErrorMessage(); if (errorMessage == null) { errorMessage = "Invalid Field"; } buildHelpTextAndErrorText(); errorText.setText(errorMessage); errorText.setTooltip(new Tooltip(errorMessage)); errorText.setVisible(true); state = VLConstraintState.NOT_VALID; input.setInErrorState(); if (!inputContainer.getChildren().contains(errorText)) { inputContainer.getChildren().add(errorText); } } else { errorText.setVisible(false); } }
private Label addLabelContent(GridPane gridPane, int row, Attribute<?,?> attribute) { String mnemonicLabelText=uniformDesign.getLabelText(attribute); if (mnemonicLabelText!=null){ mnemonicLabelText="_"+mnemonicLabelText; } Label label = new Label(mnemonicLabelText); label.setMnemonicParsing(true); label.setWrapText(true); // label.setTextOverrun(OverrunStyle.CLIP); GridPane.setMargin(label, new Insets(0, 9, 0, 0)); StackPane pane = new StackPane(); pane.setPadding(new Insets(5,3,5,3)); pane.setAlignment(Pos.CENTER_LEFT); pane.getChildren().add(label); gridPane.add(pane, 0, row); if (row%2==0) { pane.setStyle("-fx-background-color: " + highlightBackground + ";"); } String tooltip=uniformDesign.getTooltipText(attribute); if (!Strings.isNullOrEmpty(tooltip)) { label.setTooltip(new Tooltip(tooltip)); } return label; } final static String highlightBackground = "#FCFCFC";
private static void updatePseudoState(Label statusIcon, Status status) { statusIcon.pseudoClassStateChanged(error, status.getState() == State.ERROR); statusIcon.pseudoClassStateChanged(warning, status.getState() == State.WARNING); statusIcon.pseudoClassStateChanged(ok, status.getState() == State.OK); statusIcon.pseudoClassStateChanged(cancel, status.getState() == State.CANCEL); statusIcon.autosize(); if( statusIcon.getTooltip() == null ) { if( status.getState() != State.OK ) { statusIcon.setTooltip(new Tooltip(status.getMessage())); } } else { statusIcon.getTooltip().setText(status.getMessage()); } }
private Node buildTile(final IconFont iconFont) { final VBox box = new VBox(); box.setAlignment(Pos.CENTER); box.setPrefSize(100, 50); final Label icon = new Label(); iconFont.use(icon); icon.setPadding(new Insets(4)); icon.setAlignment(Pos.CENTER); VBox.setVgrow(icon, Priority.ALWAYS); final Label text = new Label(iconFont.name()); text.setAlignment(Pos.BOTTOM_CENTER); VBox.setVgrow(text, Priority.SOMETIMES); text.setTooltip(new Tooltip(iconFont.name())); box.getChildren().addAll(icon, text); // box.setStyle("-fx-background-color:red;"); return box; }