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


Java Pane.setVisible方法代碼示例

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


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

示例1: showProjectExplorer

import javafx.scene.layout.Pane; //導入方法依賴的package包/類
public void showProjectExplorer(final boolean show)
{
    final Pane elem = GuiMain.getInstance().getProjectExplorer().getRoot();
    final ContentPane pane = GuiMain.getInstance().getContentPanel();

    elem.setVisible(show);
    Preference.getPreference().setBoolean("ui.main.show_project_explorer", show);

    if (show)
    {
        if (!pane.getRoot().getItems().contains(elem))
            pane.getRoot().getItems().add(0, elem);
        this.toggleProjectExplorer.setTranslateKey("menu.window.item.hide_projectExplorer");
        pane.setDividerPositions();
    }
    else
    {
        pane.getRoot().getItems().remove(elem);
        this.toggleProjectExplorer.setTranslateKey("menu.window.item.show_projectExplorer");
    }
}
 
開發者ID:Leviathan-Studio,項目名稱:MineIDE,代碼行數:22,代碼來源:GuiMenuBar.java

示例2: showToolbar

import javafx.scene.layout.Pane; //導入方法依賴的package包/類
public void showToolbar(final boolean show)
{
    final Pane elem = GuiMain.getInstance().getToolBar().getRoot();

    elem.setVisible(show);
    Preference.getPreference().setBoolean("ui.main.show_toolbar", show);

    if (show)
    {
        if (!GuiMain.getInstance().getTopPanel().getChildren().contains(elem))
            GuiMain.getInstance().getTopPanel().getChildren().add(elem);
        this.toggleToolBar.setTranslateKey("menu.window.item.hide_toolbar");
    }
    else
    {
        GuiMain.getInstance().getTopPanel().getChildren().remove(elem);
        this.toggleToolBar.setTranslateKey("menu.window.item.show_toolbar");
    }
}
 
開發者ID:Leviathan-Studio,項目名稱:MineIDE,代碼行數:20,代碼來源:GuiMenuBar.java

示例3: showMenubar

import javafx.scene.layout.Pane; //導入方法依賴的package包/類
public void showMenubar(final boolean show)
{
    final Pane elem = GuiMain.getInstance().getMenuBar().getRoot();

    elem.setVisible(show);
    Preference.getPreference().setBoolean("ui.main.show_menubar", show);

    if (show)
    {
        if (!GuiMain.getInstance().getTopPanel().getChildren().contains(elem))
            GuiMain.getInstance().getTopPanel().getChildren().add(0, elem);
        this.toggleToolBar.setTranslateKey("menu.window.item.hide_toolbar");
    }
    else
    {
        GuiMain.getInstance().getTopPanel().getChildren().remove(elem);
        this.toggleToolBar.setTranslateKey("menu.window.item.show_menubar");
    }
}
 
開發者ID:Leviathan-Studio,項目名稱:MineIDE,代碼行數:20,代碼來源:GuiMenuBar.java

示例4: getCoordinatesCalculatePathShowDirectionsAndHidePanel

import javafx.scene.layout.Pane; //導入方法依賴的package包/類
private void getCoordinatesCalculatePathShowDirectionsAndHidePanel(final Pane path_choice_pane,
                                                                   final TextField txt_from, final TextField txt_to,
                                                                   final Button btn_get_coords_find_path) {
    final String addressOrigin = txt_from.getText();
    final String addressDestination = txt_to.getText();

    final DirectionsRequest directionsRequest =
            new DirectionsRequest(addressOrigin, addressDestination, TravelModes.DRIVING);

    directionsPane = mapComponent.getDirec(); // TODO: 11/10/2017 IT HAS TO BE CLEARED!
    directionsService = new DirectionsService();
    directionsRenderer = new DirectionsRenderer(true, map, directionsPane);
    directionsService.getRoute(directionsRequest, this, directionsRenderer);

    if (!addressOrigin.equals("") || !addressDestination.equals("")) {
        path_choice_pane.setVisible(false);
        btn_get_coords_find_path.setVisible(false);
    }
}
 
開發者ID:Evegen55,項目名稱:main_carauto_board,代碼行數:20,代碼來源:GmapfxController.java

示例5: initControls

import javafx.scene.layout.Pane; //導入方法依賴的package包/類
private void initControls(final Button btn_clear_directions, final Button btn_show_directions,
                              final Button btn_find_path, final Button btn_clear_path, final Pane path_choice_pane,
                              final Button btn_get_coords_find_path, final TextField txt_from, final TextField txt_to) {
        //first thing to do
        path_choice_pane.setVisible(false);
        btn_get_coords_find_path.setVisible(false);

        btn_clear_directions.setOnAction(action -> {
//            directionsRenderer.getJSObject().eval("hideDirections()");
            //or - in order to avoid check dir renderer for null
            map.hideDirectionsPane();
        });

        btn_show_directions.setOnAction(action -> map.showDirectionsPane());

        //clear directions
        //clear route
        //clear texts - text fields always with ""
        //show pane with path choice
        btn_find_path.setOnAction(action -> {
            clearPath();
            txt_from.clear();
            txt_to.clear();
            path_choice_pane.setVisible(true);
            btn_get_coords_find_path.setVisible(true);

            //text fields are always not null but "" because we invoked clear()
            btn_get_coords_find_path.setOnAction(btn_action ->
                    getCoordinatesCalculatePathShowDirectionsAndHidePanel(path_choice_pane, txt_from,
                            txt_to, btn_get_coords_find_path));

            //add text fields to a listener
            MOUSE_CLCK_FOR_GET_COORD_LISTENER.setTxt_from(txt_from);
            MOUSE_CLCK_FOR_GET_COORD_LISTENER.setTxt_to(txt_to);
        });

        btn_clear_path.setOnAction(action -> clearPath());
    }
 
開發者ID:Evegen55,項目名稱:main_carauto_board,代碼行數:39,代碼來源:GmapfxController.java


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