This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
else if (format == 'svg') | |
{ | |
var bg = this.editor.graph.background; | |
if (bg == 'none') | |
{ | |
bg = null; | |
} | |
// JPG does not support transparent backgrounds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" parent="1" style="gradientColor=#ffffff;gradientDirection=north;spacingRight=-1.39;fillColor=#f0f0f0;shadow=1;spacingTop=-1.39;spacingLeft=-1.39;strokeColor=#404040;whiteSpace=wrap;spacingBottom=-1.39;strokeWidth=0.7;group;" value="" vertex="1"><mxGeometry as="geometry" height="70.0" width="410.0" x="150.0" y="280.0"/></mxCell><mxCell id="3" parent="2" style="gradientColor=#ffffff;gradientDirection=north;spacingRight=-1.39;fillColor=#f0f0f0;shadow=1;spacingTop=-1.39;shape=mxgraph.flowchart.process;spacingLeft=-1.39;strokeColor=#404040;whiteSpace=wrap;spacingBottom=-1.39;strokeWidth=0.7;" value="" vertex="1"><mxGeometry as="geometry" height="60.0" width="100.0" y="10.0"/></mxCell><mxCell id="4" parent="2" style="gradientColor=#ffffff;gradientDirection=north;spacingRight=-1.39;fillColor=#f0f0f0;shadow=1;spacingTop=-1.39;spacingLeft=-1.39;strokeColor=#404040;whiteSpace=wrap;spacingBottom=-1.39;strokeWidth=0.7;" value="" vertex="1"><mxG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javafx.application.Application; | |
import javafx.beans.value.*; | |
import javafx.concurrent.Worker.State; | |
import javafx.embed.swing.SwingFXUtils; | |
import javafx.scene.Scene; | |
import javafx.scene.image.*; | |
import javafx.scene.web.WebEngine; | |
import javafx.scene.web.WebView; | |
import javafx.stage.Stage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader; | |
import java.io.BufferedWriter; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.io.OutputStreamWriter; | |
import javax.swing.JFileChooser; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Copyright (c) 2006-2013, JGraph Ltd | |
Hierarchical Layout example for mxGraph. This example demonstrates the | |
use of the hierarchical and organic layouts. Note that the hierarchical | |
layout requires another script tag in the head of the page. | |
--> | |
<html> | |
<head> | |
<title>Hierarchical Layout example for mxGraph</title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mxUtils.getXml: function(node, linefeed) | |
{ | |
var xml = ''; | |
if (window.XMLSerializer != null) | |
{ | |
var xmlSerializer = new XMLSerializer(); | |
xml = xmlSerializer.serializeToString(node); | |
} | |
else if (node.xml != null) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Sets the XML node for the current diagram. | |
*/ | |
Editor.prototype.setGraphXml = function(node) | |
{ | |
var dec = new mxCodec(node.ownerDocument); | |
if (node.nodeName == 'mxGraphModel') | |
{ | |
this.graph.view.scale = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mxHierarchicalLayout.prototype.run = function(parent) | |
{ | |
// Separate out unconnected hierarchies | |
var hierarchyVertices = []; | |
var allVertexSet = []; | |
if (this.roots == null && parent != null) | |
{ | |
var filledVertexSet = Object(); | |
this.filterDescendants(parent, filledVertexSet); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mxHierarchicalLayout.prototype.run = function(parent) | |
{ | |
// Separate out unconnected hierarchies | |
var hierarchyVertices = []; | |
var allVertexSet = []; | |
if (this.roots == null && parent != null) | |
{ | |
var filledVertexSet = Object(); | |
this.filterDescendants(parent, filledVertexSet); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var s = mxConstants.STYLE_VERTICAL_LABEL_POSITION + '=bottom;' + mxConstants.STYLE_VERTICAL_ALIGN + '=top;' + mxConstants.STYLE_STROKEWIDTH + '=2;'; | |
content.appendChild(this.createVertexTemplate(s + mxConstants.STYLE_SHAPE + '=mxgraph.er.attribute;buttonText=Attribute;textColor=#000000;fontSize=17;buttonStyle=dblFrame;' + mxConstants.STYLE_FILLCOLOR + '=#ffffff;', w, h, '', 'Attribute', false)); | |
content.appendChild(this.createVertexTemplate(s + mxConstants.STYLE_SHAPE + '=mxgraph.er.bachmans;textColor=#000000;' + mxConstants.STYLE_FONTSIZE + '=17;', w * 3, h * 2, '', 'ERD Bachman\'s Notation', false)); | |
content.appendChild(this.createVertexTemplate(s + mxConstants.STYLE_SHAPE + '=mxgraph.er.chens;textColor=#000000;' + mxConstants.STYLE_FONTSIZE + '=17;', w * 3, h, '', 'ERD Chen\'s Notation', false)); | |
content.appendChild(this.createVertexTemplate(s + mxConstants.STYLE_SHAPE + '=mxgraph.er.cloud;buttonText=Cloud;textColor=#000000;' + mxConstants.STYLE_FONTSIZE + '=17;', w, h, '', 'Cloud', false)) |