e.consume();
}
private void doSingleClick(DefaultGraphCell cell) {
if (cell != null && cell instanceof ReachabilityPlaceModel) {
ReachabilityPlaceModel place = (ReachabilityPlaceModel) cell;
if (!place.getHighlight()) {
// remove all highlights and virtual tokens
deHighlightModel(false);
deHighlightEdges();
// highlight the edges
highlightEdges(place);
// set the virtual tokens for the current place(marking)
setTokens(place);
// highlight the transitions in the petrinet for the current marking
highlightTransitions(place);
// highlight the place/marking in the RG
place.setHighlight(true);
rgp.setUnselectButtonEnabled(true);
editor.setReadOnly(false);
// repaint the instance of the editor
editor.getGraph().repaint();
// repaint the graph
graph.clearSelection();
graph.getGraphLayoutCache().reload();
}
} else
if (cell != null && cell instanceof ReachabilityEdgeModel) {
deHighlightModel(false);
ReachabilityEdgeModel edge = (ReachabilityEdgeModel) cell;
ReachabilityPlaceModel place = (ReachabilityPlaceModel) ((ReachabilityPortModel) edge.getTarget())
.getParent();
deHighlightEdges();
highlightEdges(place);
// set the virtual tokens for the current place(marking)
setTokens(place);
// set color of clicked place
highlightTransitions(place);
place.setHighlight(true);
this.lastHighlighted = place;
rgp.setUnselectButtonEnabled(true);
editor.setReadOnly(false);
// repaint the instance of the editor
editor.getGraph().repaint();