Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2024 Budapest University of Technology and Economics
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package hu.bme.mit.theta.xta;
import java.awt.Color;
import hu.bme.mit.theta.common.container.Containers;
import java.util.Map;
import java.util.StringJoiner;
import hu.bme.mit.theta.common.visualization.EdgeAttributes;
import hu.bme.mit.theta.common.visualization.Graph;
import hu.bme.mit.theta.common.visualization.LineStyle;
import hu.bme.mit.theta.common.visualization.NodeAttributes;
import hu.bme.mit.theta.xta.XtaProcess.Edge;
import hu.bme.mit.theta.xta.XtaProcess.Loc;
public final class XtaVisualizer {
private static final String XTA_LABEL = "";
private static final String LOC_ID_PREFIX = "loc_";
private static final String PHANTOM_INIT_ID = "phantom_init_";
private static final String PROC_ID_PREFIX = "proc_";
private static final Color FILL_COLOR = Color.WHITE;
private static final Color LINE_COLOR = Color.BLACK;
private static final LineStyle LOC_LINE_STYLE = LineStyle.NORMAL;
private static final LineStyle EDGE_LINE_STYLE = LineStyle.NORMAL;
private static final int LOC_PERIPHERIES = 1;
private XtaVisualizer() {
}
public static Graph visualize(final XtaSystem system) {
final Graph graph = new Graph("System", XTA_LABEL);
final Map