use of edu.cmu.cs.hcii.cogtool.ui.DesignEditorSelectionState in project cogtool by cogtool.
the class DesignEditorController method createDeleteTransitionAction.
// deleteFrames
protected IListenerAction createDeleteTransitionAction() {
return new IListenerAction() {
public Class<?> getParameterClass() {
return DesignEditorSelectionState.class;
}
public boolean performAction(Object prms) {
DesignEditorSelectionState selection = (DesignEditorSelectionState) prms;
Transition[] transitions = selection.getSelectedTransitions();
if ((transitions != null) && (transitions.length > 0)) {
if (interaction.confirmDeleteTransitions(transitions)) {
deleteTransitions(transitions);
return true;
}
} else {
interaction.protestNoSelection();
}
return false;
}
};
}
Aggregations