private DateCell createDayCell() { DateCell dayCell = null; // call cell factory if set by the user if (datePicker.getDayCellFactory() != null) { dayCell = datePicker.getDayCellFactory().call(datePicker); } // else create the defaul day cell if (dayCell == null) { dayCell = new DateCell(); } return dayCell; }
private void addChildrenListener(RecursiveTreeObject<T> value) { final ObservableList<T> children = childrenFactory.call(value); originalItems = FXCollections.observableArrayList(); itemsMap = new HashMap<>();
private void refreshSliderValueBinding() { sliderValue.textProperty().unbind(); if (((JFXSlider) getSkinnable()).getValueFactory() != null) { sliderValue.textProperty() .bind(((JFXSlider) getSkinnable()).getValueFactory().call((JFXSlider) getSkinnable())); } else { sliderValue.textProperty().bind(Bindings.createStringBinding(() -> { if (getSkinnable().getLabelFormatter() != null) { return getSkinnable().getLabelFormatter().toString(getSkinnable().getValue()); } else { return String.valueOf(Math.round(getSkinnable().getValue())); } }, getSkinnable().valueProperty())); } }
callback.call(null); translateTo = 0; translateTimer.setOnFinished(() -> {
long valid = 0; for (int i = 0; i < callBacks.size(); i++) { if (!callBacks.get(i).call(null)) { valid++;
@Override public TableCell<Person, Boolean> call(TableColumn<Person, Boolean> column) { TableCell<Person, Boolean> cell = cellFactory.call(column); return cell; } });
@Nonnull @Override @SuppressWarnings("unchecked") public <E, T> TableCell<E, T> createTableCell(@Nonnull TableColumn<E, T> tableColumn) { return (TableCell<E, T>) TextFieldTableCell.forTableColumn().call((TableColumn<Object, String>) tableColumn); } };
/**{@inheritDoc}*/ @Override protected boolean isMatch(T suggestion, ISuggestionRequest request) { String userTextLower = request.getUserText().toLowerCase(); String suggestionStr = stringConverter.call(suggestion).toLowerCase(); return suggestionStr.contains(userTextLower); } }
/** * Handle the triggered event. */ @Override public void handle(final E event) { if (callback == null || callback.call(event)) { model().sendWave(waveType, waveData); } } });
@Override public ListCell<T> call(ListView<T> listView) { ListCell<T> cell = cellFactory == null ? new DefaultListCell<T>() : cellFactory.call(listView); cell.setContextMenu(contextMenu); return cell; } };
@Override public ListCell<T> call(ListView<T> listView) { ListCell<T> cell = cellFactory == null ? new DefaultListCell<T>() : cellFactory.call(listView); cell.setContextMenu(contextMenu); return cell; } };
@Override public ListCell<T> call(ListView<T> listView) { ListCell<T> cell = cellFactory == null ? new DefaultListCell<T>() : cellFactory.call(listView); cell.setContextMenu(contextMenu); return cell; } };
private Button createCrumb( final Callback<TreeItem<T>, Button> factory, final TreeItem<T> selectedCrumb) { Button crumb = factory.call(selectedCrumb); crumb.getStyleClass().add("crumb"); //$NON-NLS-1$ // We want all buttons to have the same height // so we bind their preferred height to the enclosing container // crumb.prefHeightProperty().bind(getSkinnable().heightProperty()); // listen to the action event of each bread crumb crumb.setOnAction(ae -> onBreadCrumbAction(selectedCrumb)); return crumb; }
private DateCell createDayCell() { DateCell dayCell = null; // call cell factory if set by the user if (datePicker.getDayCellFactory() != null) { dayCell = datePicker.getDayCellFactory().call(datePicker); } // else create the defaul day cell if (dayCell == null) { dayCell = new DateCell(); } return dayCell; }
private void addLocation(WorldMapView.Location location) { Point2D coordinates = getLocationCoordinates(location); Callback<WorldMapView.Location, Node> locationViewFactory = getSkinnable().getLocationViewFactory(); Node view = locationViewFactory.call(location); if (view == null) { throw new IllegalArgumentException("location view factory returned NULL"); } view.getStyleClass().add(DEFAULT_STYLE_LOCATION); view.setManaged(false); locationsGroup.getChildren().add(view); view.applyCss(); view.resizeRelocate(coordinates.getX(), coordinates.getY(), view.prefWidth(-1), view.prefHeight(-1)); locationMap.put(location, view); }
private GridCell<T> createCell() { GridView<T> gridView = getSkinnable().gridViewProperty().get(); GridCell<T> cell; if (gridView.getCellFactory() != null) { cell = gridView.getCellFactory().call(gridView); } else { cell = createDefaultCellImpl(); } cell.updateGridView(gridView); return cell; }
private void refreshSliderValueBinding() { sliderValue.textProperty().unbind(); if (((JFXSlider) getSkinnable()).getValueFactory() != null) { sliderValue.textProperty() .bind(((JFXSlider) getSkinnable()).getValueFactory().call((JFXSlider) getSkinnable())); } else { sliderValue.textProperty().bind(Bindings.createStringBinding(() -> { if (getSkinnable().getLabelFormatter() != null) { return getSkinnable().getLabelFormatter().toString(getSkinnable().getValue()); } else { return String.valueOf(Math.round(getSkinnable().getValue())); } }, getSkinnable().valueProperty())); } }