positionDistributionBox.getSelectedItem())) {
positionerClass = positioner;
}
}
Positioner positioner = Positioner.generateInterface(positionerClass,
motesToAdd,
((Number) startX.getValue()).doubleValue(), ((Number) endX
.getValue()).doubleValue(), ((Number) startY.getValue())
.doubleValue(), ((Number) endY.getValue()).doubleValue(),
((Number) startZ.getValue()).doubleValue(), ((Number) endZ
.getValue()).doubleValue());
if (positioner == null) {
logger.fatal("Could not create positioner");
return;
}
for (int i = 0; i < newMotes.size(); i++) {
Position newPosition = newMotes.get(i).getInterfaces().getPosition();
if (newPosition != null) {
double[] newPositionArray = positioner.getNextPosition();
if (newPositionArray.length >= 3) {
newPosition.setCoordinates(newPositionArray[0],
newPositionArray[1], newPositionArray[2]);
} else if (newPositionArray.length >= 2) {
newPosition.setCoordinates(newPositionArray[0],