本文整理汇总了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);
}
示例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));
}
示例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());
}
示例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);
}