public ControlsModel getModel() {
return model;
}
public void deleteCurrentControl() {
SimpleKeyBindingManager man = (SimpleKeyBindingManager) SpoutClient.getInstance().getKeyBindingManager();
ControlsBasicItem item = model.getItem(view.getSelectedRow());
ShortcutBindingItem sh = null;
if (item != null && item instanceof ShortcutBindingItem) {
sh = (ShortcutBindingItem) item;
}
KeyBindingItem binding = null;
if (item != null && item instanceof KeyBindingItem) {
binding = (KeyBindingItem) item;
}
if (sh != null) {
man.unregisterShortcut(sh.getShortcut());
man.save();
} else if (binding != null) {
man.unregisterControl(binding.getBinding());
man.save();
model.refresh();
} else {
item.setKey(-128);
}
model.refresh();