Adding model update, model migrator, curved line support, relationship lines, remove of web-services classes

This commit is contained in:
Pablo Luna
2010-12-13 11:07:20 -03:00
parent 28aba40f6f
commit 67c4968aca
46 changed files with 2074 additions and 718 deletions

View File

@@ -91,6 +91,7 @@
<include>${basedir}/target/tmp/peer/svg/Font-min.js</include>
<include>${basedir}/target/tmp/peer/svg/ArialFont-min.js</include>
<include>${basedir}/target/tmp/peer/svg/PolyLinePeer-min.js</include>
<include>${basedir}/target/tmp/peer/svg/CurvedLinePeer-min.js</include>
<include>${basedir}/target/tmp/peer/svg/TextPeer-min.js</include>
<include>${basedir}/target/tmp/peer/svg/WorkspacePeer-min.js</include>
<include>${basedir}/target/tmp/peer/svg/GroupPeer-min.js</include>
@@ -109,6 +110,7 @@
<include>${basedir}/target/tmp/Image-min.js</include>
<include>${basedir}/target/tmp/Line-min.js</include>
<include>${basedir}/target/tmp/PolyLine-min.js</include>
<include>${basedir}/target/tmp/CurvedLine-min.js</include>
<include>${basedir}/target/tmp/Rect-min.js</include>
<include>${basedir}/target/tmp/Text-min.js</include>
<include>${basedir}/target/tmp/Toolkit-min.js</include>

View File

@@ -0,0 +1,112 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
*/
web2d.CurvedLine = function(attributes)
{
var peer = web2d.peer.Toolkit.createCurvedLine();
var defaultAttributes = {strokeColor:'blue',strokeWidth:1,strokeStyle:'solid',strokeOpacity:1};
for (var key in attributes)
{
defaultAttributes[key] = attributes[key];
}
web2d.Element.call(this, peer, defaultAttributes);
};
objects.extend(web2d.CurvedLine, web2d.Element);
web2d.CurvedLine.prototype.getType = function()
{
return "CurvedLine";
};
web2d.CurvedLine.prototype.setFrom = function(x, y)
{
this._peer.setFrom(x, y);
};
web2d.CurvedLine.prototype.setTo = function(x, y)
{
this._peer.setTo(x, y);
};
web2d.CurvedLine.prototype.getFrom = function()
{
return this._peer.getFrom();
};
web2d.CurvedLine.prototype.getTo = function()
{
return this._peer.getTo();
};
web2d.CurvedLine.prototype.setShowArrow = function(visible){
this._peer.setShowArrow(visible);
};
web2d.CurvedLine.prototype.isShowArrow = function(){
return this._peer.isShowArrow();
};
web2d.CurvedLine.prototype.setSrcControlPoint = function(control){
this._peer.setSrcControlPoint(control);
};
web2d.CurvedLine.prototype.setDestControlPoint = function(control){
this._peer.setDestControlPoint(control);
};
web2d.CurvedLine.prototype.getControlPoints = function(){
return this._peer.getControlPoints();
};
web2d.CurvedLine.prototype.isSrcControlPointCustom = function(){
return this._peer.isSrcControlPointCustom();
};
web2d.CurvedLine.prototype.isDestControlPointCustom = function(){
return this._peer.isDestControlPointCustom();
};
web2d.CurvedLine.prototype.setIsSrcControlPointCustom = function(isCustom){
this._peer.setIsSrcControlPointCustom(isCustom);
};
web2d.CurvedLine.prototype.setIsDestControlPointCustom = function(isCustom){
this._peer.setIsDestControlPointCustom(isCustom);
};
web2d.CurvedLine.prototype.updateLine= function(avoidControlPointFix){
return this._peer.updateLine(avoidControlPointFix);
};
web2d.CurvedLine.prototype.setStyle = function(style){
this._peer.setLineStyle(style);
};
web2d.CurvedLine.prototype.getStyle = function(){
return this._peer.getLineStyle();
};
web2d.CurvedLine.prototype.setDashed = function(length,spacing){
this._peer.setDashed(length, spacing);
};
web2d.CurvedLine.SIMPLE_LINE = false;
web2d.CurvedLine.NICE_LINE = true;

View File

@@ -1,22 +1,22 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
*/
web2d.Line = function(attributes)
{
var peer = web2d.peer.Toolkit.createLine();
@@ -44,6 +44,16 @@ web2d.Line.prototype.setTo = function(x, y)
this._peer.setTo(x, y);
};
web2d.Line.prototype.getFrom = function()
{
return this._peer.getFrom();
};
web2d.Line.prototype.getTo = function()
{
return this._peer.getTo();
};
/**
* Defines the start and the end line arrow style.
* Can have values "none | block | classic | diamond | oval | open | chevron | doublechevron"

View File

@@ -74,9 +74,13 @@ web2d.peer.ToolkitVML =
{
return new web2d.peer.vml.LinePeer();
},
createPolyLine: function()
createCurvedLine: function()
{
return new web2d.peer.vml.PolyLinePeer();
return new web2d.peer.vml.CurvedLinePeer();
},
createCurvedLine: function()
{
return new web2d.peer.vml.CurvedLinePeer();
},
createImage: function ()
{
@@ -135,6 +139,10 @@ web2d.peer.ToolkitSVG =
{
return new web2d.peer.svg.PolyLinePeer();
},
createCurvedLine: function()
{
return new web2d.peer.svg.CurvedLinePeer();
},
createText: function ()
{
return new web2d.peer.svg.TextPeer();

View File

@@ -0,0 +1,223 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
*/
web2d.peer.svg.CurvedLinePeer = function()
{
var svgElement = window.document.createElementNS(this.svgNamespace, 'path');
web2d.peer.svg.ElementPeer.call(this, svgElement);
this._style={fill:'gray'};
this._updateStyle();
this._customControlPoint_1 = false;
this._customControlPoint_2 = false;
this._control1=new core.Point();
this._control2=new core.Point();
this._lineStyle=true;
};
objects.extend(web2d.peer.svg.CurvedLinePeer, web2d.peer.svg.ElementPeer);
web2d.peer.svg.CurvedLinePeer.prototype.setSrcControlPoint = function(control){
this._customControlPoint_1 = true;
if(core.Utils.isDefined(control.x)){
this._control1 = control;
}
this._updatePath();
};
web2d.peer.svg.CurvedLinePeer.prototype.setDestControlPoint = function(control){
this._customControlPoint_2 = true;
if(core.Utils.isDefined(control.x)){
this._control2 = control;
}
this._updatePath();
};
web2d.peer.svg.CurvedLinePeer.prototype.isSrcControlPointCustom = function() {
return this._customControlPoint_1;
};
web2d.peer.svg.CurvedLinePeer.prototype.isDestControlPointCustom = function() {
return this._customControlPoint_2;
};
web2d.peer.svg.CurvedLinePeer.prototype.setIsSrcControlPointCustom = function(isCustom) {
this._customControlPoint_1 = isCustom;
};
web2d.peer.svg.CurvedLinePeer.prototype.setIsDestControlPointCustom = function(isCustom) {
this._customControlPoint_2 = isCustom;
};
web2d.peer.svg.CurvedLinePeer.prototype.getControlPoints = function(){
return [this._control1, this._control2];
};
web2d.peer.svg.CurvedLinePeer.prototype.setFrom = function(x1, y1)
{
if(this._customControlPoint_1 && core.Utils.isDefined(this._x1)){
this._control1.x-=this._x1-x1;
this._control1.y-=this._y1-y1;
}
this._x1 = x1;
this._y1 = y1;
this._updatePath();
};
web2d.peer.svg.CurvedLinePeer.prototype.setTo = function(x2, y2)
{
if(this._customControlPoint_2 && core.Utils.isDefined(this._x2)){
this._control2.x-=this._x2-x2;
this._control2.y-=this._y2-y2;
}
this._x2 = x2;
this._y2 = y2;
this._updatePath();
};
web2d.peer.svg.CurvedLinePeer.prototype.getFrom = function()
{
return new core.Point(this._x1,this._y1);
};
web2d.peer.svg.CurvedLinePeer.prototype.getTo = function()
{
return new core.Point(this._x2,this._y2);
};
web2d.peer.svg.CurvedLinePeer.prototype.setStrokeWidth = function(width)
{
this._style['stroke-width']= width;
this._updateStyle();
};
web2d.peer.svg.CurvedLinePeer.prototype.setColor = function(color)
{
this._style['stroke']= color;
this._style['fill']=color;
this._updateStyle();
};
web2d.peer.svg.CurvedLinePeer.prototype.updateLine = function(avoidControlPointFix){
this._updatePath(avoidControlPointFix);
};
web2d.peer.svg.CurvedLinePeer.prototype.setLineStyle = function (style){
this._lineStyle=style;
if(this._lineStyle){
this._style['fill']=this._fill;
} else {
this._fill = this._style['fill'];
this._style['fill']='none';
}
this._updateStyle();
this.updateLine();
};
web2d.peer.svg.CurvedLinePeer.prototype.getLineStyle = function (){
return this._lineStyle;
};
web2d.peer.svg.CurvedLinePeer.prototype.setShowArrow = function(visible){
this._showArrow =visible;
this.updateLine();
};
web2d.peer.svg.CurvedLinePeer.prototype.isShowArrow = function(){
return this._showArrow;
};
web2d.peer.svg.CurvedLinePeer.prototype._updatePath = function(avoidControlPointFix)
{
this._calculateAutoControlPoints(avoidControlPointFix);
var x,y, xp, yp;
if(this._showArrow){
if(this._control2.y == 0)
this._control2.y=1;
var y0 = parseInt(this._control2.y) - this._y2;
var x0 = parseInt(this._control2.x) - this._x2;
var x2=x0+y0;
var y2 = y0-x0;
var x3 = x0-y0;
var y3 = y0+x0;
var m = y2/x2;
var mp = y3/x3;
var l = 6;
var pow = Math.pow;
x = (x2==0?0:Math.sqrt(pow(l,2)/(1+pow(m,2))));
x *=Math.sign(x2);
y = (x2==0?l*Math.sign(y2):m*x);
xp = (x3==0?0:Math.sqrt(pow(l,2)/(1+pow(mp,2))));
xp *=Math.sign(x3);
yp = (x3==0?l*Math.sign(y3):mp*xp);
}
var path = "M"+this._x1+","+this._y1
+" C"+this._control1.x+","+this._control1.y+" "
+this._control2.x+","+this._control2.y+" "
+this._x2+","+this._y2+
(this._lineStyle?" "
+this._control2.x+","+(parseInt(this._control2.y)+3)+" "
+this._control1.x+","+(parseInt(this._control1.y)+3)+" "
+this._x1+","+(parseInt(this._y1)+3)+" Z"
:""
)+
(this._showArrow?" "
+"M"+this._x2+","+this._y2+" "
+"L"+(x+this._x2)+","+(y+this._y2)
+"M"+this._x2+","+this._y2+" "
+"L"+(xp+this._x2)+","+(yp+this._y2)
:"");
this._native.setAttribute("d",path);
};
web2d.peer.svg.CurvedLinePeer.prototype._updateStyle = function()
{
var style = "";
for(var key in this._style){
style+=key+":"+this._style[key]+" ";
}
this._native.setAttribute("style",style);
};
web2d.peer.svg.CurvedLinePeer.prototype._calculateAutoControlPoints = function(avoidControlPointFix){
if(core.Utils.isDefined(this._x1) && core.Utils.isDefined(this._x2)){
//Both points available, calculate real points
var defaultpoints = core.Utils.calculateDefaultControlPoints(new core.Point(this._x1, this._y1),new core.Point(this._x2,this._y2));
if(!this._customControlPoint_1 && !(core.Utils.isDefined(avoidControlPointFix) && avoidControlPointFix==0)){
this._control1.x = defaultpoints[0].x;
this._control1.y = defaultpoints[0].y;
}
if(!this._customControlPoint_2 && !(core.Utils.isDefined(avoidControlPointFix) && avoidControlPointFix==1)){
this._control2.x = defaultpoints[1].x;
this._control2.y = defaultpoints[1].y;
}
}
};
web2d.peer.svg.CurvedLinePeer.prototype.setDashed = function(length,spacing){
if(core.Utils.isDefined(length) && core.Utils.isDefined(spacing)){
this._native.setAttribute("stroke-dasharray",length+","+spacing);
} else {
this._native.setAttribute("stroke-dasharray","");
}
};

View File

@@ -1,22 +1,22 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
*/
web2d.peer.svg.LinePeer = function()
{
var svgElement = window.document.createElementNS(this.svgNamespace, 'line');
@@ -28,16 +28,29 @@ objects.extend(web2d.peer.svg.LinePeer, web2d.peer.svg.ElementPeer);
web2d.peer.svg.LinePeer.prototype.setFrom = function(x1, y1)
{
this._x1=x1;
this._y1=y1;
this._native.setAttribute('x1', x1);
this._native.setAttribute('y1', y1);
};
web2d.peer.svg.LinePeer.prototype.setTo = function(x2, y2)
{
this._x2=x2;
this._y2=y2;
this._native.setAttribute('x2', x2);
this._native.setAttribute('y2', y2);
};
web2d.peer.svg.LinePeer.prototype.getFrom = function(){
return new core.Point(this._x1,this._y1);
};
web2d.peer.svg.LinePeer.prototype.getTo = function(){
return new core.Point(this._x2,this._y2);
};
/*
* http://www.zvon.org/HowTo/Output/howto_jj_svg_27.html?at=marker-end
*/

View File

@@ -1,22 +1,22 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
*/
web2d.peer.svg.PolyLinePeer = function()
{
var svgElement = window.document.createElementNS(this.svgNamespace, 'polyline');
@@ -82,7 +82,7 @@ web2d.peer.svg.PolyLinePeer.prototype._updateStraightPath = function()
{
if (core.Utils.isDefined(this._x1) && core.Utils.isDefined(this._x2) && core.Utils.isDefined(this._y1) && core.Utils.isDefined(this._y2))
{
this.buildStraightPath(this.breakDistance, this._x1, this._y1, this._x2, this._y2);
var path = web2d.PolyLine.buildStraightPath(this.breakDistance, this._x1, this._y1, this._x2, this._y2);
this._native.setAttribute('points', path);
}
};

View File

@@ -0,0 +1,116 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--[if gte IE 9]>
<meta http-equiv="X-UA-Compatible" content="IE=9" >
<![endif]-->
<script type="text/javascript">
web2d = {
peer: {}
};
web2d.peer =
{
svg: {},
vml: {}
};
web2d.peer.utils = {};
</script>
<script type="text/javascript" src="mootools.js"></script>
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/EventDispatcher.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/vml/ElementPeer.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/WorkspacePeer.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/vml/WorkspacePeer.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/Toolkit.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/Elipse.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElipsePeer.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/vml/ElipsePeer.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/Line.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/LinePeer.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/vml/LinePeer.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/PolyLine.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/CurvedLine.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/PolyLinePeer.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/vml/PolyLinePeer.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/CurvedLinePeer.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/Group.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/GroupPeer.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/vml/GroupPeer.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/Rect.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/RectPeer.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/vml/RectPeer.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/Text.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/TextPeer.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/vml/TextPeer.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/vml/TextBoxPeer.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/utils/TransformUtils.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/utils/EventUtils.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/Font.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/Font.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/vml/Font.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/TahomaFont.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/TimesFont.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ArialFont.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/VerdanaFont.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/vml/TahomaFont.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/vml/TimesFont.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/vml/ArialFont.js"></script>
<script type="text/javascript" src="../../../../src/main/javascript/peer/vml/VerdanaFont.js"></script>
<script type="text/javascript" src="utils.js"></script>
<script type="text/javascript">
function initialize(){
web2d.peer.Toolkit.init();
var overflowWorkspace = new web2d.Workspace({fillColor:'green'});
overflowWorkspace.setSize("200px", "200px");
line1 = new web2d.CurvedLine();
line1.setStyle(web2d.CurvedLine.SIMPLE_LINE);
line1.setFrom(200, 200);
line1.setTo(100, 100);
// line1.setControlPoints({x:150,y:100},{x:150,y:200});
overflowWorkspace.appendChild(line1);
overflowWorkspace.addItAsChildTo($("overflowExample"));
}
</script>
</head>
<body onload="initialize();">
<h1>PolyLines Render Tests </h1>
<table border="1">
<colgroup style="width:80%;">
<col style="width:30%"/>
<col style="width:60%"/>
</colgroup>
<tr>
<td>
Different types of PolyLines that can be used.
</td>
<td>
<div id="overflowExample"/>
</td>
</tr>
<tr>
<td>
This is how multiple childs will look in each style line
</td>
<td>
<div id="multipleLineExample"/>
</td>
</tr>
</table>
</body>
</html>