Constructor and Description |
---|
SensorSelectionModel(VisionWorld visionWorld)
Create a new sensor selection model with the specified vision world.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Sensor sensor)
Add the specified sensor to this sensor selection model.
|
void |
addAll(java.util.Collection<Sensor> sensors)
Add all of the specified collection of sensors to this sensor selection
model.
|
void |
addSensorSelectionListener(SensorSelectionListener listener)
Add the specified sensor selection listener.
|
void |
clear()
Clear this sensor selection model.
|
void |
fireSelectionChanged(java.util.Set<Sensor> oldSelection,
java.util.Set<Sensor> selection)
Fire a selection changed event.
|
java.util.Collection<Sensor> |
getSelection()
Return an unmodifiable collection of selected sensors.
|
boolean |
isEmpty()
Return true if this sensor selection model is empty.
|
boolean |
isSelected(Sensor sensor)
Return true if the specified sensor is selected.
|
java.util.Iterator<Sensor> |
iterator()
Return an iterator over the selected sensors.
|
void |
remove(Sensor sensor)
Remove the specified sensor from this sensor selection model.
|
void |
removeAll(java.util.Collection<Sensor> sensors)
Remove all of the specified collection of sensors from this sensor
selection model.
|
void |
removeSensorSelectionListener(SensorSelectionListener listener)
Remove the specified sensor selection listener.
|
void |
setSelection(java.util.Collection<Sensor> sensors)
Set the selection for this sensor selection model to the specified
collection of sensors.
|
int |
size()
Return the number of selected sensors for this sensor selection model.
|
void |
toggleSelection(Sensor sensor)
Toggle the selection state for the specified sensor.
|
SensorSelectionModel(VisionWorld visionWorld)
visionWorld
- vision world for this sensor selection model, must not
be nullpublic int size()
public void clear()
public boolean isEmpty()
public void add(Sensor sensor)
sensor
- sensor to addpublic void addAll(java.util.Collection<Sensor> sensors)
sensors
- collection of sensors to addpublic void remove(Sensor sensor)
sensor
- sensor to removepublic void removeAll(java.util.Collection<Sensor> sensors)
sensors
- collection of sensors to removepublic boolean isSelected(Sensor sensor)
sensor
- public void toggleSelection(Sensor sensor)
sensor
- sensor to togglepublic java.util.Iterator<Sensor> iterator()
iterator
in interface java.lang.Iterable<Sensor>
public java.util.Collection<Sensor> getSelection()
public void setSelection(java.util.Collection<Sensor> sensors)
sensors
- collection of selected sensorspublic void addSensorSelectionListener(SensorSelectionListener listener)
listener
- listener to addpublic void removeSensorSelectionListener(SensorSelectionListener listener)
listener
- listener to remove