All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.uni.freiburg.iig.telematik.jagal.visualization.circle.VisualWeightedGraph Maven / Gradle / Ivy

Go to download

JAGAL provides implementations for directed graphs (weighted and unweighted) and various types of transition systems as well as utils for graph traversal and modification.

The newest version!
package de.uni.freiburg.iig.telematik.jagal.visualization.circle;


import java.awt.Color;
import java.awt.Dimension;

import de.uni.freiburg.iig.telematik.jagal.graph.Vertex;
import de.uni.freiburg.iig.telematik.jagal.graph.weighted.AbstractWeightedGraph;
import de.uni.freiburg.iig.telematik.jagal.graph.weighted.WeightedEdge;

public abstract class VisualWeightedGraph, U> extends VisualGraph, U> {
	
	private static final long serialVersionUID = 1L;

	public VisualWeightedGraph(AbstractWeightedGraph baseGraph, Dimension dimension) {
		super(baseGraph, dimension);
	}
	
	public VisualWeightedGraph(AbstractWeightedGraph baseGraph){
		this(baseGraph, VisualVertexSet.defaultDimension);
	}
	
	@Override
	protected void drawEdge(WeightedEdge edge){
		drawEdge(edge, defaultEdgeColor);
	}
	
	@Override
	protected void drawEdge(WeightedEdge edge, Color color){
		if(!baseGraph.containsObject(edge))
			return;
		drawArrow(edge.getSource(), edge.getTarget(), edge.getWeight(), color);	
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy