private ShapeStyle findEdgeStyle(GeometryIndex index) { if (editingService.getIndexStateService().isMarkedForDeletion(index)) { return styleService.getEdgeMarkForDeletionStyle(); } else if (!editingService.getIndexStateService().isEnabled(index)) { return styleService.getEdgeDisabledStyle(); } boolean selected = editingService.getIndexStateService().isSelected(index); boolean highlighted = editingService.getIndexStateService().isHightlighted(index); if (selected && highlighted) { return styleService.getEdgeSelectHoverStyle(); } else if (selected) { return styleService.getEdgeSelectStyle(); } else if (highlighted) { return styleService.getEdgeHoverStyle(); } return styleService.getEdgeStyle(); }