public static <S> Callback<TableColumn<S,String>, TableCell<S,String>> forTableColumn() { return forTableColumn(new DefaultStringConverter()); }
public static <S> Callback<TableColumn<S,String>, TableCell<S,String>> forTableColumn() { return forTableColumn(new DefaultStringConverter()); }
ObservableList<BankAccount> bankValues = FXCollections.emptyList(); accountColumn.setCellFactory(ComboBoxTableCell.forTableColumn( new DefaultStringConverter(), bankValues));
return forTableColumn(editableExtractor, new DefaultStringConverter());
/** * Converts all the object in the iterable in its String representation. * Actually it handles also Maps, Arrays and Iterator by collecting their values. * Note that this method accepts an Object in order to be used in conjunction with the {@link Lambda#forEach(Iterable)}. * @param iterable The iterable containing the objects to be converted in strings * @return A list containing the String representation of the objects in the given iterable */ public static List<String> extractString(Object iterable) { return convert(iterable, new DefaultStringConverter()); }
tv.setEditable(true); tv.setCellFactory(new Callback<TreeView<String>, TreeCell<String>>() { private final MyContextMenu contextMenu = new MyContextMenu(); private final StringConverter converter = new DefaultStringConverter(); @Override public TreeCell<String> call(TreeView<String> param) { return new CustomTreeCell(contextMenu, converter); } });
@Override public List<String> getKeys() { return Lambda.convert(properties.keySet(), new DefaultStringConverter()); }
ObservableList<String> cbValues = FXCollections.observableArrayList("1", "2", "3"); TableColumn<Map, String> column2 = new TableColumn<>(Desglose2); column2.setCellFactory(ComboBoxTableCell.forTableColumn(new DefaultStringConverter(), cbValues));
public List<String> getKeys() { return Lambda.convert(systemProperties.keySet(), new DefaultStringConverter()); }
TableColumn<User, String> param) TextFieldTableCell<User, String>myEditableTableCell = new TextFieldTableCell<User, String>(new DefaultStringConverter())
@Override public int complete(String buffer, int cursor, List<CharSequence> candidates) { Preconditions.checkNotNull(candidates); String text = contextualBuffer(buffer, cursor); List<String> commands = Lambda.filter(StringStartsWith.startsWith(text), this.commands); if(commands.size()>0) { candidates.addAll(commands); if(candidates.size()==1) { candidates.set(0, candidates.get(0) + " "); } return candidates.isEmpty() ? -1 : 0; } else if(text.contains(" ")) { int insertion = text.lastIndexOf(" ") + 1; String tailBuffer = text.substring(insertion); List<String> files = Lambda.convert(Lambda.convert(SpashFileSystem.get().ls(this.session.getWorkingDir()).collect(), new PropertyExtractor<Object, Path>("fileName")), new DefaultStringConverter()); files = Lambda.filter(StringStartsWith.startsWith(tailBuffer), files); candidates.addAll(files); if(candidates.size()==1) { candidates.set(0, candidates.get(0) + " "); } return candidates.isEmpty() ? -1 : insertion; } return -1; }
return cellFactory(new DefaultStringConverter());
super(new DefaultStringConverter());
TableColumn<String, String> tc = new TableColumn<String, String>("Column1"); tc.setEditable(true); tc.setCellFactory(TextFieldTableCell.<String,String>forTableColumn(new DefaultStringConverter())); tc.setCellValueFactory(new Callback<CellDataFeatures<String,String>, ObservableValue<String>>(){ @Override
column("Item", Item::nameProperty, new DefaultStringConverter()));
super(new DefaultStringConverter()); ContextMenu menu = new ContextMenu(); menu.getItems().add(createMenuItem());
return forTableColumn(new DefaultStringConverter());