use of edu.cmu.cs.hcii.cogtool.ui.DesignEditorSelectionState.TransitionSelectionChange in project cogtool by cogtool.
the class DesignEditorUI method createTransitionSelectionHandler.
// createFrameSelectionHandler
protected AlertHandler createTransitionSelectionHandler() {
return new AlertHandler() {
public void handleAlert(EventObject alert) {
TransitionSelectionChange evt = (TransitionSelectionChange) alert;
if (evt != null) {
InteractionDrawingEditor editor = view.getEditor();
if (evt.changedTransitionFigure != null) {
evt.changedTransitionFigure.setSelected(editor, evt.selected);
} else {
Iterator<DesignEditorTransition> transitionFigures = selection.getSelectedTransitionFigures();
while (transitionFigures.hasNext()) {
DesignEditorTransition transitionFigure = transitionFigures.next();
transitionFigure.setSelected(editor, evt.selected);
}
}
// Repaint the contents
delayedRepainting.requestRepaint(REPAINT_ALL);
updateView(evt.changedTransitionFigure == null);
}
}
};
}
Aggregations