<commit_before>package de.uni.freiburg.iig.telematik.wolfgang.menu.toolbars.property;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;

import de.invation.code.toval.graphic.component.ExecutorLabel;
import de.uni.freiburg.iig.telematik.sepia.petrinet.properties.threaded.AbstractThreadedPNPropertyChecker;
import de.uni.freiburg.iig.telematik.wolfgang.editor.component.PNEditorComponent;

public abstract class PNPropertyCheckLabel<Z> extends ExecutorLabel<Z> {

	private static final long serialVersionUID = -2807606775313824173L;
	private static final Dimension DEFAULT_SIZE = new Dimension(40,40);


	public static Color COLOR_PROPERTY_UNKNOWN = Color.GRAY;
	public static Color COLOR_PROPERTY_TRUE = Color.GREEN;
	public static Color COLOR_PROPERTY_FALSE = Color.RED;

	private String propertyString = "";

	protected PNEditorComponent editorComponent;
	
	
	protected boolean propertyHolds = false;

	public PNPropertyCheckLabel(PNEditorComponent editorComponent) {
		super();
		setPreferredSize(DEFAULT_SIZE);
		setMinimumSize(DEFAULT_SIZE);
		setMaximumSize(DEFAULT_SIZE);
		setOpaque(true);
		this.editorComponent = editorComponent;
	}

	public PNPropertyCheckLabel(PNEditorComponent editorComponent, String propertyName) {
		this(editorComponent);
		this.propertyString = propertyName;
	}

	@Override
	protected void startExecutor() throws Exception {
		setExecutor(createNewExecutor());
		super.startExecutor();
	}

	protected abstract AbstractThreadedPNPropertyChecker<?,?,?,?,?,?,Z,?> createNewExecutor();

	public String getPropertyString() {
		return propertyString;
	}

	public void setPropertyString(String propertyString) {
		this.propertyString = propertyString;
	}

	@Override<commit_msg>set initial color "Gray"<commit_after>package de.uni.freiburg.iig.telematik.wolfgang.menu.toolbars.property;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;

import de.invation.code.toval.graphic.component.ExecutorLabel;
import de.uni.freiburg.iig.telematik.sepia.petrinet.properties.threaded.AbstractThreadedPNPropertyChecker;
import de.uni.freiburg.iig.telematik.wolfgang.editor.component.PNEditorComponent;

public abstract class PNPropertyCheckLabel<Z> extends ExecutorLabel<Z> {

	private static final long serialVersionUID = -2807606775313824173L;
	private static final Dimension DEFAULT_SIZE = new Dimension(40,40);


	public static Color COLOR_PROPERTY_UNKNOWN = Color.GRAY;
	public static Color COLOR_PROPERTY_TRUE = Color.GREEN;
	public static Color COLOR_PROPERTY_FALSE = Color.RED;

	private String propertyString = "";

	protected PNEditorComponent editorComponent;
	
	
	protected boolean propertyHolds = false;

	public PNPropertyCheckLabel(PNEditorComponent editorComponent) {
		super();
		setPreferredSize(DEFAULT_SIZE);
		setMinimumSize(DEFAULT_SIZE);
		setMaximumSize(DEFAULT_SIZE);
		setOpaque(true);
		setBackground(getColorInitial());
		this.editorComponent = editorComponent;
	}

	public PNPropertyCheckLabel(PNEditorComponent editorComponent, String propertyName) {
		this(editorComponent);
		this.propertyString = propertyName;
	}

	@Override
	protected void startExecutor() throws Exception {
		setExecutor(createNewExecutor());
		super.startExecutor();
	}

	protected abstract AbstractThreadedPNPropertyChecker<?,?,?,?,?,?,Z,?> createNewExecutor();

	public String getPropertyString() {
		return propertyString;
	}

	public void setPropertyString(String propertyString) {
		this.propertyString = propertyString;
	}

	@Override
{'fraction_non_alphanumeric': 0.09143610013175231, 'fraction_numerical': 0.012648221343873518, 'mean_word_length': 6.487179487179487, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '3407888', 'n_tokens_mistral': 1213, 'n_tokens_neox': 1118, 'n_words': 223}