if (node != null && !getHierarchyManager().isNormalNode(node)) {
double x = translateX(e.getX());
double y = translateY(e.getY());
Graph2D graph = getView().getGraph2D();
NodeRealizer r = graph.getRealizer(node);
GroupNodeRealizer gnr = null;
if (r instanceof GroupNodeRealizer) {
gnr = (GroupNodeRealizer) r;
} else if (r instanceof ProxyShapeNodeRealizer
&& ((ProxyShapeNodeRealizer) r).getRealizerDelegate() instanceof GroupNodeRealizer) {
gnr = (GroupNodeRealizer) ((ProxyShapeNodeRealizer) r).getRealizerDelegate();
}
if (gnr != null) {
NodeLabel handle = gnr.getStateLabel();
if (handle.getBox().contains(x, y)) {
AbstractGraphEditCommand command;
if (getHierarchyManager().isFolderNode(node)) {
command = new FolderNodeHandleCommand(getGraphPanel().getGraphLoader(), getGraphPanel().getEdgeGrouper(), node, true);
getGraphPanel().getCommandController().executeCommand(command);