本文整理匯總了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);
}