*/
private void setPointSizeItems(double value) {
pointSize = (float) Math.max(0.0, value);
int newValue = (int)pointSize;
MutableComboBoxModel model = (MutableComboBoxModel) pointSizeCBox.getModel();
int insert = -1;
for (int i = 0; i < model.getSize(); i++) {
int elValue = ((Number)model.getElementAt(i)).intValue();
if (elValue == newValue) {
pointSizeCBox.setSelectedIndex(i);
return;
} else if (elValue > newValue) {
insert = i;
break;
}
}
if (insert < 0) {
insert = model.getSize();
model.addElement(Integer.valueOf(newValue));
} else {
model.insertElementAt(Integer.valueOf(newValue), insert);
}
pointSizeCBox.setSelectedIndex(insert);
}