classDiagramFullScreen.php

Go to the documentation of this file.
00001 <!--
00002 To change this template, choose Tools | Templates
00003 and open the template in the editor.
00004 -->
00005 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
00006 <html>
00007   <head>
00008     <title>Testing the Box</title>
00009     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
00010     <?php require_once ( "./box/classDiagram.php" ) ?>
00011       <style>
00012           *
00013           {
00014               padding: 0;
00015               margin: 0;
00016               border: none;
00017           }
00018           canvas
00019           {
00020               border-style: solid;
00021               border-color: black;
00022               border-width: 1px;
00023           }
00024           #abc
00025           {
00026             margin-left:0px;
00027             margin-top:0px;
00028           }
00029       </style>
00030   </head>
00031   <body>
00032     <div id="tool">
00033         <div id="codeMode">
00034             
00035         </div>
00036         <div id="graphMode">
00037             <canvas id="abc" >
00038             </canvas>
00039             <script type="text/javascript" charset="utf-8">
00040                 window.box = new CanvasBox( "abc" , document.body.clientWidth - 10, document.body.clientHeight - 10  );
00041                 //window.box = objBox;
00042                 function addClass( color )
00043                 {
00044                     var objClass = new CanvasBoxClass();
00045                     objClass.objBehavior = new CanvasBoxMagneticBehavior( objClass );
00046                     //objClass.objBehavior = new CanvasBoxDefaultBehavior( objClass );
00047                     objClass.x = Math.random() *  window.box.width ;
00048                     objClass.y = Math.random() * window.box.height ;
00049                     if( color )
00050                     {
00051                         objClass.color = color;
00052                     }
00053                     window.box.addElement( objClass );
00054                     return objClass;
00055                 }
00056                 function addLine( objFrom , objTo , color )
00057                 {
00058                     var objLine = new CanvasBoxLine( objFrom , objTo );
00059                     objLine.objBehavior = new CanvasBoxMagneticConnectorBehavior( objLine );
00060                     //objLine.objBehavior = new CanvasBoxDefaultConnectorBehavior( objLine );
00061                     objLine.x =  ( objFrom.x + objTo.x  ) / 2
00062                     objLine.y =  ( objFrom.y + objTo.y  ) / 2
00063                     if( color )
00064                     {
00065                         objLine.color = color;
00066                     }
00067                     window.box.addElement( objLine );
00068                     return objLine;
00069                 }
00070                 function cloneLine( objLineOriginal )
00071                 {
00072                     return objLineOriginal.cloneLine();
00073                 }
00074                 addClass();
00075                 //var objRed = addClass(  );
00076                 //var objGreen = addClass(  );
00077                 //var objYellow = addClass(  );
00078                 //var objBlue = addClass( );
00079                 //var objBlue1 = addClass( );
00080                 //var objBlue2 = addClass( );
00081 
00082                 //var objLine = addLine( objRed , objGreen );
00083                 //var objLine = addLine( objYellow , objBlue );
00084                 //var objLine = addLine( objYellow , objGreen );
00085                 //var objLine = addLine( objBlue , objRed  );
00086 
00087                 //window.objLine = objLine;
00088             </script>
00089         </div>
00090     </div>
00091   </body>
00092 </html>

Generated on Sat Apr 7 14:19:11 2012 for CodeToDiagram by  doxygen 1.5.9