code: @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.PICKING) {
  				setPickingMode();
  			} else if(mode == Mode.EDITING) {
  				setEditingMode();
  			}
  			if(modeBox != null) {
  				modeBox.setSelectedItem(mode);
  			}
  			fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED, mode, ItemEvent.SELECTED));
  		}
  	}
docs: setter for the Mode.