add(mDeleteExclusionBtn, cc.xy(4, 5));
mNewExclusionBtn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
WizardHandler handler = new WizardHandler(parent, new ExcludeWizardStep(favorite));
Exclusion exclusion = (Exclusion) handler.show();
if (exclusion != null) {
((DefaultListModel) mExclusionsList.getModel()).addElement(exclusion);
mWasAdded = true;
}
}
});
mEditExclusionBtn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Exclusion oldExclusion = (Exclusion) mExclusionsList.getSelectedValue();
WizardHandler handler = new WizardHandler(parent, new ExcludeWizardStep(favorite, oldExclusion));
Exclusion newExclusion = (Exclusion) handler.show();
if (newExclusion != null) {
int inx = mExclusionsList.getSelectedIndex();
((DefaultListModel) mExclusionsList.getModel()).setElementAt(newExclusion, inx);
mWasEditedOrDeleted = true;