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


Java Bindings.bindContent方法代码示例

本文整理汇总了Java中javafx.beans.binding.Bindings.bindContent方法的典型用法代码示例。如果您正苦于以下问题:Java Bindings.bindContent方法的具体用法?Java Bindings.bindContent怎么用?Java Bindings.bindContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javafx.beans.binding.Bindings的用法示例。


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

示例1: TaskSkin

import javafx.beans.binding.Bindings; //导入方法依赖的package包/类
public TaskSkin(TaskProgressView<T> monitor) {
	super(monitor);

	BorderPane borderPane = new BorderPane();
	borderPane.getStyleClass().add("box");

	// list view
	ListView<T> listView = new ListView<>();
	listView.setPrefSize(500, 400);
	listView.setPlaceholder(new Label("No Downloads Currently"));
	listView.setCellFactory(param -> new TaskCell());
	listView.setFocusTraversable(false);

	Bindings.bindContent(listView.getItems(), monitor.getTasks());
	borderPane.setCenter(listView);

	getChildren().add(listView);
}
 
开发者ID:HearthProject,项目名称:OneClient,代码行数:19,代码来源:TaskSkin.java

示例2: onStart

import javafx.beans.binding.Bindings; //导入方法依赖的package包/类
@Override
public void onStart() {
	root.prefWidthProperty().bind(Main.mainController.contentBox.widthProperty());
	root.prefHeightProperty().bind(Main.mainController.contentBox.heightProperty());
	Bindings.bindContent(downloads.getTasks(), FXCollections.observableArrayList(DownloadManager.DOWNLOADS.values()));
	placeholder = new Label("No Downloads");
	downloads.getTasks().sort(Comparator.comparing(Task::isRunning));
	downloads.setSkin(new TaskSkin<>(downloads));
}
 
开发者ID:HearthProject,项目名称:OneClient,代码行数:10,代码来源:DownloadsPane.java

示例3: PrintView

import javafx.beans.binding.Bindings; //导入方法依赖的package包/类
/**
 * Constructs a new print view.
 */
public PrintView() {
    super();

    getStyleClass().add(DEFAULT_STYLE);

    final PaperView paperView = settingsView.getPaperView();
    final OptionsView optionsView = settingsView.getOptionsView();
    final TimeRangeView timeRangeView = settingsView.getTimeRangeView();
    final SourceView sourceView = settingsView.getSourceView();

    final PrintablePage printablePage = previewPane.getPrintablePage();

    paperView.viewTypeProperty().bindBidirectional(viewTypeProperty());
    timeRangeView.weekFieldsProperty().bind(weekFieldsProperty());
    timeRangeView.todayProperty().bind(todayProperty());
    Util.bindBidirectional(optionsView.showSwimlaneLayoutProperty(), layoutProperty(), LAYOUT_BOOLEAN_CONVERTER);

    printablePage.weekFieldsProperty().bind(weekFieldsProperty());

    printablePage.viewTypeProperty().bind(paperView.viewTypeProperty());
    printablePage.paperProperty().bind(paperView.paperProperty());
    printablePage.marginTypeProperty().bind(paperView.marginTypeProperty());
    printablePage.bottomMarginProperty().bind(paperView.bottomMarginProperty());
    printablePage.leftMarginProperty().bind(paperView.leftMarginProperty());
    printablePage.rightMarginProperty().bind(paperView.rightMarginProperty());
    printablePage.topMarginProperty().bind(paperView.topMarginProperty());

    printablePage.printStartDateProperty().bind(timeRangeView.startDateProperty());
    printablePage.printEndDateProperty().bind(timeRangeView.endDateProperty());
    printablePage.showAllDayEntriesProperty().bind(optionsView.showAllDayEntriesProperty());
    printablePage.showMiniCalendarsProperty().bind(optionsView.showMiniCalendarsProperty());
    printablePage.showCalendarKeysProperty().bind(optionsView.showCalendarKeysProperty());
    printablePage.showTimedEntriesProperty().bind(optionsView.showTimedEntriesProperty());
    printablePage.showEntryDetailsProperty().bind(optionsView.showEntryDetailsProperty());
    printablePage.layoutProperty().bindBidirectional(layoutProperty());

    Bindings.bindContent(sourceView.getCalendarSources(), getCalendarSources());
    Bindings.bindContent(sourceView.getCalendarVisibilityMap(), printablePage.getCalendarVisibilityMap());

    Bindings.bindContent(printablePage.getCalendarSources(), getCalendarSources());
}
 
开发者ID:dlemmermann,项目名称:CalendarFX,代码行数:45,代码来源:PrintView.java

示例4: PrintablePage

import javafx.beans.binding.Bindings; //导入方法依赖的package包/类
public PrintablePage() {
    getStyleClass().add(DEFAULT_STYLE);

    addEventFilter(KeyEvent.ANY, Event::consume);

    setFocusTraversable(false);

    // day view
    detailedDayView = new DetailedDayView();
    detailedDayView.setShowScrollBar(false);
    detailedDayView.setShowToday(false);
    detailedDayView.setEnableCurrentTimeMarker(false);
    detailedDayView.weekFieldsProperty().bind(weekFieldsProperty());
    detailedDayView.showAllDayViewProperty().bind(showAllDayEntriesProperty());
    detailedDayView.showAgendaViewProperty().bind(showEntryDetailsProperty());
    detailedDayView.layoutProperty().bind(layoutProperty());
    detailedDayView.getDayView().setStartTime(LocalTime.MIN);
    detailedDayView.getDayView().setEndTime(LocalTime.MAX);
    detailedDayView.getDayView().setEarlyLateHoursStrategy(DayViewBase.EarlyLateHoursStrategy.HIDE);
    detailedDayView.getDayView().setHoursLayoutStrategy(DayViewBase.HoursLayoutStrategy.FIXED_HOUR_COUNT);
    detailedDayView.getDayView().setVisibleHours(24);
    detailedDayView.dateProperty().bind(pageStartDateProperty());
    detailedDayView.addEventFilter(MouseEvent.ANY, weakMouseHandler);
    detailedDayView.getDayView().setTrimTimeBounds(true);

    Bindings.bindContent(detailedDayView.getCalendarSources(), getCalendarSources());
    Bindings.bindContent(detailedDayView.getCalendarVisibilityMap(), getCalendarVisibilityMap());

    // week view
    detailedWeekView = new DetailedWeekView();
    detailedWeekView.setShowScrollBar(false);
    detailedWeekView.getWeekView().setShowToday(false);
    detailedWeekView.layoutProperty().bind(layoutProperty());
    detailedWeekView.setEnableCurrentTimeMarker(false);
    detailedWeekView.showAllDayViewProperty().bind(showAllDayEntriesProperty());
    detailedWeekView.weekFieldsProperty().bind(weekFieldsProperty());
    detailedWeekView.setStartTime(LocalTime.MIN);
    detailedWeekView.setEndTime(LocalTime.MAX);
    detailedWeekView.setEarlyLateHoursStrategy(DayViewBase.EarlyLateHoursStrategy.HIDE);
    detailedWeekView.setHoursLayoutStrategy(DayViewBase.HoursLayoutStrategy.FIXED_HOUR_COUNT);
    detailedWeekView.setVisibleHours(24);
    detailedWeekView.addEventFilter(MouseEvent.ANY, weakMouseHandler);
    detailedWeekView.dateProperty().bind(pageStartDateProperty());
    detailedWeekView.getWeekView().setTrimTimeBounds(true);

    Bindings.bindContent(detailedWeekView.getCalendarSources(), getCalendarSources());
    Bindings.bindContent(detailedWeekView.getCalendarVisibilityMap(), getCalendarVisibilityMap());

    // month view
    monthView = new MonthView();
    monthView.setShowToday(false);
    monthView.setShowCurrentWeek(false);
    monthView.weekFieldsProperty().bind(weekFieldsProperty());
    monthView.showFullDayEntriesProperty().bind(showAllDayEntriesProperty());
    monthView.showTimedEntriesProperty().bind(showTimedEntriesProperty());
    monthView.addEventFilter(MouseEvent.ANY, weakMouseHandler);
    monthView.dateProperty().bind(pageStartDateProperty());

    Bindings.bindContent(monthView.getCalendarSources(), getCalendarSources());
    Bindings.bindContentBidirectional(monthView.getCalendarVisibilityMap(), getCalendarVisibilityMap());

    updateView();
    updateDimension();

    paperProperty().addListener(obs -> updateDimension());
    viewTypeProperty().addListener(obs -> updateView());

    periodSplitter = new PrintPeriodSplitter(this);
}
 
开发者ID:dlemmermann,项目名称:CalendarFX,代码行数:70,代码来源:PrintablePage.java


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