Example usage for javafx.collections FXCollections observableArrayList

List of usage examples for javafx.collections FXCollections observableArrayList

Introduction

In this page you can find the example usage for javafx.collections FXCollections observableArrayList.

Prototype

public static <E> ObservableList<E> observableArrayList(Collection<? extends E> col) 

Source Link

Document

Creates a new observable array list and adds a content of collection col to it.

Usage

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXTextColPickerPane.java

public void setJavaFXDataCollection(Collection<ICFBamTextColObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;/*from  w w w .ja  v  a  2 s  . c  o m*/
    observableListOfTextCol = null;
    if (javafxDataCollection != null) {
        observableListOfTextCol = FXCollections.observableArrayList(javafxDataCollection);
        observableListOfTextCol.sort(compareTextColByQualName);
    } else {
        observableListOfTextCol = FXCollections.observableArrayList();
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfTextCol);
        // 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.CFBamJavaFXFloatColPickerPane.java

public void setJavaFXDataCollection(Collection<ICFBamFloatColObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;/*from  w w w . j a  va2  s .  c  om*/
    observableListOfFloatCol = null;
    if (javafxDataCollection != null) {
        observableListOfFloatCol = FXCollections.observableArrayList(javafxDataCollection);
        observableListOfFloatCol.sort(compareFloatColByQualName);
    } else {
        observableListOfFloatCol = FXCollections.observableArrayList();
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfFloatCol);
        // 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.CFBamJavaFXInt16ColPickerPane.java

public void setJavaFXDataCollection(Collection<ICFBamInt16ColObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;/* w  ww  .jav a  2s .  co m*/
    observableListOfInt16Col = null;
    if (javafxDataCollection != null) {
        observableListOfInt16Col = FXCollections.observableArrayList(javafxDataCollection);
        observableListOfInt16Col.sort(compareInt16ColByQualName);
    } else {
        observableListOfInt16Col = FXCollections.observableArrayList();
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfInt16Col);
        // 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.CFBamJavaFXEnumTypePickerPane.java

public void setJavaFXDataCollection(Collection<ICFBamEnumTypeObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;//from   w  w  w.  j  av a 2  s. c  o m
    observableListOfEnumType = null;
    if (javafxDataCollection != null) {
        observableListOfEnumType = FXCollections.observableArrayList(javafxDataCollection);
        observableListOfEnumType.sort(compareEnumTypeByQualName);
    } else {
        observableListOfEnumType = FXCollections.observableArrayList();
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfEnumType);
        // 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.CFBamJavaFXDateColPickerPane.java

public void setJavaFXDataCollection(Collection<ICFBamDateColObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;/*from  w  w w  . ja v  a  2s  . com*/
    observableListOfDateCol = null;
    if (javafxDataCollection != null) {
        observableListOfDateCol = FXCollections.observableArrayList(javafxDataCollection);
        observableListOfDateCol.sort(compareDateColByQualName);
    } else {
        observableListOfDateCol = FXCollections.observableArrayList();
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfDateCol);
        // 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.CFBamJavaFXInt32ColPickerPane.java

public void setJavaFXDataCollection(Collection<ICFBamInt32ColObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;/*from  w w w  .j a v a2 s.  c o  m*/
    observableListOfInt32Col = null;
    if (javafxDataCollection != null) {
        observableListOfInt32Col = FXCollections.observableArrayList(javafxDataCollection);
        observableListOfInt32Col.sort(compareInt32ColByQualName);
    } else {
        observableListOfInt32Col = FXCollections.observableArrayList();
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfInt32Col);
        // 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.CFBamJavaFXTextTypePickerPane.java

public void setJavaFXDataCollection(Collection<ICFBamTextTypeObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;//from   w w w.j  ava 2  s .  c om
    observableListOfTextType = null;
    if (javafxDataCollection != null) {
        observableListOfTextType = FXCollections.observableArrayList(javafxDataCollection);
        observableListOfTextType.sort(compareTextTypeByQualName);
    } else {
        observableListOfTextType = FXCollections.observableArrayList();
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfTextType);
        // 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.CFBamJavaFXTokenColPickerPane.java

public void setJavaFXDataCollection(Collection<ICFBamTokenColObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;//  www .j ava2  s .  c  o m
    observableListOfTokenCol = null;
    if (javafxDataCollection != null) {
        observableListOfTokenCol = FXCollections.observableArrayList(javafxDataCollection);
        observableListOfTokenCol.sort(compareTokenColByQualName);
    } else {
        observableListOfTokenCol = FXCollections.observableArrayList();
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfTokenCol);
        // 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.CFBamJavaFXUInt32ColPickerPane.java

public void setJavaFXDataCollection(Collection<ICFBamUInt32ColObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;//from  w w w .  ja v a  2 s  .c o  m
    observableListOfUInt32Col = null;
    if (javafxDataCollection != null) {
        observableListOfUInt32Col = FXCollections.observableArrayList(javafxDataCollection);
        observableListOfUInt32Col.sort(compareUInt32ColByQualName);
    } else {
        observableListOfUInt32Col = FXCollections.observableArrayList();
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfUInt32Col);
        // 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.CFBamJavaFXFloatTypePickerPane.java

public void setJavaFXDataCollection(Collection<ICFBamFloatTypeObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;//  w  w w.  ja v  a  2  s . c  om
    observableListOfFloatType = null;
    if (javafxDataCollection != null) {
        observableListOfFloatType = FXCollections.observableArrayList(javafxDataCollection);
        observableListOfFloatType.sort(compareFloatTypeByQualName);
    } else {
        observableListOfFloatType = FXCollections.observableArrayList();
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfFloatType);
        // Hack from stackoverflow to fix JavaFX TableView refresh issue
        ((TableColumn) dataTable.getColumns().get(0)).setVisible(false);
        ((TableColumn) dataTable.getColumns().get(0)).setVisible(true);
    }
}