@Override public Stream<Item> fieldsFor(T document) { final ObservableList<String> supportedTypes = observableList( dbmsHandler .supportedDbmsTypes() .map(DbmsType::getName) .collect(toList()) ); return Stream.of(new ChoiceBoxItem<String>( "Dbms Type", document.typeNameProperty(), supportedTypes, "Which type of database this is. If the type you are looking " + "for is missing, make sure it has been loaded properly in " + "the pom.xml-file." ) ); } }
).toSortedMap(); final ObservableList<String> alternatives = FXCollections.observableList( mapping.keySet().stream().collect(toList()) );
private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException { lastConnectedServer = new SimpleStringProperty((String) in.readObject()); auditralColorMappings = FXCollections.observableList(new ArrayList<AuditralColorMapping>()); int size = in.readInt(); for (int i = 0; i < size; i++) { auditralColorMappings.add((AuditralColorMapping) in.readObject()); } cssUri = new SimpleStringProperty((String) in.readObject()); }
/** * @return the pSourcePath */ public ObservableList<ExtensionFilter> pFileExtension() { if (pFileExtension == null) { pFileExtension = FXCollections.observableList(this.fileExtension()); } return this.pFileExtension; }
/** * @return the pSourcePath */ public ObservableList<Todo> pTodo() { if (pTodo == null) { pTodo = FXCollections.observableList(this.todo()); } return this.pTodo; }
@Autowired public CreditsService(final ObjectMapper objectMapper) { this.creditedWorks = unmodifiableObservableList(observableList(loadCreditsFiles( objectMapper, new PathMatchingResourcePatternResolver() ))); }
public OpenPatricianSpinner() { options = new SimpleListProperty<>(this, "options", FXCollections.observableList(new ArrayList<OpenPatricianSpinnerOptionDataModel>())); selectedIndex = new SimpleIntegerProperty(this, "selectedIndex", -1); this.getStyleClass().add(this.getClass().getSimpleName()); }
@Override public final <T extends DocumentProperty> ObservableList<T> observableListOf(String key) { @SuppressWarnings("unchecked") final ObservableList<T> list = (ObservableList<T>) children.computeIfAbsent(key, k -> addListeners(k, observableList(new CopyOnWriteArrayList<>())) ); return list; }
@Override public void showFilteredResult(List<WorkflowInstanceResultModel> filteredResult, WorkflowInstanceFilterModel usedFilter) { ObservableList<WorkflowInstanceResultModel> content = FXCollections.observableList(new ArrayList<WorkflowInstanceResultModel>()); content.addAll(filteredResult); setOriginalItems(resultTable, content); this.usedFilter = usedFilter; }
@Override public void showFilteredResult(List<MessageResultModel> filteredResult, MessageFilterModel usedFilter) { ObservableList<MessageResultModel> content = FXCollections.observableList(new ArrayList<MessageResultModel>()); content.addAll(filteredResult); setOriginalItems(resultTable, content); }
public OpenPatricianSlider(int width) { values = new SimpleListProperty<>(this, "options", FXCollections.observableList(new ArrayList<String>())); initialWidth = new SimpleIntegerProperty(this,"initialWidth", width); selectedIndex = new SimpleIntegerProperty(this, "selectedIndex", -1); this.getStyleClass().add(this.getClass().getSimpleName()); }
public NewTweetController( final NewTweetService newTweetService, final TwitterMediaExtensionFilter extensionFilter, final EasyFxml easyFxml, final SessionManager sessionManager, final Timeline timeline, final Mentions mentions ) { this.newTweetService = newTweetService; this.twitterMediaExtensionFilter = extensionFilter; this.easyFxml = easyFxml; this.sessionManager = sessionManager; this.timeline = timeline; this.mentions = mentions; this.mediasToUpload = new SimpleListProperty<>(FXCollections.observableList(new ArrayList<>())); this.embeddingStage = new SimpleObjectProperty<>(null); }
/** * initialize me with the given CANValue and property * * @param canValue * @param property */ public void init(CT canValue, Property<T> property) { this.canValue = canValue; this.setProperty(property); this.propertyList = FXCollections.observableList(canValue.getValueItems()); }
@Override public Stream<Item> fieldsFor(T document) { final ObservableList<String> supportedTypes = observableList( dbmsHandler .supportedDbmsTypes() .map(DbmsType::getName) .collect(toList()) ); return Stream.of(new ChoiceBoxItem<String>( "Dbms Type", document.typeNameProperty(), supportedTypes, "Which type of database this is. If the type you are looking " + "for is missing, make sure it has been loaded properly in " + "the pom.xml-file." ) ); } }
@Override public void showFilteredResult(List<WorkflowSummaryResultModel> filteredResult, WorkflowSummaryFilterModel usedFilter) { lastFilteredWithProcessingEngineInfo = usedFilter.selectedEngine.getValue(); ObservableList<WorkflowSummaryResultModel> content = FXCollections.observableList(new ArrayList<WorkflowSummaryResultModel>()); content.addAll(filteredResult); setOriginalItems(resultTable, content); }
private ObservableList<Var> getVarList() { ScenarioContext context = scenarioPanel.getScenarioExecutionUnit().getActions().context; ScriptValueMap vars = context.vars; List<Var> list = new ArrayList(vars.size()); context.vars.forEach((k, v) -> list.add(new Var(k, v))); return FXCollections.observableList(list); }
private static XYChart.Series<Number, String> getNumberStringSeries(Column categoryColumn, List<XYChart .Data<Number, String>> d2) { XYChart.Series<Number, String> series1 = new XYChart.Series<>(FXCollections.observableList(d2)); series1.setName(categoryColumn.name()); return series1; }
static XYChart.Series<String, Number> getSeries(NumberColumn numberColumn, List<XYChart.Data<String, Number>> data) { XYChart.Series<String, Number> series1 = new XYChart.Series<>(FXCollections.observableList(data)); series1.setName(numberColumn.name()); return series1; }
@Override @SuppressWarnings("unchecked") public Function<C, ObservableList<T>> toViewFunction() { return m -> { ObservableList<T> items = m instanceof ObservableList ? (ObservableList<T>) m : FXCollections.observableList(m); if (getComponent() instanceof TableView) { boolean sortable = false; for (TableColumn<T,?> column: ((TableView<T>) getComponent()).getColumns()) { if (column.isSortable()) { sortable = true; break; } } if (sortable && !(items instanceof SortedList)) { SortedList<T> sortedResult = new SortedList<>(items); sortedResult.comparatorProperty().bind(((TableView<T>) getComponent()).comparatorProperty()); items = sortedResult; } } return items; }; }
public static BarChart<String, Number> chart( String title, StringColumn x, NumberColumn y) { final CategoryAxis xAxis = new CategoryAxis(); final NumberAxis yAxis = new NumberAxis(); xAxis.setLabel(x.name()); yAxis.setLabel(y.name()); Table t = Table.create("", x, y); t = t.sortDescendingOn(y.name()); final BarChart<String, Number> bar = new BarChart<>(xAxis, yAxis); bar.setTitle(title); List<XYChart.Data<String, Number>> d2 = new ArrayList<>(x.size()); for (int i = 0; i < x.size(); i++) { d2.add(new XYChart.Data<>(t.stringColumn(0).get(i), t.nCol(1).get(i))); } XYChart.Series<String, Number> series1 = new XYChart.Series<>(FXCollections.observableList(d2)); series1.setName(y.name()); bar.setLegendVisible(false); bar.setCategoryGap(0.0); bar.setBarGap(0.1); bar.setBackground(Background.EMPTY); bar.setVerticalGridLinesVisible(false); bar.getData().add(series1); return bar; }