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.CFBamJavaFXBoolTypeListPane.java

public void setJavaFXDataCollection(Collection<ICFBamBoolTypeObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;/*from  www .ja v a2 s.  c  om*/
    observableListOfBoolType = FXCollections.observableArrayList();
    if (javafxDataCollection != null) {
        Iterator<ICFBamBoolTypeObj> iter = javafxDataCollection.iterator();
        while (iter.hasNext()) {
            observableListOfBoolType.add(iter.next());
        }
        observableListOfBoolType.sort(compareBoolTypeByQualName);
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfBoolType);
        // 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.CFBamJavaFXUuidDefListPane.java

public void setJavaFXDataCollection(Collection<ICFBamUuidDefObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;// w ww .  j  av a2s .co  m
    observableListOfUuidDef = FXCollections.observableArrayList();
    if (javafxDataCollection != null) {
        Iterator<ICFBamUuidDefObj> iter = javafxDataCollection.iterator();
        while (iter.hasNext()) {
            observableListOfUuidDef.add(iter.next());
        }
        observableListOfUuidDef.sort(compareUuidDefByQualName);
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfUuidDef);
        // 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.CFBamJavaFXUuidTypeListPane.java

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

public void setJavaFXDataCollection(Collection<ICFBamTimeDefObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;// w  w  w . ja  v  a2s .com
    observableListOfTimeDef = FXCollections.observableArrayList();
    if (javafxDataCollection != null) {
        Iterator<ICFBamTimeDefObj> iter = javafxDataCollection.iterator();
        while (iter.hasNext()) {
            observableListOfTimeDef.add(iter.next());
        }
        observableListOfTimeDef.sort(compareTimeDefByQualName);
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfTimeDef);
        // 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.CFBamJavaFXTZTimeDefListPane.java

public void setJavaFXDataCollection(Collection<ICFBamTZTimeDefObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;// w  ww. j  av  a 2  s  .c  o  m
    observableListOfTZTimeDef = FXCollections.observableArrayList();
    if (javafxDataCollection != null) {
        Iterator<ICFBamTZTimeDefObj> iter = javafxDataCollection.iterator();
        while (iter.hasNext()) {
            observableListOfTZTimeDef.add(iter.next());
        }
        observableListOfTZTimeDef.sort(compareTZTimeDefByQualName);
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfTZTimeDef);
        // 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:pl.betoncraft.betonquest.editor.model.QuestPackage.java

/**
 * @return all NpcOptions from loaded conversations in this package, the ones from current conversation first
 *///from  w  ww. j av  a  2  s  . c  om
public ObservableList<NpcOption> getAllNpcOptions() {
    ObservableList<NpcOption> list = FXCollections.observableArrayList();
    list.addAll(ConversationController.getDisplayedConversation().getNpcOptions());
    conversations.forEach(conv -> {
        if (!conv.equals(ConversationController.getDisplayedConversation())) {
            list.addAll(conv.getNpcOptions());
        }
    });
    return list;
}

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

public void setJavaFXDataCollection(Collection<ICFBamUuidGenObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;//from w ww. j  a v a2s .c om
    observableListOfUuidGen = FXCollections.observableArrayList();
    if (javafxDataCollection != null) {
        Iterator<ICFBamUuidGenObj> iter = javafxDataCollection.iterator();
        while (iter.hasNext()) {
            observableListOfUuidGen.add(iter.next());
        }
        observableListOfUuidGen.sort(compareUuidGenByQualName);
    }
    if (dataTable != null) {
        dataTable.setItems(observableListOfUuidGen);
        // 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.CFBamJavaFXInt64ColListPane.java

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

public void setJavaFXDataCollection(Collection<ICFBamTextColObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;/*from   w  w w. j a v  a2s .co  m*/
    observableListOfTextCol = FXCollections.observableArrayList();
    if (javafxDataCollection != null) {
        Iterator<ICFBamTextColObj> iter = javafxDataCollection.iterator();
        while (iter.hasNext()) {
            observableListOfTextCol.add(iter.next());
        }
        observableListOfTextCol.sort(compareTextColByQualName);
    }
    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.CFBamJavaFXFloatColListPane.java

public void setJavaFXDataCollection(Collection<ICFBamFloatColObj> value) {
    final String S_ProcName = "setJavaFXDataCollection";
    javafxDataCollection = value;/*from   w  w  w. j  a  va  2s.  co  m*/
    observableListOfFloatCol = FXCollections.observableArrayList();
    if (javafxDataCollection != null) {
        Iterator<ICFBamFloatColObj> iter = javafxDataCollection.iterator();
        while (iter.hasNext()) {
            observableListOfFloatCol.add(iter.next());
        }
        observableListOfFloatCol.sort(compareFloatColByQualName);
    }
    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);
    }
}