当前位置: 首页>>代码示例>>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;未经允许,请勿转载。