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.
JGraphX Swing Component - Java Graph Visualization Library
This is a binary & source redistribution of the original, unmodified JGraphX library originating from:
"https://github.com/jgraph/jgraphx/archive/v3.4.1.3.zip".
The purpose of this redistribution is to make the library available to other Maven projects.
/**
* $Id: mxAnalysisGraph.java,v 1.10 2012/11/21 13:59:52 mate Exp $
* Copyright (c) 2012, JGraph Ltd
*/
package com.mxgraph.analysis;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.mxgraph.costfunction.mxDoubleValCostFunction;
import com.mxgraph.model.mxIGraphModel;
import com.mxgraph.view.mxGraph;
/**
* Implements a collection of utility methods abstracting the graph structure
* taking into account graph properties such as visible/non-visible traversal
*/
public class mxAnalysisGraph
{
// contains various filters, like visibility and direction
protected Map properties = new HashMap();
// contains various data that is used for graph generation and analysis
protected mxGraphGenerator generator;
protected mxGraph graph;
/**
* Returns the incoming and/or outgoing edges for the given cell.
* If the optional parent argument is specified, then only edges are returned
* where the opposite is in the given parent cell.
*
* @param cell Cell whose edges should be returned.
* @param parent Optional parent. If specified the opposite end of any edge
* must be a child of that parent in order for the edge to be returned. The
* recurse parameter specifies whether or not it must be the direct child
* or the parent just be an ancestral parent.
* @param incoming Specifies if incoming edges should be included in the
* result.
* @param outgoing Specifies if outgoing edges should be included in the
* result.
* @param includeLoops Specifies if loops should be included in the result.
* @param recurse Specifies if the parent specified only need be an ancestral
* parent, true, or the direct parent, false
* @return Returns the edges connected to the given cell.
*/
public Object[] getEdges(Object cell, Object parent, boolean incoming, boolean outgoing, boolean includeLoops, boolean recurse)
{
if (!mxGraphProperties.isTraverseVisible(properties, mxGraphProperties.DEFAULT_TRAVERSE_VISIBLE))
{
return graph.getEdges(cell, parent, incoming, outgoing, includeLoops, recurse);
}
else
{
Object[] edges = graph.getEdges(cell, parent, incoming, outgoing, includeLoops, recurse);
List