private class ButtonActions implements ActionListener
{
public void actionPerformed(ActionEvent pEvt)
{
ControlActionsTableModel model = (ControlActionsTableModel) mTable.getModel();
int idx = mTable.getSelectedRow();
if ( pEvt.getSource() == mDeleteButton )
{
model.remove(idx);
}
else if ( pEvt.getSource() == mUpButton )
{
model.moveUp(idx);
mTable.getSelectionModel().setSelectionInterval(-1, idx+1);
}
else if ( pEvt.getSource() == mDownButton )
{
model.moveDown(idx);
mTable.getSelectionModel().setSelectionInterval(-1, idx-1);
}
else if ( pEvt.getSource() == mEditButton )
{
mEditor.loadControlAction(((ControlActionsTableModel)mTable.getModel()).getControlAction(idx));