Merge commit 'origin/5.2'
Clément DAVID [Wed, 24 Mar 2010 15:55:23 +0000 (16:55 +0100)]
Conflicts:
scilab/modules/xcos/etc/Xcos-style.xml

1  2 
scilab/modules/xcos/etc/Xcos-style.xml
scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CodeGenerationAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/BlockReader.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/codec/BasicBlockCodec.java

  <mxStylesheet>
-       <!-- *** BLOCK DEFINITION *** -->
-       <add as="block" extend="defaultVertex">
-               <add as="shape" value="image" />
-               <add as="image" value="$SCILAB/modules/xcos/images/blocks/empty.svg" />
-               <add as="perimeter" value="rectanglePerimeter" />
-               <add as="strokeColor" value="black" />
-               <add as="fillColor" value="white" />
-               <add as="fontColor" value="black" />
-               <add as="noLabel" value="1" />
-       </add>
+ <!-- *** OVERLOADING DEFINITION *** -->
+   <add as="defaultVertex">
 -    <add as="shape" value="rectangle"/>
 -    <add as="perimeter" value="rectanglePerimeter"/>
 -    <add as="strokeColor" value="black"/>
 -    <add as="fillColor" value="white"/>
 -    <add as="fontColor" value="black"/>
++    <add as="shape" value="image" />
++    <add as="image" value="$SCILAB/modules/xcos/images/blocks/empty.svg" />
++    <add as="perimeter" value="rectanglePerimeter" />
++    <add as="strokeColor" value="black" />
++    <add as="fillColor" value="white" />
++    <add as="fontColor" value="black" />
+     <add as="noLabel" value="0"/>
+   </add>
+ <!-- *** GENERIC BLOCKS *** -->
+   
+   <add as="block" extend="defaultVertex">
+     <add as="noLabel" value="1"/>
+   </add>
+   <add as="blockWithLabel" extend="defaultVertex" />
  
-       <add as="blockWithLabel" extend="block">
-               <add as="noLabel" value="0" />
-       </add>
+ <!-- *** BLOCK DEFINITION *** -->
  
-       <!-- Affiche -->
-       <add as="Affiche" extend="blockWithLabel" />
+   <!-- Affiche -->
+   <add as="Affiche" extend="blockWithLabel"/>
+   
+   <add as="Split" extend="block">
+     <add as="shape" value="rectangle"/>
+     <add as="strokeColor" value="black"/>
+     <add as="fillColor" value="orange"/>
+   </add>
  
 -      
 -  <!-- Label -->
 -  <add as="Label" extend="blockWithLabel">
 -    <add as="strokeColor" value="white"/>
 -  </add>
 +      <add as="Split" extend="block">
 +              <add as="shape" value="rectangle" />
 +              <add as="strokeColor" value="black" />
 +              <add as="fillColor" value="orange" />
 +      </add>
  
 -  <!-- Const -->
 -  <add as="Const" extend="block"/>
  
 -  <!-- Gain -->
 -  <add as="Gain" extend="blockWithLabel">
 -    <add as="shape" value="triangle"/>
 -    <add as="perimeter" value="trianglePerimeter"/>
 -    <add as="direction" value="east"/>
 -  </add>
 +      <!-- Label -->
 +      <add as="Label" extend="defaultVertex">
 +              <add as="shape" value="rectangle" />
 +              <add as="perimeter" value="rectanglePerimeter" />
 +              <add as="fillColor" value="white" />
 +              <add as="fontColor" value="black" />
 +              <add as="noLabel" value="0" />
 +              <add as="strokeColor" value="white" />
 +      </add>
  
 -  <!-- Icon -->
 -  <add as="Icon" extend="block">
 -    <add as="shape" value="image"/>
 -  </add>
 +      <!-- Const -->
 +      <add as="Const" extend="block" />
  
 -  <!-- *** PORT DEFINITION *** -->
 -  <add as="Port" extend="defaultVertex">
 -    <add as="shape" value="triangle"/>
 -    <add as="perimeter" value="trianglePerimeter"/>
 -  </add>
 +      <!-- Gain -->
 +      <add as="Gain" extend="blockWithLabel">
 +              <add as="shape" value="triangle" />
 +              <add as="perimeter" value="trianglePerimeter" />
 +              <add as="direction" value="east" />
 +      </add>
  
 -  <!-- Command Port -->
 -  <add as="CommandPort" extend="Port">
 -    <add as="strokeColor" value="red"/>
 -    <add as="fillColor" value="red"/>
 -    <add as="rotation" value="90"/>
 -    <add as="type" value="Command"/>
 -  </add>
 +      <!-- Icon -->
 +      <add as="Icon" extend="block">
 +              <add as="shape" value="image" />
 +              <add as="image" value="$SCILAB/modules/xcos/images/blocks/background.svg" />
 +      </add>
  
 -  <!-- Control Port -->
 -  <add as="ControlPort" extend="Port">
 -    <add as="strokeColor" value="red"/>
 -    <add as="fillColor" value="red"/>
 -    <add as="rotation" value="90"/>
 -    <add as="type" value="Control"/>
 -  </add>
 +      <!-- *** PORT DEFINITION *** -->
 +      <add as="Port" extend="defaultVertex">
 +              <add as="shape" value="triangle" />
 +              <add as="perimeter" value="trianglePerimeter" />
 +      </add>
  
 -  <!-- Explicit Input -->
 -  <add as="ExplicitInputPort" extend="Port">
 -    <add as="strokeColor" value="black"/>
 -    <add as="fillColor" value="black"/>
 -    <add as="rotation" value="0"/>
 -  </add>
 +      <!-- Command Port -->
 +      <add as="CommandPort" extend="Port">
 +              <add as="strokeColor" value="red" />
 +              <add as="fillColor" value="red" />
 +              <add as="rotation" value="90" />
 +              <add as="type" value="Command" />
 +      </add>
  
 -  <!-- Explicit Output -->
 -  <add as="ExplicitOutputPort" extend="Port">
 -    <add as="strokeColor" value="black"/>
 -    <add as="fillColor" value="black"/>
 -    <add as="rotation" value="0"/>
 -  </add>
 +      <!-- Control Port -->
 +      <add as="ControlPort" extend="Port">
 +              <add as="strokeColor" value="red" />
 +              <add as="fillColor" value="red" />
 +              <add as="rotation" value="90" />
 +              <add as="type" value="Control" />
 +      </add>
  
 -  <!-- Implicit Input -->
 -  <add as="ImplicitInputPort" extend="Port">
 -    <add as="shape" value="rectangle"/>
 -    <add as="strokeColor" value="black"/>
 -    <add as="fillColor" value="black"/>
 -  </add>
 +      <!-- Explicit Input -->
 +      <add as="ExplicitInputPort" extend="Port">
 +              <add as="strokeColor" value="black" />
 +              <add as="fillColor" value="black" />
 +              <add as="rotation" value="0" />
 +      </add>
  
 -  <!-- Implicit Output -->
 -  <add as="ImplicitOutputPort" extend="Port">
 -    <add as="shape" value="rectangle"/>
 -    <add as="strokeColor" value="black"/>
 -    <add as="fillColor" value="white"/>
 -  </add>
 +      <!-- Explicit Output -->
 +      <add as="ExplicitOutputPort" extend="Port">
 +              <add as="strokeColor" value="black" />
 +              <add as="fillColor" value="black" />
 +              <add as="rotation" value="0" />
 +      </add>
  
 +      <!-- Implicit Input -->
 +      <add as="ImplicitInputPort" extend="Port">
 +              <add as="shape" value="rectangle" />
 +              <add as="strokeColor" value="black" />
 +              <add as="fillColor" value="black" />
 +      </add>
  
 -  <!-- *** LINK definition *** -->
 -  <add as="defaultEdge">
 -    <!--<add as="edgeStyle" value="entityRelationEdgeStyle"/>-->
 -    <add as="labelBackgroundColor" value="white"/>
 -    <!-- To have rounded links -->
 -    <!-- <add as="rounded" value="1"/> -->
 -    <!-- <add as="edgeStyle" value="elbowEdgeStyle"/> -->
 -    <add as="shape" value="connector"/>
 -    <add as="labelBackgroundColor" value="white"/>
 -    <add as="endArrow" value="classicnone"/>
 -    <add as="fontSize" value="10"/>
 -    <add as="align" value="center"/>
 -    <add as="verticalAlign" value="middle"/>
 -    <add as="strokeColor" value="black"/>
 -    <add as="perimeter" value="null"/>
 -  </add>
 -  <add as="CommandControlLink" extend="defaultEdge">
 -    <add as="strokeColor" value="red"/>
 -    <add as="elbow" value="vertical"/>
 -  </add>
 -  <add as="ExplicitLink" extend="defaultEdge">
 -   <add as="strokeColor" value="blue"/>
 -  </add>
 -  <add as="ImplicitLink" extend="defaultEdge">
 -   <add as="strokeColor" value="blue"/>
 -  </add>
 +      <!-- Implicit Output -->
 +      <add as="ImplicitOutputPort" extend="Port">
 +              <add as="shape" value="rectangle" />
 +              <add as="strokeColor" value="black" />
 +              <add as="fillColor" value="white" />
 +      </add>
  
 -  <!-- SOURCES -->
 -  <add as="CONST_m" extend="blockWithLabel"/>
 -  <add as="CONST_f" extend="blockWithLabel"/>
 -  <add as="CONST" extend="blockWithLabel"/>
 -  <add as="GENSQR_f" extend="blockWithLabel">
 -    <add as="displayedLabel" value="Square wave&lt;BR&gt;
 -                                  generator"/>
 -  </add>
 -  <add as="RAMP" extend="Icon">
 -    <add as="image" value="$SCILAB/modules/xcos/images/blocks/RAMP.gif"/>
 -  </add>
 -  <add as="RAND_m" extend="blockWithLabel">
 -    <add as="displayedLabel" value="Random&lt;BR&gt;
 -                                  generator"/>
 -  </add>
 -  <add as="RFILE_f" extend="blockWithLabel">
 -    <add as="displayedLabel" value="Read from&lt;BR&gt;
 -                                  input file"/>
 -  </add>
 -  <add as="CLKINV_f" extend="blockWithLabel">
 -    <add as="shape" value="hexagon"/>
 -    <add as="rounded" value="1"/>
 -    <add as="fillColor" value="white"/>
 -    <add as="strokeColor" value="red"/>
 -  </add>
 -  <add as="CURV_f" extend="blockWithLabel">
 -    <add as="displayedLabel" value="Curve"/>
 -  </add>
 -  <add as="INIMPL_f" extend="blockWithLabel">
 -    <add as="shape" value="hexagon"/>
 -    <add as="rounded" value="1"/>
 -    <add as="fillColor" value="white"/>
 -  </add>
 -  <add as="READAU_f" extend="blockWithLabel">
 -    <add as="displayedLabel" value="Read from .au&lt;BR&gt;
 -                                  sound file"/>
 -  </add>
 -  <add as="SAWTOOTH_f" extend="blockWithLabel">
 -    <add as="displayedLabel" value="Sawtooth&lt;BR&gt;
 -                                  generator"/>
 -  </add>
 -  <add as="STEP_FUNCTION" extend="Icon">
 -    <add as="image" value="$SCILAB/modules/xcos/images/blocks/STEP_FUNCTION.gif"/>
 -  </add>
 -  <add as="CLOCK_c" extend="Icon">
 -    <add as="image" value="$SCILAB/modules/xcos/images/blocks/CLOCK_c.gif"/>
 -  </add>
 -  <add as="GENSIN_f" extend="blockWithLabel">
 -    <add as="displayedLabel" value="Sinusoid&lt;BR&gt;
 -                                  generator"/>
 -  </add>
 -  <add as="IN_f" extend="blockWithLabel">
 -    <add as="shape" value="hexagon"/>
 -    <add as="rounded" value="1"/>
 -    <add as="fillColor" value="white"/>
 -  </add>
 -  <add as="READC_f" extend="blockWithLabel">
 -    <add as="displayedLabel" value="Read from&lt;BR&gt;
 -                                  C binary file"/>
 -  </add>
 -  <add as="TIME_f" extend="Icon">
 -    <add as="image" value="$SCILAB/modules/xcos/images/blocks/TIME_f.gif"/>
 -  </add>
 -  <add as="Modulo_Count" extend="blockWithLabel">
 -    <!-- FIXME : Show parameters over block  -->
 -    <add as="displayedLabel" value="Counter&lt;BR&gt;
 -                                  Modulo 3"/>
 -  </add>
 -  <add as="Sigbuilder" extend="blockWithLabel">
 -    <add as="displayedLabel" value="Signal Builder"/>
 -  </add>
 -  <add as="SampleCLK" extend="Icon">
 -    <add as="image" value="$SCILAB/modules/xcos/images/blocks/SampleCLK.gif"/>
 -  </add>
 -  <add as="TKSCALE" extend="blockWithLabel">
 -    <add as="displayedLabel" value="TK Scale"/>
 -  </add>
 -  <add as="FROMWSB" extend="blockWithLabel">
 -    <!-- FIXME : Show workspace under block  -->
 -    <add as="displayedLabel" value="From workspace"/>
 -  </add>
  
 -  <!-- CONTINUOUS -->
 -  <add as="DERIV" extend="blockWithLabel">
 -    <add as="displayedLabel" value="du / dt"/>
 -  </add>
 -  <add as="INTEGRAL_m" extend="Icon">
 -    <add as="image" value="$SCILAB/modules/xcos/images/blocks/INTEGRAL_m.gif"/>
 -    <!--<add as="displayedLabel" value="&lt;FONT SIZE=&quot;6&quot;&gt;
 -                                  &#8747;
 -                                  &lt;/FONT&gt;"/>-->
 -  </add>
 -  <add as="INTEGRAL" extend="INTEGRAL_m"/>
 -  <add as="CLSS" extend="blockWithLabel">
 -    <add as="displayedLabel" value="&lt;TABLE&gt;
 +      <!-- *** LINK definition *** -->
 +      <add as="defaultEdge">
 +              <!--<add as="edgeStyle" value="entityRelationEdgeStyle"/>-->
 +              <add as="labelBackgroundColor" value="white" />
 +              <!-- To have rounded links -->
 +              <!-- <add as="rounded" value="1"/> -->
 +              <!-- <add as="edgeStyle" value="elbowEdgeStyle"/> -->
 +              <add as="shape" value="connector" />
 +              <add as="labelBackgroundColor" value="white" />
 +              <add as="endArrow" value="classicnone" />
 +              <add as="fontSize" value="10" />
 +              <add as="align" value="center" />
 +              <add as="verticalAlign" value="middle" />
 +              <add as="strokeColor" value="black" />
 +              <add as="perimeter" value="null" />
 +      </add>
 +      <add as="CommandControlLink" extend="defaultEdge">
 +              <add as="strokeColor" value="red" />
 +              <add as="elbow" value="vertical" />
 +      </add>
 +      <add as="ExplicitLink" extend="defaultEdge">
 +              <add as="strokeColor" value="blue" />
 +      </add>
 +      <add as="ImplicitLink" extend="defaultEdge">
 +              <add as="strokeColor" value="blue" />
 +      </add>
 +
 +      <!-- SOURCES -->
 +      <add as="CONST_m" extend="blockWithLabel" />
 +      <add as="CONST_f" extend="blockWithLabel" />
 +      <add as="CONST" extend="blockWithLabel" />
 +      <add as="GENSQR_f" extend="blockWithLabel">
 +              <add as="displayedLabel" value="Square wave&lt;BR&gt;
 +                                  generator" />
 +      </add>
 +      <add as="RAMP" extend="Icon">
 +              <add as="image" value="$SCILAB/modules/xcos/images/blocks/RAMP.svg" />
 +      </add>
 +      <add as="RAND_m" extend="blockWithLabel">
 +              <add as="displayedLabel" value="Random&lt;BR&gt;
 +                                  generator" />
 +      </add>
 +      <add as="RFILE_f" extend="blockWithLabel">
 +              <add as="displayedLabel" value="Read from&lt;BR&gt;
 +                                  input file" />
 +      </add>
 +      <add as="CLKINV_f" extend="blockWithLabel">
 +              <add as="shape" value="hexagon" />
 +              <add as="rounded" value="1" />
 +              <add as="fillColor" value="white" />
 +              <add as="strokeColor" value="red" />
 +      </add>
 +      <add as="CURV_f" extend="blockWithLabel">
 +              <add as="displayedLabel" value="Curve" />
 +      </add>
 +      <add as="INIMPL_f" extend="blockWithLabel">
 +              <add as="shape" value="hexagon" />
 +              <add as="rounded" value="1" />
 +              <add as="fillColor" value="white" />
 +      </add>
 +      <add as="READAU_f" extend="blockWithLabel">
 +              <add as="displayedLabel" value="Read from .au&lt;BR&gt;
 +                                  sound file" />
 +      </add>
 +      <add as="SAWTOOTH_f" extend="blockWithLabel">
 +              <add as="displayedLabel" value="Sawtooth&lt;BR&gt;
 +                                  generator" />
 +      </add>
 +      <add as="STEP_FUNCTION" extend="Icon">
 +              <add as="image" value="$SCILAB/modules/xcos/images/blocks/STEP_FUNCTION.svg" />
 +      </add>
 +      <add as="CLOCK_c" extend="Icon">
 +              <add as="image" value="$SCILAB/modules/xcos/images/blocks/CLOCK_c.svg" />
 +      </add>
 +      <add as="GENSIN_f" extend="blockWithLabel">
 +              <add as="displayedLabel" value="Sinusoid&lt;BR&gt;
 +                                  generator" />
 +      </add>
 +      <add as="IN_f" extend="blockWithLabel">
 +              <add as="shape" value="hexagon" />
 +              <add as="rounded" value="1" />
 +              <add as="fillColor" value="white" />
 +      </add>
 +      <add as="READC_f" extend="blockWithLabel">
 +              <add as="displayedLabel" value="Read from&lt;BR&gt;
 +                                  C binary file" />
 +      </add>
 +      <add as="TIME_f" extend="Icon">
 +              <add as="image" value="$SCILAB/modules/xcos/images/blocks/CLOCK_f.svg" />
 +      </add>
 +      <add as="Modulo_Count" extend="blockWithLabel">
 +              <!-- FIXME : Show parameters over block  -->
 +              <add as="displayedLabel" value="Counter&lt;BR&gt;
 +                                  Modulo 3" />
 +      </add>
 +      <add as="Sigbuilder" extend="blockWithLabel">
 +              <add as="displayedLabel" value="Signal Builder" />
 +      </add>
 +      <add as="SampleCLK" extend="Icon">
 +              <add as="image" value="$SCILAB/modules/xcos/images/blocks/SampleCLK.svg" />
 +      </add>
 +      <add as="TKSCALE" extend="blockWithLabel">
 +              <add as="displayedLabel" value="TK Scale" />
 +      </add>
 +      <add as="FROMWSB" extend="blockWithLabel">
 +              <!-- FIXME : Show workspace under block  -->
 +              <add as="displayedLabel" value="From workspace" />
 +      </add>
 +
 +      <!-- CONTINUOUS -->
 +      <add as="DERIV" extend="blockWithLabel">
 +              <add as="displayedLabel" value="du / dt" />
 +      </add>
 +      <add as="INTEGRAL_m" extend="Icon">
 +              <add as="image" value="$SCILAB/modules/xcos/images/blocks/INTEGRAL.svg" />
 +              <!--
 +                      <add as="displayedLabel" value="&lt;FONT SIZE=&quot;6&quot;&gt;
 +                      &#8747; &lt;/FONT&gt;"/>
 +              -->
 +      </add>
 +      <add as="INTEGRAL" extend="INTEGRAL_m" />
 +      <add as="CLSS" extend="blockWithLabel">
 +              <add as="displayedLabel"
 +                      value="&lt;TABLE&gt;
                                    &lt;TR&gt;
                                    &lt;TD ALIGN=&quot;RIGHT&quot;&gt;xd&lt;/TD&gt;
                                    &lt;TD&gt;=&lt;/TD&gt;