<commit_before>package org.ucombinator.jaam.visualizer.layout;

import javafx.scene.effect.DropShadow;
import javafx.scene.paint.Color;
import javafx.scene.paint.Paint;
import javafx.scene.shape.Rectangle;
import javafx.util.Duration;

import javafx.animation.FadeTransition;
import javafx.scene.control.TreeItem;

import java.util.HashSet;
import java.util.LinkedHashSet;

import org.ucombinator.jaam.visualizer.controllers.MainTabController;
import org.ucombinator.jaam.visualizer.graph.*;
import org.ucombinator.jaam.visualizer.gui.GUINode;
import org.ucombinator.jaam.visualizer.gui.GUINodeStatus;

public abstract class AbstractLayoutVertex extends AbstractVertex
        implements Comparable<AbstractLayoutVertex>, GraphEntity
{
    // Types of layout vertices
    public enum VertexType {
        INSTRUCTION, LOOP, METHOD, CHAIN, ROOT, SHRINK, SCC
    }

    // Because layout vertices are also HierarchicalGraphs they have two associated graphs:
    private HierarchicalGraph selfGraph = null; // The graph to which this vertex belongs
    private HierarchicalGraph innerGraph = new HierarchicalGraph(); // The graph contained inside this vertex
    private VertexType vertexType;

    // Graphic related fields
    private GUINode graphics;
    private GUINodeStatus nodeStatus = new GUINodeStatus();

    public static final double DEFAULT_WIDTH = 10.0;
    public static final double DEFAULT_HEIGHT = 10.0;

    protected Color color;
    public static final Color highlightColor = Color.ORANGE;
    public static final DropShadow highlightShadow = new DropShadow(10, Color.BLUE);
    public static final DropShadow classHighlightShadow = new DropShadow(20, Color.GREEN);

    private boolean isExpanded = true;
    private boolean isHidden = false;
    private boolean isLabelVisible = false;
    private boolean isEdgeVisible = true;
    private boolean drawEdges;
    private boolean isSelected = false;

    // TODO we should probably replace this with only a id version
    public AbstractLayoutVertex(String label, VertexType type, boolean drawEdges) {
        super(label);
        this.drawEdges = drawEdges;

        this.vertexType = type;
        this.setVisible(false);
    }

    public AbstractLayoutVertex(int id, String label, VertexType type){
    	super(id, label);
        this.drawEdges = true;<commit_msg>Improved pop of the highlight shadow<commit_after>package org.ucombinator.jaam.visualizer.layout;

import javafx.scene.effect.BlurType;
import javafx.scene.effect.DropShadow;
import javafx.scene.paint.Color;
import javafx.scene.paint.Paint;
import javafx.scene.shape.Rectangle;
import javafx.util.Duration;

import javafx.animation.FadeTransition;
import javafx.scene.control.TreeItem;

import java.util.HashSet;
import java.util.LinkedHashSet;

import org.ucombinator.jaam.visualizer.controllers.MainTabController;
import org.ucombinator.jaam.visualizer.graph.*;
import org.ucombinator.jaam.visualizer.gui.GUINode;
import org.ucombinator.jaam.visualizer.gui.GUINodeStatus;

public abstract class AbstractLayoutVertex extends AbstractVertex
        implements Comparable<AbstractLayoutVertex>, GraphEntity
{
    // Types of layout vertices
    public enum VertexType {
        INSTRUCTION, LOOP, METHOD, CHAIN, ROOT, SHRINK, SCC
    }

    // Because layout vertices are also HierarchicalGraphs they have two associated graphs:
    private HierarchicalGraph selfGraph = null; // The graph to which this vertex belongs
    private HierarchicalGraph innerGraph = new HierarchicalGraph(); // The graph contained inside this vertex
    private VertexType vertexType;

    // Graphic related fields
    private GUINode graphics;
    private GUINodeStatus nodeStatus = new GUINodeStatus();

    public static final double DEFAULT_WIDTH = 10.0;
    public static final double DEFAULT_HEIGHT = 10.0;

    protected Color color;
    public static final Color highlightColor = Color.ORANGE;
    public static final DropShadow highlightShadow = new DropShadow(10, Color.BLUE);
    public static final DropShadow classHighlightShadow = new DropShadow(BlurType.ONE_PASS_BOX, Color.GREEN, 20,
            0.5, 0, 0);

    private boolean isExpanded = true;
    private boolean isHidden = false;
    private boolean isLabelVisible = false;
    private boolean isEdgeVisible = true;
    private boolean drawEdges;
    private boolean isSelected = false;

    // TODO we should probably replace this with only a id version
    public AbstractLayoutVertex(String label, VertexType type, boolean drawEdges) {
        super(label);
        this.drawEdges = drawEdges;

        this.vertexType = type;
        this.setVisible(false);
    }

    public AbstractLayoutVertex(int id, String label, VertexType type){
    	super(id, label);
        this.drawEdges = true;
{'fraction_non_alphanumeric': 0.07148829431438126, 'fraction_numerical': 0.005016722408026756, 'mean_word_length': 3.989572471324296, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7323921', 'n_tokens_mistral': 1368, 'n_tokens_neox': 1300, 'n_words': 396}