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:com.joliciel.talismane.terminology.viewer.TerminologyViewerController.java

void refreshContexts() {
    Term term = tblTerms.getSelectionModel().getSelectedItem();
    if (term != null) {
        if (term instanceof TermWrapper) {
            term = ((TermWrapper) term).getWrappedTerm();
        }//from   w w  w . j ava  2  s  .co  m
        List<Context> contexts = new ArrayList<Context>();
        if (term != null) {
            contexts = terminologyBase.getContexts(term);
        }
        tblContexts.setItems(FXCollections.observableArrayList(contexts));
    }
}

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

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

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

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

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

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

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

public void setJavaFXDataCollection(Collection<ICFBamIndexObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;/*from  ww w.ja va2 s . com*/
    observableListOfIndex = null;
    if (javafxDataCollection != null) {
        observableListOfIndex = FXCollections.observableArrayList(javafxDataCollection);
        observableListOfIndex.sort(compareIndexByQualName);
    } else {
        observableListOfIndex = FXCollections.observableArrayList();
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfIndex);
        // 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.CFBamJavaFXBlobColPickerPane.java

public void setJavaFXDataCollection(Collection<ICFBamBlobColObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;// w w w  . j av a2s.  c  o m
    observableListOfBlobCol = null;
    if (javafxDataCollection != null) {
        observableListOfBlobCol = FXCollections.observableArrayList(javafxDataCollection);
        observableListOfBlobCol.sort(compareBlobColByQualName);
    } else {
        observableListOfBlobCol = FXCollections.observableArrayList();
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfBlobCol);
        // 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.CFBamJavaFXBlobTypePickerPane.java

public void setJavaFXDataCollection(Collection<ICFBamBlobTypeObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;//from w ww . j  av  a  2  s  .com
    observableListOfBlobType = null;
    if (javafxDataCollection != null) {
        observableListOfBlobType = FXCollections.observableArrayList(javafxDataCollection);
        observableListOfBlobType.sort(compareBlobTypeByQualName);
    } else {
        observableListOfBlobType = FXCollections.observableArrayList();
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfBlobType);
        // Hack from stackoverflow to fix JavaFX TableView refresh issue
        ((TableColumn) dataTable.getColumns().get(0)).setVisible(false);
        ((TableColumn) dataTable.getColumns().get(0)).setVisible(true);
    }
}