当前位置: 首页>>代码示例>>Java>>正文


Java HiddenSidesPane类代码示例

本文整理汇总了Java中org.controlsfx.control.HiddenSidesPane的典型用法代码示例。如果您正苦于以下问题:Java HiddenSidesPane类的具体用法?Java HiddenSidesPane怎么用?Java HiddenSidesPane使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


HiddenSidesPane类属于org.controlsfx.control包,在下文中一共展示了HiddenSidesPane类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: AvailableUsersPane

import org.controlsfx.control.HiddenSidesPane; //导入依赖的package包/类
/**
 * Constructor for the AvailableUsersPane.
 */
public AvailableUsersPane() {
    searchField = new CustomTextField();
    searchField.setRight(new SVGIcon(FontAwesomeIcon.SEARCH, Constants.EXTRA_SMALL_ICON, true));

    searchField.textProperty().addListener((observable, oldValue, newValue) -> search(newValue));

    userPanes = new VBox(Constants.INSETS);
    statusIcon = new BorderPane(new SVGIcon(MaterialDesignIcon.ACCOUNT_CIRCLE, Constants.MIDDLE_ICON, true));

    final ScrollPane verticalScrollPane = new ScrollPane();
    verticalScrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
    verticalScrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);

    final ScrollBar scrollBar = new ScrollBar();
    scrollBar.setOrientation(Orientation.VERTICAL);
    this.hiddenSidesPane = new HiddenSidesPane();
    hiddenSidesPane.setContent(verticalScrollPane);
    hiddenSidesPane.setRight(scrollBar);
    //hiddenSidesPane.setTriggerDistance(Constants.TRIGGER_DISTANCE);

    scrollBar.maxProperty().bind(verticalScrollPane.vmaxProperty());
    scrollBar.minProperty().bind(verticalScrollPane.vminProperty());

    verticalScrollPane.setContent(userPanes);
    verticalScrollPane.setFitToWidth(true);
    enableSearchField(false);

    hoverProperty().addListener((observable, oldValue, newValue) -> {
        enableSearchField(newValue);
    });
}
 
开发者ID:openbase,项目名称:bco.bcozy,代码行数:35,代码来源:AvailableUsersPane.java

示例2: ContextMenu

import org.controlsfx.control.HiddenSidesPane; //导入依赖的package包/类
/**
 * Constructor for the ContextMenu.
 *
 * @param height Height
 * @param width  Width
 */
public ContextMenu(final double height, final double width) {

    this.setMinHeight(height);
    this.setMinWidth(width);
    this.setPrefHeight(height);
    this.setPrefWidth(width);


    fullscreenBtn = new FloatingButton(new SVGIcon(MaterialIcon.FULLSCREEN, Constants.MIDDLE_ICON, true));

    settingsBtn = new FloatingButton(new SVGIcon(MaterialDesignIcon.SETTINGS, Constants.MIDDLE_ICON, true));

    HBox floatingButtons = new HBox(20.0, settingsBtn, fullscreenBtn);
    floatingButtons.setAlignment(Pos.TOP_LEFT);
    floatingButtons.translateYProperty().set(Constants.FLOATING_BUTTON_OFFSET_Y);
    floatingButtons.translateXProperty().set(Constants.FLOATING_BUTTON_OFFSET_X);


    roomInfo = new Label("Select a Room");
    roomInfo.setAlignment(Pos.TOP_CENTER);
    roomInfo.getStyleClass().clear();
    roomInfo.getStyleClass().add("headline");

    verticalScrollPane = new ScrollPane();
    verticalScrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
    verticalScrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);

    final ScrollBar scrollBar = new ScrollBar();
    scrollBar.setOrientation(Orientation.VERTICAL);
    final HiddenSidesPane hiddenSidesPane = new HiddenSidesPane();
    hiddenSidesPane.setContent(verticalScrollPane);
    hiddenSidesPane.setRight(scrollBar);
    hiddenSidesPane.setTriggerDistance(Constants.TRIGGER_DISTANCE);
    hiddenSidesPane.getStyleClass().add("hidden-sides-pane");

    scrollBar.maxProperty().bind(verticalScrollPane.vmaxProperty());
    scrollBar.minProperty().bind(verticalScrollPane.vminProperty());

    verticalScrollPane.vvalueProperty().bindBidirectional(scrollBar.valueProperty());

    //TODO: Delete completely - at the moment it is just not added to the rest
    contextSortingPane = new ContextSortingPane(width + Constants.INSETS);
    contextSortingPane.setMaxWidth(Double.MAX_VALUE);

    titledPaneContainer = new TitledUnitPaneContainer();

    verticalScrollPane.setFitToWidth(true);
    verticalScrollPane.setContent(titledPaneContainer);
    //TODO: Find a nicer way to scale the size of the scroll bar thumb
    scrollBar.setVisibleAmount(0.25);

    this.getChildren().addAll(floatingButtons, roomInfo, hiddenSidesPane);
    //VBox.setVgrow(contextSortingPane, Priority.ALWAYS);

    this.getStyleClass().addAll("detail-menu");
}
 
开发者ID:openbase,项目名称:bco.bcozy,代码行数:63,代码来源:ContextMenu.java


注:本文中的org.controlsfx.control.HiddenSidesPane类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。