/**
* $Id: mxGraph.java,v 1.329 2012-01-13 12:46:29 david Exp $
* Copyright (c) 2007, Gaudenz Alder
*/
package com.mxgraph.view;
import java.awt.Graphics;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Shape;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.w3c.dom.Element;
import com.mxgraph.canvas.mxGraphics2DCanvas;
import com.mxgraph.canvas.mxICanvas;
import com.mxgraph.canvas.mxImageCanvas;
import com.mxgraph.model.mxCell;
import com.mxgraph.model.mxGeometry;
import com.mxgraph.model.mxGraphModel;
import com.mxgraph.model.mxGraphModel.Filter;
import com.mxgraph.model.mxGraphModel.mxChildChange;
import com.mxgraph.model.mxGraphModel.mxCollapseChange;
import com.mxgraph.model.mxGraphModel.mxGeometryChange;
import com.mxgraph.model.mxGraphModel.mxRootChange;
import com.mxgraph.model.mxGraphModel.mxStyleChange;
import com.mxgraph.model.mxGraphModel.mxTerminalChange;
import com.mxgraph.model.mxGraphModel.mxValueChange;
import com.mxgraph.model.mxGraphModel.mxVisibleChange;
import com.mxgraph.model.mxICell;
import com.mxgraph.model.mxIGraphModel;
import com.mxgraph.util.mxConstants;
import com.mxgraph.util.mxEvent;
import com.mxgraph.util.mxEventObject;
import com.mxgraph.util.mxEventSource;
import com.mxgraph.util.mxImageBundle;
import com.mxgraph.util.mxPoint;
import com.mxgraph.util.mxRectangle;
import com.mxgraph.util.mxResources;
import com.mxgraph.util.mxStyleUtils;
import com.mxgraph.util.mxUndoableEdit;
import com.mxgraph.util.mxUndoableEdit.mxUndoableChange;
import com.mxgraph.util.mxUtils;
/**
* Implements a graph object that allows to create diagrams from a graph model
* and stylesheet.
*
* <h3>Images</h3>
* To create an image from a graph, use the following code for a given
* XML document (doc) and File (file):
*
* <code>
* Image img = mxCellRenderer.createBufferedImage(
* graph, null, 1, Color.WHITE, false, null);
* ImageIO.write(img, "png", file);
* </code>
*
* If the XML is given as a string rather than a document, the document can
* be obtained using mxUtils.parse.
*
* This class fires the following events:
*
* mxEvent.ROOT fires if the root in the model has changed. This event has no
* properties.
*
* mxEvent.ALIGN_CELLS fires between begin- and endUpdate in alignCells. The
* <code>cells</code> and <code>align</code> properties contain the respective
* arguments that were passed to alignCells.
*
* mxEvent.FLIP_EDGE fires between begin- and endUpdate in flipEdge. The
* <code>edge</code> property contains the edge passed to flipEdge.
*
* mxEvent.ORDER_CELLS fires between begin- and endUpdate in orderCells. The
* <code>cells</code> and <code>back</code> properties contain the respective
* arguments that were passed to orderCells.
*
* mxEvent.CELLS_ORDERED fires between begin- and endUpdate in cellsOrdered.
* The <code>cells</code> and <code>back</code> arguments contain the
* respective arguments that were passed to cellsOrdered.
*
* mxEvent.GROUP_CELLS fires between begin- and endUpdate in groupCells. The
* <code>group</code>, <code>cells</code> and <code>border</code> arguments
* contain the respective arguments that were passed to groupCells.
*
* mxEvent.UNGROUP_CELLS fires between begin- and endUpdate in ungroupCells.
* The <code>cells</code> property contains the array of cells that was passed
* to ungroupCells.
*
* mxEvent.REMOVE_CELLS_FROM_PARENT fires between begin- and endUpdate in
* removeCellsFromParent. The <code>cells</code> property contains the array of
* cells that was passed to removeCellsFromParent.
*
* mxEvent.ADD_CELLS fires between begin- and endUpdate in addCells. The
* <code>cells</code>, <code>parent</code>, <code>index</code>,
* <code>source</code> and <code>target</code> properties contain the
* respective arguments that were passed to addCells.
*
* mxEvent.CELLS_ADDED fires between begin- and endUpdate in cellsAdded. The
* <code>cells</code>, <code>parent</code>, <code>index</code>,
* <code>source</code>, <code>target</code> and <code>absolute</code>
* properties contain the respective arguments that were passed to cellsAdded.
*
* mxEvent.REMOVE_CELLS fires between begin- and endUpdate in removeCells. The
* <code>cells</code> and <code>includeEdges</code> arguments contain the
* respective arguments that were passed to removeCells.
*
* mxEvent.CELLS_REMOVED fires between begin- and endUpdate in cellsRemoved.
* The <code>cells</code> argument contains the array of cells that was
* removed.
*
* mxEvent.SPLIT_EDGE fires between begin- and endUpdate in splitEdge. The
* <code>edge</code> property contains the edge to be splitted, the
* <code>cells</code>, <code>newEdge</code>, <code>dx</code> and
* <code>dy</code> properties contain the respective arguments that were passed
* to splitEdge.
*
* mxEvent.TOGGLE_CELLS fires between begin- and endUpdate in toggleCells. The
* <code>show</code>, <code>cells</code> and <code>includeEdges</code>
* properties contain the respective arguments that were passed to toggleCells.
*
* mxEvent.FOLD_CELLS fires between begin- and endUpdate in foldCells. The
* <code>collapse</code>, <code>cells</code> and <code>recurse</code>
* properties contain the respective arguments that were passed to foldCells.
*
* mxEvent.CELLS_FOLDED fires between begin- and endUpdate in cellsFolded. The
* <code>collapse</code>, <code>cells</code> and <code>recurse</code>
* properties contain the respective arguments that were passed to cellsFolded.
*
* mxEvent.UPDATE_CELL_SIZE fires between begin- and endUpdate in
* updateCellSize. The <code>cell</code> and <code>ignoreChildren</code>
* properties contain the respective arguments that were passed to
* updateCellSize.
*
* mxEvent.RESIZE_CELLS fires between begin- and endUpdate in resizeCells. The
* <code>cells</code> and <code>bounds</code> properties contain the respective
* arguments that were passed to resizeCells.
*
* mxEvent.CELLS_RESIZED fires between begin- and endUpdate in cellsResized.
* The <code>cells</code> and <code>bounds</code> properties contain the
* respective arguments that were passed to cellsResized.
*
* mxEvent.MOVE_CELLS fires between begin- and endUpdate in moveCells. The
* <code>cells</code>, <code>dx</code>, <code>dy</code>, <code>clone</code>,
* <code>target</code> and <code>location</code> properties contain the
* respective arguments that were passed to moveCells.
*
* mxEvent.CELLS_MOVED fires between begin- and endUpdate in cellsMoved. The
* <code>cells</code>, <code>dx</code>, <code>dy</code> and
* <code>disconnect</code> properties contain the respective arguments that
* were passed to cellsMoved.
*
* mxEvent.CONNECT_CELL fires between begin- and endUpdate in connectCell. The
* <code>edge</code>, <code>terminal</code> and <code>source</code> properties
* contain the respective arguments that were passed to connectCell.
*
* mxEvent.CELL_CONNECTED fires between begin- and endUpdate in cellConnected.
* The <code>edge</code>, <code>terminal</code> and <code>source</code>
* properties contain the respective arguments that were passed to
* cellConnected.
*
* mxEvent.REPAINT fires if a repaint was requested by calling repaint. The
* <code>region</code> property contains the optional mxRectangle that was
* passed to repaint to define the dirty region.
*/
public class mxGraph extends mxEventSource
{
/**
* Adds required resources.
*/
static
{
try
{
mxResources.add("com.mxgraph.resources.graph");
}
catch (Exception e)
{
// ignore
}
}
/**
* Holds the version number of this release. Current version
* is 1.9
没有合适的资源?快使用搜索试试~ 我知道了~
mxGraph JS 绘图组件
共2123个文件
html:1274个
java:245个
gif:219个
5星 · 超过95%的资源 需积分: 12 120 下载量 140 浏览量
2012-02-05
11:35:19
上传
评论
收藏 10.03MB ZIP 举报
温馨提示
mxGraph 是一个 JS 绘图组件适用于需要在网页中设计/编辑 Workflow/BPM 流 程图、图表、网络图和普通图形的 Web 应用程序。mxgraph 下载包中包括用 javescript 写的前端程序,也包括多个和后端程序(java/C#等等)集成的例 子。
资源推荐
资源详情
资源评论
收起资源包目录
mxGraph JS 绘图组件 (2123个子文件)
Share.ashx 7KB
Deploy.ashx 4KB
Export.ashx 2KB
NewExport.ashx 2KB
Config.ashx 1020B
Save.ashx 865B
Hello.aspx 8KB
ChangeLog 92KB
.classpath 661B
Web.config 8KB
mxGdiCanvas.cs 56KB
mxGraph.cs 55KB
mxUtils.cs 47KB
mxGraphView.cs 45KB
mxGraphModel.cs 43KB
mxConstants.cs 37KB
mxObjectCodec.cs 34KB
mxGdiCanvas2D.cs 29KB
mxFastOrganicLayout.cs 19KB
mxEdgeStyle.cs 16KB
mxCodec.cs 15KB
mxCell.cs 13KB
mxPerimeter.cs 13KB
mxSaxOutputHandler.cs 11KB
mxIGraphModel.cs 10KB
mxCellState.cs 9KB
mxGeometry.cs 9KB
mxICell.cs 8KB
mxCellCodec.cs 7KB
mxGraphViewReader.cs 7KB
mxICanvas2D.cs 7KB
mxCellRenderer.cs 7KB
mxCodecRegistry.cs 7KB
mxStylesheetCodec.cs 6KB
mxSession.cs 6KB
mxStylesheet.cs 6KB
mxRectangle.cs 6KB
mxGraphViewImageReader.cs 6KB
mxModelCodec.cs 3KB
mxSharedState.cs 3KB
mxImageCanvas.cs 3KB
mxBasicCanvas.cs 3KB
mxPoint.cs 3KB
Form.cs 3KB
mxCellPath.cs 3KB
mxImageBundle.cs 3KB
mxStyleRegistry.cs 2KB
Examples.cs 2KB
mxConnectionConstraint.cs 2KB
Hello.aspx.cs 2KB
Layout.cs 2KB
mxICanvas.cs 2KB
mxCodecTest.cs 1KB
AssemblyInfo.cs 1KB
AssemblyInfo.cs 1KB
mxIGraphLayout.cs 1KB
Hello.aspx.designer.cs 1KB
mxgraph-dotnet.csproj 6KB
aspnet.csproj 5KB
examples.csproj 3KB
main.css 21KB
main.css 21KB
wordpress.css 8KB
doxygen.css 8KB
grapheditor.css 7KB
common.css 3KB
tabs.css 2KB
stylesheet.css 1KB
explorer.css 427B
html.css 372B
process.css 42B
loading.gif 10KB
loading.gif 7KB
mxgraph_logo.gif 4KB
tab_r.gif 3KB
bg.gif 1KB
small_cancel_intermediate.gif 1KB
small_rule.gif 1KB
small_message_intermediate.gif 1KB
small_cancel_end.gif 1KB
small_timer.gif 1KB
small_message_end.gif 1KB
small_error.gif 1KB
save.gif 1KB
save.gif 1KB
small_terminate.gif 1KB
saveas.gif 1KB
small_message.gif 1KB
small_multiple.gif 1024B
open.gif 1023B
open.gif 1023B
preferences.gif 1019B
preferences.gif 1019B
small_link.gif 1019B
paste.gif 1017B
paste.gif 1017B
small_event_intermediate.gif 1016B
house.gif 1013B
house.gif 1013B
press.gif 1005B
共 2123 条
- 1
- 2
- 3
- 4
- 5
- 6
- 22
gyp8735abc
- 粉丝: 9
- 资源: 77
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页