Selecting multiple JGoObjects within a JGoView

I need to programmatically select multiple JGoObjects within a JGoView at the same time, after an operation is completed. I noticed that this can be done manually by depressing the shift or control keys when clicking on the JGoObjects, but I need to do it using code. I have found the JGoView’s selectObject() method, but it seems to only be able to select one object at a time. Any suggestions would be great!

You want to operate on the JGoSelection object that is the value of JGoView.getSelection().

You can either iteratively call JGoSelection.extendSelection(JGoObject), or you can call one of its addArray or addCollection methods.