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

@SuppressWarnings("unchecked")
public static <E> ObservableList<E> observableArrayList() 

Source Link

Document

Creates a new empty observable list that is backed by an arraylist.

Usage

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

public void setJavaFXDataCollection(Collection<ICFBamDoubleColObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;/*w  ww  .ja va 2 s .c  o  m*/
    observableListOfDoubleCol = FXCollections.observableArrayList();
    if (javafxDataCollection != null) {
        Iterator<ICFBamDoubleColObj> iter = javafxDataCollection.iterator();
        while (iter.hasNext()) {
            observableListOfDoubleCol.add(iter.next());
        }
        observableListOfDoubleCol.sort(compareDoubleColByQualName);
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfDoubleCol);
        // 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.CFBamJavaFXDateTypeListPane.java

public void setJavaFXDataCollection(Collection<ICFBamDateTypeObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;/*  ww  w  .  j  a  v a2  s  . co  m*/
    observableListOfDateType = FXCollections.observableArrayList();
    if (javafxDataCollection != null) {
        Iterator<ICFBamDateTypeObj> iter = javafxDataCollection.iterator();
        while (iter.hasNext()) {
            observableListOfDateType.add(iter.next());
        }
        observableListOfDateType.sort(compareDateTypeByQualName);
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfDateType);
        // 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.CFBamJavaFXTokenTypeListPane.java

public void setJavaFXDataCollection(Collection<ICFBamTokenTypeObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;//  ww w. ja  v  a  2s.  c om
    observableListOfTokenType = FXCollections.observableArrayList();
    if (javafxDataCollection != null) {
        Iterator<ICFBamTokenTypeObj> iter = javafxDataCollection.iterator();
        while (iter.hasNext()) {
            observableListOfTokenType.add(iter.next());
        }
        observableListOfTokenType.sort(compareTokenTypeByQualName);
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfTokenType);
        // 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.CFBamJavaFXStringColListPane.java

public void setJavaFXDataCollection(Collection<ICFBamStringColObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;//from w w  w  .  ja va  2 s . c  o m
    observableListOfStringCol = FXCollections.observableArrayList();
    if (javafxDataCollection != null) {
        Iterator<ICFBamStringColObj> iter = javafxDataCollection.iterator();
        while (iter.hasNext()) {
            observableListOfStringCol.add(iter.next());
        }
        observableListOfStringCol.sort(compareStringColByQualName);
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfStringCol);
        // 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.CFBamJavaFXUInt32TypeListPane.java

public void setJavaFXDataCollection(Collection<ICFBamUInt32TypeObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;/*from  w w  w . j  a  v  a2 s. co m*/
    observableListOfUInt32Type = FXCollections.observableArrayList();
    if (javafxDataCollection != null) {
        Iterator<ICFBamUInt32TypeObj> iter = javafxDataCollection.iterator();
        while (iter.hasNext()) {
            observableListOfUInt32Type.add(iter.next());
        }
        observableListOfUInt32Type.sort(compareUInt32TypeByQualName);
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfUInt32Type);
        // 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.CFBamJavaFXUInt16ColListPane.java

public void setJavaFXDataCollection(Collection<ICFBamUInt16ColObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;/* ww w  . j a v  a2  s  .co  m*/
    observableListOfUInt16Col = FXCollections.observableArrayList();
    if (javafxDataCollection != null) {
        Iterator<ICFBamUInt16ColObj> iter = javafxDataCollection.iterator();
        while (iter.hasNext()) {
            observableListOfUInt16Col.add(iter.next());
        }
        observableListOfUInt16Col.sort(compareUInt16ColByQualName);
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfUInt16Col);
        // 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.CFBamJavaFXTZDateColListPane.java

public void setJavaFXDataCollection(Collection<ICFBamTZDateColObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;//from w w w . ja va 2 s .  c  om
    observableListOfTZDateCol = FXCollections.observableArrayList();
    if (javafxDataCollection != null) {
        Iterator<ICFBamTZDateColObj> iter = javafxDataCollection.iterator();
        while (iter.hasNext()) {
            observableListOfTZDateCol.add(iter.next());
        }
        observableListOfTZDateCol.sort(compareTZDateColByQualName);
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfTZDateCol);
        // 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.CFBamJavaFXUInt64ColListPane.java

public void setJavaFXDataCollection(Collection<ICFBamUInt64ColObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;/*from   w  w  w .  j  a v a 2s. c  o m*/
    observableListOfUInt64Col = FXCollections.observableArrayList();
    if (javafxDataCollection != null) {
        Iterator<ICFBamUInt64ColObj> iter = javafxDataCollection.iterator();
        while (iter.hasNext()) {
            observableListOfUInt64Col.add(iter.next());
        }
        observableListOfUInt64Col.sort(compareUInt64ColByQualName);
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfUInt64Col);
        // 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.CFBamJavaFXDoubleTypeListPane.java

public void setJavaFXDataCollection(Collection<ICFBamDoubleTypeObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;//www.j  av a 2s. co  m
    observableListOfDoubleType = FXCollections.observableArrayList();
    if (javafxDataCollection != null) {
        Iterator<ICFBamDoubleTypeObj> iter = javafxDataCollection.iterator();
        while (iter.hasNext()) {
            observableListOfDoubleType.add(iter.next());
        }
        observableListOfDoubleType.sort(compareDoubleTypeByQualName);
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfDoubleType);
        // 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.CFBamJavaFXUInt16TypeListPane.java

public void setJavaFXDataCollection(Collection<ICFBamUInt16TypeObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;/*  www  .j  a  v  a 2 s .c  om*/
    observableListOfUInt16Type = FXCollections.observableArrayList();
    if (javafxDataCollection != null) {
        Iterator<ICFBamUInt16TypeObj> iter = javafxDataCollection.iterator();
        while (iter.hasNext()) {
            observableListOfUInt16Type.add(iter.next());
        }
        observableListOfUInt16Type.sort(compareUInt16TypeByQualName);
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfUInt16Type);
        // Hack from stackoverflow to fix JavaFX TableView refresh issue
        ((TableColumn) dataTable.getColumns().get(0)).setVisible(false);
        ((TableColumn) dataTable.getColumns().get(0)).setVisible(true);
    }
}