* setter for the Mode.
*/
@Override
public void setMode(Mode mode) {
if(this.mode != mode) {
fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED,
this.mode, ItemEvent.DESELECTED));
this.mode = mode;
if(mode == Mode.TRANSFORMING) {
setTransformingMode();
} else if(mode == Mode.PICKING) {
setPickingMode();
} else if(mode == Mode.EDITING) {
setEditingMode();
} else if(mode == Mode.ANNOTATING) {
setAnnotatingMode();
}
if(modeBox != null) {
modeBox.setSelectedItem(mode);
}
fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED, mode, ItemEvent.SELECTED));
}
}