com.mxgraph.io.mxCodecRegistry Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jgraphx Show documentation
Show all versions of jgraphx Show documentation
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: mxCodecRegistry.java,v 1.24 2010/09/15 11:57:07 gaudenz Exp $
* Copyright (c) 2007, Gaudenz Alder
*/
package com.mxgraph.io;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
import com.mxgraph.model.mxGraphModel.mxCollapseChange;
import com.mxgraph.model.mxGraphModel.mxGeometryChange;
import com.mxgraph.model.mxGraphModel.mxStyleChange;
import com.mxgraph.model.mxGraphModel.mxValueChange;
import com.mxgraph.model.mxGraphModel.mxVisibleChange;
/**
* Singleton class that acts as a global registry for codecs. See
* {@link mxCodec} for an example.
*/
public class mxCodecRegistry
{
/**
* Maps from constructor names to codecs.
*/
protected static Hashtable codecs = new Hashtable();
/**
* Maps from classnames to codecnames.
*/
protected static Hashtable aliases = new Hashtable();
/**
* Holds the list of known packages. Packages are used to prefix short
* class names (eg. mxCell) in XML markup.
*/
protected static List packages = new ArrayList();
// Registers the known codecs and package names
static
{
addPackage("com.mxgraph");
addPackage("com.mxgraph.util");
addPackage("com.mxgraph.model");
addPackage("com.mxgraph.view");
addPackage("java.lang");
addPackage("java.util");
register(new mxObjectCodec(new ArrayList