use of edu.cmu.tetrad.util.TetradSerializable in project tetrad by cmu-phil.
the class GraphSelectionEditor method getSelectedModelComponents.
@Override
public List getSelectedModelComponents() {
List<Component> selectedComponents = getWorkbench().getSelectedComponents();
List<TetradSerializable> selectedModelComponents = new ArrayList<>();
for (Component comp : selectedComponents) {
if (comp instanceof DisplayNode) {
selectedModelComponents.add(((DisplayNode) comp).getModelNode());
} else if (comp instanceof DisplayEdge) {
selectedModelComponents.add(((DisplayEdge) comp).getModelEdge());
}
}
return selectedModelComponents;
}
Aggregations