當前位置: 首頁>>代碼示例>>Java>>正文


Java Tooltip.setText方法代碼示例

本文整理匯總了Java中javafx.scene.control.Tooltip.setText方法的典型用法代碼示例。如果您正苦於以下問題:Java Tooltip.setText方法的具體用法?Java Tooltip.setText怎麽用?Java Tooltip.setText使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javafx.scene.control.Tooltip的用法示例。


在下文中一共展示了Tooltip.setText方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initialize

import javafx.scene.control.Tooltip; //導入方法依賴的package包/類
/**
 * Initializes the controller class.
 *
 * @param url
 * @param rb
 */
@Override
public void initialize(URL url, ResourceBundle rb) {
    expressionsAnchorPane.prefWidthProperty().bind(primaryStageWindow.getScene().widthProperty());
    expressionsAnchorPane.prefHeightProperty().bind(primaryStageWindow.getScene().heightProperty().subtract(PIXEL_OFFSET_FOR_MENU));

    expressionSortOrder = ExpressionSortOrder.EVAL;
    expressionChoiceFilter = ExpressionChoiceFilter.ALL;
    // update 
    squidProject.getTask().setupSquidSessionSpecsAndReduceAndReport();

    initializeExpressionsChoiceFilterChoiceBox();
    initializeExpressionsSortFilterChoiceBox();
    initializeExpressionsListView();

    rmPeekTextArea.setStyle(SquidUI.PEEK_LIST_CSS_STYLE_SPECS);
    unPeekTextArea.setStyle(SquidUI.PEEK_LIST_CSS_STYLE_SPECS);

    webEngine = expressionWebView.getEngine();

    Tooltip tooltip = new Tooltip();
    tooltip.setText("Choose local to see graph in panel to right.  De-select if expressions look poorly renedered and select browser instead.");
    graphHereCheckbox.setTooltip(tooltip);
    graphBrowserCheckbox.setTooltip(tooltip);
}
 
開發者ID:CIRDLES,項目名稱:Squid,代碼行數:31,代碼來源:ExpressionManagerController.java

示例2: HorizonChart

import javafx.scene.control.Tooltip; //導入方法依賴的package包/類
public HorizonChart(final int BANDS, final Series<T> SERIES, final boolean SMOOTHED) {
    series        = SERIES;
    scaleX        = 1;
    scaleY        = 1;
    smoothed      = SMOOTHED;
    referenceZero = true;
    noOfBands     = clamp(1, MAX_NO_OF_BANDS, BANDS);
    noOfItems     = SERIES.getNoOfItems();
    minY          = SERIES.getItems().stream().mapToDouble(Data::getY).min().getAsDouble();
    maxY          = SERIES.getItems().stream().mapToDouble(Data::getY).max().getAsDouble();
    bandWidth     = (maxY - minY) / noOfBands;
    tooltip       = new Tooltip();
    tooltip.setAnchorLocation(AnchorLocation.CONTENT_BOTTOM_LEFT);

    adjustColors();

    // Create list of points
    points = new ArrayList<>(noOfItems);
    prepareData();

    mouseListener           = mouseEvent -> {
        final EventType<? extends MouseEvent> TYPE = mouseEvent.getEventType();
        if (MouseEvent.MOUSE_CLICKED == TYPE) {
            Data<T> data = selectDataAt(mouseEvent.getX());
            tooltip.setText(createTooltipText(data));
            tooltip.setX(mouseEvent.getScreenX());
            tooltip.setY(mouseEvent.getScreenY());
            tooltip.show(getScene().getWindow());
            getSeries().fireSeriesEvent(new SeriesEvent(getSeries(), data, SeriesEventType.SELECT_DATA));
        } else if (MouseEvent.MOUSE_MOVED == TYPE) {
            tooltip.hide();
        } else if (MouseEvent.MOUSE_EXITED == TYPE) {
            tooltip.hide();
        }
    };
    seriesListener          = seriesEvent -> redraw();

    initGraphics();
    registerListeners();
}
 
開發者ID:HanSolo,項目名稱:horizon,代碼行數:41,代碼來源:HorizonChart.java

示例3: Page

import javafx.scene.control.Tooltip; //導入方法依賴的package包/類
public Page(String title, PagePane pagePane) {
        this.setText(title);
        setClosable(true);
        tooltip=new Tooltip();
        tooltip.setText(title);
        tooltip.textProperty().bind(this.textProperty());
        try {
            StackPane headerArea = (StackPane) pagePane.lookup(".tab-header-area");

            URL location = getClass().getResource("/fxml/tab_content.fxml");

            FXMLLoader fxmlLoader = new FXMLLoader();
            fxmlLoader.setLocation(location);
            fxmlLoader.setBuilderFactory(new JavaFXBuilderFactory());
            Parent parent =  fxmlLoader.load(location.openStream());

//            FXMLLoader fxmlLoader=new FXMLLoader(Res.getFxmlRes("tab_content"));
//            Pane parent=fxmlLoader.load();
            setContent(parent);
            controller=fxmlLoader.getController();
            controller.getHeader().prefWidthProperty().bind(pagePane.widthProperty());
            controller.getContainer().prefWidthProperty().bind(pagePane.widthProperty());
            controller.getContainer().prefHeightProperty().bind(pagePane.heightProperty()
                    .subtract(headerArea.heightProperty())
                    .subtract(controller.getHeader().heightProperty()));
            this.setOnClosed(controller::close);
            controller.setTab(this);
            controller.setPagePane(pagePane);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
 
開發者ID:whitewoodcity,項目名稱:xbrowser,代碼行數:33,代碼來源:Page.java

示例4: setToolTip

import javafx.scene.control.Tooltip; //導入方法依賴的package包/類
public static void setToolTip(final Node node, final String toolTipText)
{
    final Tooltip toolTip = new Tooltip();
    toolTip.setText(toolTipText);
    Tooltip.install(node, toolTip);
}
 
開發者ID:Leviathan-Studio,項目名稱:MineIDE,代碼行數:7,代碼來源:Gui.java

示例5: afficherInfoVille

import javafx.scene.control.Tooltip; //導入方法依賴的package包/類
public void afficherInfoVille(boolean aStation, int nbCubeJaune, int nbCubeRouge, int nbCubeBleu, int nbCubeNoir) {

        Tooltip infoVille = new Tooltip();

        infoVille.setText("A une Station de Recherche"+aStation+"\n"

        +"Cube maladie jaune : "+nbCubeJaune+"\n"

        +"Cube maladie rouge : "+nbCubeRouge+"\n"

        +"Cube maladie bleu : "+nbCubeBleu+"\n"

        +"Cube maladie noir : "+nbCubeNoir+"\n");

    }
 
開發者ID:tillind,項目名稱:pandemie,代碼行數:16,代碼來源:BoardController.java


注:本文中的javafx.scene.control.Tooltip.setText方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。