List of usage examples for javafx.collections FXCollections observableArrayList
@SuppressWarnings("unchecked") public static <E> ObservableList<E> observableArrayList()
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXInt16TypeListPane.java
public void setJavaFXDataCollection(Collection<ICFBamInt16TypeObj> value) { final String S_ProcName = "setJavaFXDataCollection"; javafxDataCollection = value;/* ww w . j ava2 s. com*/ observableListOfInt16Type = FXCollections.observableArrayList(); if (javafxDataCollection != null) { Iterator<ICFBamInt16TypeObj> iter = javafxDataCollection.iterator(); while (iter.hasNext()) { observableListOfInt16Type.add(iter.next()); } observableListOfInt16Type.sort(compareInt16TypeByQualName); } if (dataTable != null) { dataTable.setItems(observableListOfInt16Type); // Hack from stackoverflow to fix JavaFX TableView refresh issue ((TableColumn) dataTable.getColumns().get(0)).setVisible(false); ((TableColumn) dataTable.getColumns().get(0)).setVisible(true); } }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXTZTimestampTypeListPane.java
public void setJavaFXDataCollection(Collection<ICFBamTZTimestampTypeObj> value) { final String S_ProcName = "setJavaFXDataCollection"; javafxDataCollection = value;/*from w w w. j a va2s.com*/ observableListOfTZTimestampType = FXCollections.observableArrayList(); if (javafxDataCollection != null) { Iterator<ICFBamTZTimestampTypeObj> iter = javafxDataCollection.iterator(); while (iter.hasNext()) { observableListOfTZTimestampType.add(iter.next()); } observableListOfTZTimestampType.sort(compareTZTimestampTypeByQualName); } if (dataTable != null) { dataTable.setItems(observableListOfTZTimestampType); // Hack from stackoverflow to fix JavaFX TableView refresh issue ((TableColumn) dataTable.getColumns().get(0)).setVisible(false); ((TableColumn) dataTable.getColumns().get(0)).setVisible(true); } }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXDoubleDefListPane.java
public void setJavaFXDataCollection(Collection<ICFBamDoubleDefObj> value) { final String S_ProcName = "setJavaFXDataCollection"; javafxDataCollection = value;/*ww w . j a v a 2 s. c om*/ observableListOfDoubleDef = FXCollections.observableArrayList(); if (javafxDataCollection != null) { Iterator<ICFBamDoubleDefObj> iter = javafxDataCollection.iterator(); while (iter.hasNext()) { observableListOfDoubleDef.add(iter.next()); } observableListOfDoubleDef.sort(compareDoubleDefByQualName); } if (dataTable != null) { dataTable.setItems(observableListOfDoubleDef); // Hack from stackoverflow to fix JavaFX TableView refresh issue ((TableColumn) dataTable.getColumns().get(0)).setVisible(false); ((TableColumn) dataTable.getColumns().get(0)).setVisible(true); } }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXStringDefListPane.java
public void setJavaFXDataCollection(Collection<ICFBamStringDefObj> value) { final String S_ProcName = "setJavaFXDataCollection"; javafxDataCollection = value;//from w w w .jav a 2 s . com observableListOfStringDef = FXCollections.observableArrayList(); if (javafxDataCollection != null) { Iterator<ICFBamStringDefObj> iter = javafxDataCollection.iterator(); while (iter.hasNext()) { observableListOfStringDef.add(iter.next()); } observableListOfStringDef.sort(compareStringDefByQualName); } if (dataTable != null) { dataTable.setItems(observableListOfStringDef); // Hack from stackoverflow to fix JavaFX TableView refresh issue ((TableColumn) dataTable.getColumns().get(0)).setVisible(false); ((TableColumn) dataTable.getColumns().get(0)).setVisible(true); } }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXInt32TypeListPane.java
public void setJavaFXDataCollection(Collection<ICFBamInt32TypeObj> value) { final String S_ProcName = "setJavaFXDataCollection"; javafxDataCollection = value;//from www .j a v a 2 s . c o m observableListOfInt32Type = FXCollections.observableArrayList(); if (javafxDataCollection != null) { Iterator<ICFBamInt32TypeObj> iter = javafxDataCollection.iterator(); while (iter.hasNext()) { observableListOfInt32Type.add(iter.next()); } observableListOfInt32Type.sort(compareInt32TypeByQualName); } if (dataTable != null) { dataTable.setItems(observableListOfInt32Type); // Hack from stackoverflow to fix JavaFX TableView refresh issue ((TableColumn) dataTable.getColumns().get(0)).setVisible(false); ((TableColumn) dataTable.getColumns().get(0)).setVisible(true); } }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXUInt16DefListPane.java
public void setJavaFXDataCollection(Collection<ICFBamUInt16DefObj> value) { final String S_ProcName = "setJavaFXDataCollection"; javafxDataCollection = value;/*from ww w . j av a 2 s. c om*/ observableListOfUInt16Def = FXCollections.observableArrayList(); if (javafxDataCollection != null) { Iterator<ICFBamUInt16DefObj> iter = javafxDataCollection.iterator(); while (iter.hasNext()) { observableListOfUInt16Def.add(iter.next()); } observableListOfUInt16Def.sort(compareUInt16DefByQualName); } if (dataTable != null) { dataTable.setItems(observableListOfUInt16Def); // Hack from stackoverflow to fix JavaFX TableView refresh issue ((TableColumn) dataTable.getColumns().get(0)).setVisible(false); ((TableColumn) dataTable.getColumns().get(0)).setVisible(true); } }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXTZDateDefListPane.java
public void setJavaFXDataCollection(Collection<ICFBamTZDateDefObj> value) { final String S_ProcName = "setJavaFXDataCollection"; javafxDataCollection = value;//from w w w .ja v a2 s. c o m observableListOfTZDateDef = FXCollections.observableArrayList(); if (javafxDataCollection != null) { Iterator<ICFBamTZDateDefObj> iter = javafxDataCollection.iterator(); while (iter.hasNext()) { observableListOfTZDateDef.add(iter.next()); } observableListOfTZDateDef.sort(compareTZDateDefByQualName); } if (dataTable != null) { dataTable.setItems(observableListOfTZDateDef); // Hack from stackoverflow to fix JavaFX TableView refresh issue ((TableColumn) dataTable.getColumns().get(0)).setVisible(false); ((TableColumn) dataTable.getColumns().get(0)).setVisible(true); } }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXUInt64DefListPane.java
public void setJavaFXDataCollection(Collection<ICFBamUInt64DefObj> value) { final String S_ProcName = "setJavaFXDataCollection"; javafxDataCollection = value;/*from w ww.j av a 2 s. c o m*/ observableListOfUInt64Def = FXCollections.observableArrayList(); if (javafxDataCollection != null) { Iterator<ICFBamUInt64DefObj> iter = javafxDataCollection.iterator(); while (iter.hasNext()) { observableListOfUInt64Def.add(iter.next()); } observableListOfUInt64Def.sort(compareUInt64DefByQualName); } if (dataTable != null) { dataTable.setItems(observableListOfUInt64Def); // Hack from stackoverflow to fix JavaFX TableView refresh issue ((TableColumn) dataTable.getColumns().get(0)).setVisible(false); ((TableColumn) dataTable.getColumns().get(0)).setVisible(true); } }
From source file:com.ggvaidya.scinames.dataset.DatasetSceneController.java
@SuppressWarnings("rawtypes") private void updateAdditionalData() { ObservableList<AdditionalData> addDataItems = FXCollections.observableArrayList(); // Done!//from ww w . j a v a 2 s .com additionalDataCombobox.setItems(addDataItems); // We can just about get away with doing this for around ADDITIONAL_DATA_CHANGE_COUNT_LIMIT changes. if (dataset.getAllChanges().count() > ADDITIONAL_DATA_CHANGE_COUNT_LIMIT) return; // TODO: fix this by lazy-evaluating these durned lists. // 1. Changes by name LOGGER.info("Creating changes by name additional data"); addDataItems.add(createChangesByNameAdditionalData()); LOGGER.info("Finished changes by name additional data"); // 2. Data by name LOGGER.info("Creating data by name additional data"); addDataItems.add(createDataByNameAdditionalData()); LOGGER.info("Finished changes by name additional data"); // 3. Changes by subname LOGGER.info("Creating changes by subnames additional data"); addDataItems.add(createChangesBySubnamesAdditionalData()); LOGGER.info("Finished changes by subname additional data"); // 4. Data in this dataset /* LOGGER.info("Creating data by name additional data"); addDataItems.add(createDataAdditionalData()); LOGGER.info("Finished changes by name additional data"); */ // 5. Properties LOGGER.info("Creating properties additional data"); addDataItems.add(createPropertiesAdditionalData()); LOGGER.info("Finished properties additional data"); additionalDataCombobox.getSelectionModel().clearAndSelect(0); LOGGER.info("Finished updateAdditionalData()"); }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXNmTokenDefListPane.java
public void setJavaFXDataCollection(Collection<ICFBamNmTokenDefObj> value) { final String S_ProcName = "setJavaFXDataCollection"; javafxDataCollection = value;/*from w w w .j ava2 s .co m*/ observableListOfNmTokenDef = FXCollections.observableArrayList(); if (javafxDataCollection != null) { Iterator<ICFBamNmTokenDefObj> iter = javafxDataCollection.iterator(); while (iter.hasNext()) { observableListOfNmTokenDef.add(iter.next()); } observableListOfNmTokenDef.sort(compareNmTokenDefByQualName); } if (dataTable != null) { dataTable.setItems(observableListOfNmTokenDef); // Hack from stackoverflow to fix JavaFX TableView refresh issue ((TableColumn) dataTable.getColumns().get(0)).setVisible(false); ((TableColumn) dataTable.getColumns().get(0)).setVisible(true); } }