Adjust method names from gaService
diff --git a/examples/org.eclipse.graphiti.doc/resources/docu/gfw/add-feature.htm b/examples/org.eclipse.graphiti.doc/resources/docu/gfw/add-feature.htm
index f998538..699b053 100644
--- a/examples/org.eclipse.graphiti.doc/resources/docu/gfw/add-feature.htm
+++ b/examples/org.eclipse.graphiti.doc/resources/docu/gfw/add-feature.htm
@@ -12,6 +12,9 @@
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
+ {font-family:Cambria;
+ panose-1:2 4 5 3 5 4 6 3 2 4;}
+@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
@@ -163,7 +166,7 @@
span.HTMLVorformatiertZchn
{mso-style-name:"HTML Vorformatiert Zchn";
mso-style-link:"HTML Vorformatiert";
- font-family:"Consolas","serif";}
+ font-family:Consolas;}
span.FunotentextZchn
{mso-style-name:"Fußnotentext Zchn";
mso-style-link:Fußnotentext;
@@ -194,6 +197,14 @@
font-size:13.0pt;
font-family:"Times New Roman","serif";
font-style:italic;}
+p.msochpdefault, li.msochpdefault, div.msochpdefault
+ {mso-style-name:msochpdefault;
+ margin-top:5.65pt;
+ margin-right:0cm;
+ margin-bottom:5.65pt;
+ margin-left:0cm;
+ font-size:10.0pt;
+ font-family:"Times New Roman","serif";}
span.code1
{mso-style-name:code1;
font-style:italic;}
@@ -221,11 +232,11 @@
<p class=MsoNormal><span lang=EN-GB style='color:black'> </span></p>
-<p class=MsoNormal><span lang=EN-GB style='color:black'>In the terms of
-Graphiti add means to add a graphical representation of an existing
-domain model object (= business object) to the diagram. What kinds of business
-objects can be added to a diagram of a specific type is decided by the add
-features delivered by the feature provider.</span></p>
+<p class=MsoNormal><span lang=EN-GB style='color:black'>In the terms of
+Graphiti add means to add a graphical representation of an existing domain
+model object (= business object) to the diagram. What kinds of business objects
+can be added to a diagram of a specific type is decided by the add features
+delivered by the feature provider.</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>For our example the
graphical representation of a EClass is illustrated in the Figure. We want to
@@ -241,11 +252,11 @@
name="_Ref136407489"></a><span lang=EN-US>Figure: Graphical representation of a
EClass</span></p>
-<p class=MsoNormal><span lang=EN-GB style='color:black'>Graphiti
-supports a kind of linkage between elements of the domain model and elements of
-the model defining the graphical representation the so called <em>Pictograms
-Model</em>. These links are called <i>pictogram links</i>. Each diagram
-contains one container for all pictogram links called <i>diagram link</i>.</span></p>
+<p class=MsoNormal><span lang=EN-GB style='color:black'>Graphiti supports a
+kind of linkage between elements of the domain model and elements of the model
+defining the graphical representation the so called <em>Pictograms Model</em>.
+These links are called <i>pictogram links</i>. Each diagram contains one
+container for all pictogram links called <i>diagram link</i>.</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>You can see the linkage
structure of the example in the Figure: Column one shows the entity model of
@@ -256,8 +267,7 @@
rendering on a screen. Examples for this information are background color,
foreground color, size, position, visibility and line width. In our example we
have a rounded rectangle providing an additional corner radius, a polyline
-having defined end- and bendpoints and a text label containing a text
-value.</span></p>
+having defined end- and bendpoints and a text label containing a text value.</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'> </span></p>
@@ -288,13 +298,13 @@
<p class=MsoNormal><span lang=EN-GB style='color:black'>An add feature has to
implement the interface </span><span class=code1><span lang=EN-US
style='color:black'><a
-href="../../../javadoc/com/sap/tc/emf/gfw/features/IAddFeature.html"><span
+href="file:///\\wdfd00184898a\..\javadoc\com\sap\tc\emf\gfw\features\IAddFeature.html"><span
style='font-style:normal'>IAddFeature</span></a>.</span></span><span
lang=EN-GB style='color:black'> Instead of implementing it directly it should
extend one of the available base classes. In this example we extend the base
class<span class=code1> </span></span><span class=code1><span lang=EN-US
style='color:black'><a
-href="../../../javadoc/com/sap/tc/emf/gfw/features/jam/AbstractAddShapeFeature.html"><span
+href="file:///\\wdfd00184898a\..\javadoc\com\sap\tc\emf\gfw\features\jam\AbstractAddShapeFeature.html"><span
style='font-style:normal'>AbstractAddShapeFeature</span></a></span></span><span
lang=EN-GB style='color:black'>.</span></p>
@@ -305,22 +315,20 @@
<p class=MsoNormal><span lang=EN-GB style='color:black'>The method </span><span
class=code1><span lang=EN-US style='color:black'><a
-href="../../../javadoc/com/sap/tc/emf/gfw/func/IAdd.html#canAdd(com.sap.tc.emf.gfw.features.context.IAddContext)"><span
+href="file:///\\wdfd00184898a\..\javadoc\com\sap\tc\emf\gfw\func\IAdd.html#canAdd(com.sap.tc.emf.gfw.features.context.IAddContext)"><span
style='font-style:normal'>canAdd</span></a></span></span><span lang=EN-US
style='color:black'> </span><span lang=EN-GB style='color:black'>has to check
the given context and therefore it decides if a business object can be added.</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>The method </span><span
class=code1><span lang=EN-US style='color:black'><a
-href="../../../javadoc/com/sap/tc/emf/gfw/func/IAdd.html#add(com.sap.tc.emf.gfw.features.context.IAddContext)"><span
-style='font-style:normal'>add</span></a></span></span><span lang=EN-GB
-style='color:black'> finally has to create the pictogram structure described
-above and has to establish the linkage to the business object. Additionally we
-have to create graphics algorithms and place them at the appropriate</span><span lang=EN-GB
-style='color:black'> location</span><span lang=EN-GB
-style='color:black'> (get
-location from given context). Additionally, the name of the EClass has
-to be set as the text labels value. </span></p>
+href="file:///\\wdfd00184898a\..\javadoc\com\sap\tc\emf\gfw\func\IAdd.html#add(com.sap.tc.emf.gfw.features.context.IAddContext)"><span
+style='font-style:normal'>add</span></a></span></span><span lang=EN-US
+style='color:black'> </span><span lang=EN-GB style='color:black'>finally has to
+create the pictogram structure described above and has to establish the linkage
+to the business object. Additionally we have to create graphics algorithms and
+place them at the appropriate location (get location from given context).
+Additionally, the name of the EClass has to be set as the text labels value. </span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'> </span></p>
@@ -349,8 +357,8 @@
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>
TutorialAddEClassFeature </span><b><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:#7F0055'>extends</span></b><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New";color:black'>
- AbstractAddShapeFeature {</span></p>
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> AbstractAddShapeFeature
+ {</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
@@ -380,10 +388,10 @@
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>static</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>final</span></b><span
- lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> IColorConstant
- </span><i><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
- color:#0000C0'>CLASS_FOREGROUND</span></i><span lang=EN-US style='font-size:
- 10.0pt;font-family:"Courier New";color:black'> =</span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ IColorConstant </span><i><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New";color:#0000C0'>CLASS_FOREGROUND</span></i><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> =</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
</span><b><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
@@ -504,11 +512,11 @@
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
IPeCreateService peCreateService = Graphiti.getPeCreateService();<br>
- ContainerShape containerShape =</span></p>
+ ContainerShape containerShape =</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New";color:black'>
- peCreateService.<i>createContainerShape</i>(targetDiagram, </span><b><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>true</span></b><span
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ peCreateService.<i>createContainerShape</i>(targetDiagram, </span><b><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>true</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
@@ -527,9 +535,10 @@
color:#7F0055'>int</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'> height = 50; </span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New"'>
- IGaService gaService = Graphiti.getGaService();</span></p>
- <p class=MsoNormal style='text-autospace:none'> </p>
+ style='font-size:10.0pt;font-family:"Courier New"'>
+ IGaService gaService = Graphiti.getGaService();</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
{</span></p>
@@ -542,9 +551,8 @@
RoundedRectangle roundedRectangle =</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New"'>gaService</span><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New";color:black'>.<i>createRoundedRectangle</i>(containerShape, 5, 5);</span></p>
+ </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>gaService<span
+ style='color:black'>.<i>createRoundedRectangle</i>(containerShape, 5, 5);</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
roundedRectangle.setForeground(manageColor(</span><i><span lang=EN-US
@@ -560,9 +568,8 @@
roundedRectangle.setLineWidth(2);</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New"'>gaService</span><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New";color:black'>.<i>setLocationAndSizeOfGraphicsAlgorithm</i>(roundedRectangle,</span></p>
+ </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>gaService<span
+ style='color:black'>.<i>setLocationAndSize</i>(roundedRectangle,</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
context.getX(), context.getY(), width, height);</span></p>
@@ -609,9 +616,7 @@
color:#3F7F5F'>// create shape for line</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
- Shape shape = </span><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New";color:black'>peCreateService</span><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New";color:black'>.<i>createShape</i>(containerShape, </span><b><span
+ Shape shape = peCreateService.<i>createShape</i>(containerShape, </span><b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>false</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
@@ -625,15 +630,12 @@
Polyline polyline =</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New"'>gaService</span><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New";color:black'>.<i>createPolyline</i>(shape,
- </span><b><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
- color:#7F0055'>new</span></b><span lang=EN-US style='font-size:10.0pt;
- font-family:"Courier New";color:black'> </span><b><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>int</span></b><span
- lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>[]
- { 0, 20, width, 20 });</span></p>
+ </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>gaService<span
+ style='color:black'>.<i>createPolyline</i>(shape, </span><b><span
+ style='color:#7F0055'>new</span></b><span style='color:black'> </span><b><span
+ style='color:#7F0055'>int</span></b><span style='color:black'>[] { 0, 20,
+ width, 20 });</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
polyline.setForeground(manageColor(</span><i><span lang=EN-US
@@ -660,9 +662,7 @@
color:#3F7F5F'>// create shape for text</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
- Shape shape = </span><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New";color:black'>peCreateService</span><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New";color:black'>.<i>createShape</i>(containerShape, </span><b><span
+ Shape shape = peCreateService.<i>createShape</i>(containerShape, </span><b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>false</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
@@ -673,9 +673,8 @@
color:#3F7F5F'>// create and set text graphics algorithm</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
- Text text = </span><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New"'>gaService</span><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New";color:black'>.<i>createDefaultText</i>(shape, addedClass.getName());</span></p>
+ Text text = </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>gaService<span
+ style='color:black'>.<i>createDefaultText</i>(shape, addedClass.getName());</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
text.setForeground(manageColor(</span><i><span lang=EN-US style='font-size:
@@ -698,9 +697,8 @@
style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New"'>gaService</span><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New";color:black'>.<i>setLocationAndSizeOfGraphicsAlgorithm</i>(text, 0, 0, width, 20);</span></p>
+ </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>gaService<span
+ style='color:black'>.<i>setLocationAndSize</i>(text, 0, 0, width, 20);</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
@@ -734,11 +732,10 @@
<p class=MsoNormal><span lang=EN-GB style='color:black'> </span></p>
-<p class=MsoNormal><span lang="en-gb">T</span><span lang=EN-GB style='color:black'>he
-feature provider has to deliver our newly created feature (overwrite the method
-<a
-href="../../../javadoc/com/sap/tc/emf/gfw/features/IFeatureProvider.html#getAddFeature(com.sap.tc.emf.gfw.features.context.IAddContext)">getAddFeature</a>).
-</span></p>
+<p class=MsoNormal><span lang=EN-GB>T<span style='color:black'>he feature
+provider has to deliver our newly created feature (overwrite the method <a
+href="file:///\\wdfd00184898a\..\javadoc\com\sap\tc\emf\gfw\features\IFeatureProvider.html#getAddFeature(com.sap.tc.emf.gfw.features.context.IAddContext)">getAddFeature</a>).
+</span></span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>This implementation can
be seen here: </span></p>
@@ -780,10 +777,9 @@
color:#7F0055'>return</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'> </span><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>new</span></b><span
- lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>
- TutorialAddEClassFeature(</span><b><span lang=EN-US style='font-size:10.0pt;
- font-family:"Courier New";color:#7F0055'>this</span></b><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> TutorialAddEClassFeature(</span><b><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>this</span></b><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
}</span></p>
@@ -820,12 +816,12 @@
<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>Now we can start the
-editor again. It should be possible to drop an EClass from the tree of the
+editor again. It should be possible to drop an EClass from the tree of the
Graphiti "Test" project into the diagram Test-1. </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
-<p class=MsoNormal><img border=0
+<p class=MsoNormal><img border=0 width=788 height=302
src="visio/predefined-eclass.png"></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
@@ -834,14 +830,21 @@
lang=EN-US>Figure: Add PredefinedEClass to the editor</span></a></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'>Without any further
-implementations it should be possible to move the EClass shapes around, resize
-them, remove them (context menu) and even delete them.</span></p>
+implementations it should be possible to move the EClass shapes around, resize them,
+remove them (context menu) and even delete them.</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'> </span></p>
+<div class=MsoNormal align=center style='text-align:center'>
+
+<hr size=3 width="100%" align=center>
+
</div>
-<hr>
- <a href="http://www.eclipse.org/legal/epl-v10.html" shape="rect">Copyright (c) SAP AG 2005, 2010.</a>
+
+<p class=MsoNormal><a href="http://www.eclipse.org/legal/epl-v10.html"
+shape=rect>Copyright (c) SAP AG 2005, 2010.</a> </p>
+
+</div>
</body>
diff --git a/examples/org.eclipse.graphiti.doc/resources/docu/gfw/direct-editing-activation.htm b/examples/org.eclipse.graphiti.doc/resources/docu/gfw/direct-editing-activation.htm
index d3ff5a5..931f717 100644
--- a/examples/org.eclipse.graphiti.doc/resources/docu/gfw/direct-editing-activation.htm
+++ b/examples/org.eclipse.graphiti.doc/resources/docu/gfw/direct-editing-activation.htm
@@ -12,6 +12,9 @@
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
+ {font-family:Cambria;
+ panose-1:2 4 5 3 5 4 6 3 2 4;}
+@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
@@ -24,16 +27,18 @@
font-size:12.0pt;
font-family:"Times New Roman","serif";}
h1
- {margin-top:12.0pt;
+ {mso-style-link:"Überschrift 1 Zchn";
+ margin-top:12.0pt;
margin-right:0cm;
margin-bottom:3.0pt;
margin-left:0cm;
page-break-after:avoid;
font-size:16.0pt;
font-family:"Times New Roman","serif";
- font-weight:bold}
+ font-weight:bold;}
h2
- {margin-top:12.0pt;
+ {mso-style-link:"Überschrift 2 Zchn";
+ margin-top:12.0pt;
margin-right:0cm;
margin-bottom:3.0pt;
margin-left:0cm;
@@ -41,31 +46,34 @@
font-size:14.0pt;
font-family:"Times New Roman","serif";
font-weight:bold;
- font-style:italic}
+ font-style:italic;}
h3
- {margin-top:12.0pt;
+ {mso-style-link:"Überschrift 3 Zchn";
+ margin-top:12.0pt;
margin-right:0cm;
margin-bottom:3.0pt;
margin-left:0cm;
page-break-after:avoid;
font-size:13.0pt;
font-family:"Times New Roman","serif";
- font-weight:bold}
+ font-weight:bold;}
h4
- {margin-top:11.25pt;
+ {mso-style-link:"Überschrift 4 Zchn";
+ margin-top:11.25pt;
margin-right:0cm;
margin-bottom:1.7pt;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";
font-weight:bold;
- font-style:italic}
+ font-style:italic;}
h5
- {margin-right:0cm;
+ {mso-style-link:"Überschrift 5 Zchn";
+ margin-right:0cm;
margin-left:0cm;
font-size:10.0pt;
font-family:"Times New Roman","serif";
- font-weight:bold}
+ font-weight:bold;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
@@ -80,68 +88,128 @@
font-size:12.0pt;
font-family:"Times New Roman","serif";}
pre
- {margin-top:0cm;
+ {mso-style-link:"HTML Vorformatiert Zchn";
+ margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:3.4pt;
margin-bottom:.0001pt;
font-size:11.0pt;
- font-family:"Courier New"}
+ font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
- {margin-bottom:.0001pt;
+ {mso-style-link:"Sprechblasentext Zchn";
+ margin:0cm;
+ margin-bottom:.0001pt;
font-size:8.0pt;
- font-family:"Tahoma","sans-serif"; margin-left:0cm; margin-right:0cm; margin-top:0cm}
-span.Heading1Char
- {font-family:"Cambria","serif";
+ font-family:"Tahoma","sans-serif";}
+span.berschrift1Zchn
+ {mso-style-name:"Überschrift 1 Zchn";
+ mso-style-link:"Überschrift 1";
+ font-family:"Cambria","serif";
color:#365F91;
- font-weight:bold}
-span.Heading2Char
- {font-family:"Cambria","serif";
+ font-weight:bold;}
+span.berschrift2Zchn
+ {mso-style-name:"Überschrift 2 Zchn";
+ mso-style-link:"Überschrift 2";
+ font-family:"Cambria","serif";
color:#4F81BD;
- font-weight:bold}
-span.Heading3Char
- {font-family:"Cambria","serif";
+ font-weight:bold;}
+span.berschrift3Zchn
+ {mso-style-name:"Überschrift 3 Zchn";
+ mso-style-link:"Überschrift 3";
+ font-family:"Cambria","serif";
color:#4F81BD;
- font-weight:bold}
-span.Heading4Char
- {font-family:"Cambria","serif";
+ font-weight:bold;}
+span.berschrift4Zchn
+ {mso-style-name:"Überschrift 4 Zchn";
+ mso-style-link:"Überschrift 4";
+ font-family:"Cambria","serif";
color:#4F81BD;
font-weight:bold;
- font-style:italic}
-span.Heading5Char
- {font-family:"Cambria","serif";
- color:#243F60}
-span.HTMLPreformattedChar
- {font-family:Consolas}
-span.BalloonTextChar
- {font-family:"Tahoma","sans-serif"}
+ font-style:italic;}
+span.berschrift5Zchn
+ {mso-style-name:"Überschrift 5 Zchn";
+ mso-style-link:"Überschrift 5";
+ font-family:"Cambria","serif";
+ color:#243F60;}
+span.HTMLVorformatiertZchn
+ {mso-style-name:"HTML Vorformatiert Zchn";
+ mso-style-link:"HTML Vorformatiert";
+ font-family:Consolas;}
+span.SprechblasentextZchn
+ {mso-style-name:"Sprechblasentext Zchn";
+ mso-style-link:Sprechblasentext;
+ font-family:"Tahoma","sans-serif";}
p.code, li.code, div.code
- {margin-top:0cm;
+ {mso-style-name:code;
+ margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:15.0pt;
margin-bottom:.0001pt;
font-size:12.0pt;
- font-family:"Times New Roman","serif"}
+ font-family:"Times New Roman","serif";}
p.note, li.note, div.note
- {margin-top:19.5pt;
+ {mso-style-name:note;
+ margin-top:19.5pt;
margin-right:0cm;
margin-bottom:19.5pt;
margin-left:30.0pt;
font-size:13.0pt;
font-family:"Times New Roman","serif";
- font-style:italic}
+ font-style:italic;}
+p.msochpdefault, li.msochpdefault, div.msochpdefault
+ {mso-style-name:msochpdefault;
+ margin-top:5.65pt;
+ margin-right:0cm;
+ margin-bottom:5.65pt;
+ margin-left:0cm;
+ font-size:10.0pt;
+ font-family:"Times New Roman","serif";}
+span.heading1char
+ {mso-style-name:heading1char;
+ font-family:"Cambria","serif";
+ color:#365F91;
+ font-weight:bold;}
+span.heading2char
+ {mso-style-name:heading2char;
+ font-family:"Cambria","serif";
+ color:#4F81BD;
+ font-weight:bold;}
+span.heading3char
+ {mso-style-name:heading3char;
+ font-family:"Cambria","serif";
+ color:#4F81BD;
+ font-weight:bold;}
+span.heading4char
+ {mso-style-name:heading4char;
+ font-family:"Cambria","serif";
+ color:#4F81BD;
+ font-weight:bold;
+ font-style:italic;}
+span.heading5char
+ {mso-style-name:heading5char;
+ font-family:"Cambria","serif";
+ color:#243F60;}
+span.htmlpreformattedchar
+ {mso-style-name:htmlpreformattedchar;
+ font-family:Consolas;}
+span.balloontextchar
+ {mso-style-name:balloontextchar;
+ font-family:"Tahoma","sans-serif";}
span.code1
- {font-style:italic}
+ {mso-style-name:code1;
+ font-style:italic;}
span.code0
- {font-style:italic}
+ {mso-style-name:code0;
+ font-style:italic;}
.MsoChpDefault
{font-size:10.0pt;}
@page Section1
- {size:595.45pt 841.7pt;
- margin:72.0pt 89.85pt 72.0pt 89.85pt;}
+ {size:595.3pt 841.9pt;
+ margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
- {}
+ {page:Section1;}
-->
</style>
@@ -149,248 +217,333 @@
<body bgcolor=white lang=DE link=blue vlink=purple style='margin-bottom:12.0pt'>
+<div class=Section1>
+<h1><span lang=EN-GB>Direct Editing Activation after Object Creation</span></h1>
-<h1><span lang="EN-GB">Direct Editing Activation after Object Creation</span></h1>
+<p class=MsoNormal><span lang=EN-GB style='color:black'> </span></p>
-<p class="MsoNormal"><span lang="EN-GB" style="color:black"> </span></p>
-
-<p class="MsoNormal"><span lang="EN-US" style="color:black">Often it is useful to
+<p class=MsoNormal><span lang=EN-US style='color:black'>Often it is useful to
activate a <a href="direct-editing-feature.htm">direct editing feature</a>
-directly after object creation. For example after creating a class the
-text-editor is opened and the user can immediately change the class name. </span></p>
+directly after object creation. For example after creating a class the text-editor
+is opened and the user can immediately change the class name. </span></p>
-<p class="MsoNormal"><span lang="EN-US" style="color:black">It is very simple to
+<p class=MsoNormal><span lang=EN-US style='color:black'>It is very simple to
invoke the direct editing feature automatically, but it depends on the
implementation of the shape how to do this. </span></p>
-<p class="MsoNormal"><span lang="EN-US" style="color:black"> </span></p>
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
-<h2><span lang="EN-US">Direct Editing Activation, if Shape is Implemented by Features</span></h2>
+<h2><span lang=EN-US>Direct Editing Activation, if Shape is Implemented by
+Features</span></h2>
-<p class="MsoNormal"><span lang="EN-US" style="color:black"> </span></p>
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
-<p class="MsoNormal"><span lang="EN-US" style="color:black">Prerequisite: the shape
-of the EClass is implemented by features, and we already implemented a <a href="direct-editing-feature.htm">direct editing feature</a>, which can edit
+<p class=MsoNormal><span lang=EN-US style='color:black'>Prerequisite: the shape
+of the EClass is implemented by features, and we already implemented a <a
+href="direct-editing-feature.htm">direct editing feature</a>, which can edit
the name of the EClass.</span></p>
-<p class="MsoNormal"><span lang="EN-US" style="color:black">As an example we want
+<p class=MsoNormal><span lang=EN-US style='color:black'>As an example we want
to activate this direct editing of the name after creating a EClass.</span></p>
-<p class="MsoNormal"><span lang="EN-US" style="color:black"> </span></p>
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
-<p class="MsoNormal"><span lang="EN-GB" style="color:black">At creation time of a
+<p class=MsoNormal><span lang=EN-GB style='color:black'>At creation time of a
new shape different features are called: <a href="create-feature.htm">create
-feature</a>, <a href="add-feature.htm">add feature</a> and <a href="update-feature.htm">update feature</a>. </span></p>
+feature</a>, <a href="add-feature.htm">add feature</a> and <a
+href="update-feature.htm">update feature</a>. </span></p>
-<p class="MsoNormal"><span lang="EN-GB" style="color:black">For the automatic
+<p class=MsoNormal><span lang=EN-GB style='color:black'>For the automatic
switch into the direct editing mode we need to collect some information in
-those features and store it in the interface </span><span class="code0"><span lang="EN-US" style="color:black"><a href="../../../javadoc/com/sap/tc/emf/gfw/features/IDirectEditingInfo.html"><span style="font-style:normal">IDirectEditingInfo</span></a>. </span></span><span lang="EN-GB" style="color:black">All features have access to this direct editing
-info calling </span><span class="code0"><span lang="EN-US" style="color:black"><a href="../../../javadoc/com/sap/tc/emf/gfw/features/IFeatureProvider.html#getDirectEditingInfo()"><span style="font-style:normal">getFeatureProvider().getDirectEditingInfo()</span></a>
+those features and store it in the interface </span><span class=code0><span
+lang=EN-US style='color:black'><a
+href="../../../javadoc/com/sap/tc/emf/gfw/features/IDirectEditingInfo.html"><span
+style='font-style:normal'>IDirectEditingInfo</span></a>. </span></span><span
+lang=EN-GB style='color:black'>All features have access to this direct editing
+info calling </span><span class=code0><span lang=EN-US style='color:black'><a
+href="../../../javadoc/com/sap/tc/emf/gfw/features/IFeatureProvider.html#getDirectEditingInfo()"><span
+style='font-style:normal'>getFeatureProvider().getDirectEditingInfo()</span></a>
</span></span></p>
-<p class="MsoNormal"><span lang="EN-GB" style="color:black"> </span></p>
+<p class=MsoNormal><span lang=EN-GB style='color:black'> </span></p>
-<p class="MsoNormal"><span lang="EN-GB" style="color:black">In the <a href="create-feature.htm">create feature</a> the automatic direct editing for
+<p class=MsoNormal><span lang=EN-GB style='color:black'>In the <a
+href="create-feature.htm">create feature</a> the automatic direct editing for
this creation process has to be activated.</span></p>
-<p class="MsoNormal"><span lang="EN-GB" style="color:black">This has to be done at
-the end of the <a href="../../../javadoc/com/sap/tc/emf/gfw/func/ICreate.html#create(com.sap.tc.emf.gfw.features.context.ICreateContext)">create</a>
+<p class=MsoNormal><span lang=EN-GB style='color:black'>This has to be done at
+the end of the <a
+href="../../../javadoc/com/sap/tc/emf/gfw/func/ICreate.html#create(com.sap.tc.emf.gfw.features.context.ICreateContext)">create</a>
method.</span></p>
-<p class="MsoNormal"><span lang="EN-GB" style="color:black">Note, that previously
+<p class=MsoNormal><span lang=EN-GB style='color:black'>Note, that previously
in this tutorial we implemented the create method in a way, that at the
beginning the user is asked for the class name in a popup-dialog. This becomes
obsolete now and has to be deleted.</span></p>
-<p class="MsoNormal"><span lang="EN-GB" style="color:black">You can see the new
+<p class=MsoNormal><span lang=EN-GB style='color:black'>You can see the new
create method here: </span></p>
-<p class="MsoNormal"><span lang="EN-GB" style="color:black"> </span></p>
+<p class=MsoNormal><span lang=EN-GB style='color:black'> </span></p>
-<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="851" style="width:18.0cm;border-collapse:collapse">
+<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=851
+ style='width:18.0cm;border-collapse:collapse'>
<tr>
- <td width="851" valign="top" style="width:18.0cm;border:solid windowtext 1.0pt;
- padding:0cm 5.4pt 0cm 5.4pt">
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="color:black"> </span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><b><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";
- color:#7F0055'>public</span></b><span lang="EN-US" style='font-size:10.0pt;
+ <td width=851 valign=top style='width:18.0cm;border:solid windowtext 1.0pt;
+ padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-GB
+ style='color:black'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ </span><b><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
+ color:#7F0055'>public</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'> Object[] create(ICreateContext
context) {</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#3F7F5F'>// create new Class</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New"'>EClass
- newClass = EcoreFactory.<i><span style="color:#0000C0">eINSTANCE</span></i>.createEClass();</span></p>
- <p class="MsoNormal"><span lang="EN-US"> </span></p>
- <p class="MsoNormal"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New"'>
- <span style="color:green">// Add model element to resource.</span></span></p>
- <p class="MsoNormal"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>EClass
+ newClass = EcoreFactory.<i><span style='color:#0000C0'>eINSTANCE</span></i>.createEClass();</span></p>
+ <p class=MsoNormal><span lang=EN-US> </span></p>
+ <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>
+ <span style='color:green'>// Add model element to resource.</span></span></p>
+ <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#3F7F5F'> // We add the model
element to the resource of the diagram for</span></p>
- <p class="MsoNormal"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";
+ <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#3F7F5F'> // simplicity's
sake. Normally, a customer would use its own</span></p>
- <p class="MsoNormal"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";
+ <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#3F7F5F'> // model
persistence layer for storing the business model separately.</span></p>
- <p class="MsoNormal"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New"'>
+ <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>
getDiagram().eResource().getContents().add(newClass);</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US"> </span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#3F7F5F'>// do the add</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
addGraphicalRepresentation(context, newClass);</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#3F7F5F'>// activate direct editing after object creation</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- getFeatureProvider().getDirectEditingInfo().setActive(</span><b><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>true</span></b><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ getFeatureProvider().getDirectEditingInfo().setActive(</span><b><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>true</span></b><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#3F7F5F'>// return newly created business object(s)</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>return</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>new</span></b><span style='font-size:10.0pt;font-family:"Courier New";color:black'> Object[] {
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ </span><b><span style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>return</span></b><span
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><b><span
+ style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>new</span></b><span
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> Object[] {
newClass };</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span style='font-size:10.0pt;
+ <p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'> }</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span style='font-size:10.0pt;
+ <p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'> </span></p>
</td>
</tr>
</table>
-<p class="MsoNormal"><span lang="EN-GB" style="color:black"> </span></p>
+<p class=MsoNormal><span lang=EN-GB style='color:black'> </span></p>
-<p class="MsoNormal"><span lang="EN-GB" style="color:black"> </span></p>
+<p class=MsoNormal><span lang=EN-GB style='color:black'> </span></p>
-<p class="MsoNormal"><span lang="EN-GB" style="color:black">In the <a href="add-feature.htm">add feature</a> the outer container shape of the newly
+<p class=MsoNormal><span lang=EN-GB style='color:black'>In the <a
+href="add-feature.htm">add feature</a> the outer container shape of the newly
created object must be set (the main pictogram element of the EClass).</span></p>
-<p class="MsoNormal"><span lang="EN-GB" style="color:black">Additionally the shape
+<p class=MsoNormal><span lang=EN-GB style='color:black'>Additionally the shape
(pictogram element) and its graphics algorithm have to be specified, where the
direct editing editor shall be opened.</span></p>
-<p class="MsoNormal"><span lang="EN-GB" style="color:black">You have to do this at
-the end of the <a href="../../../javadoc/com/sap/tc/emf/gfw/func/IAdd.html#add(com.sap.tc.emf.gfw.features.context.IAddContext)">add</a>
+<p class=MsoNormal><span lang=EN-GB style='color:black'>You have to do this at
+the end of the <a
+href="../../../javadoc/com/sap/tc/emf/gfw/func/IAdd.html#add(com.sap.tc.emf.gfw.features.context.IAddContext)">add</a>
method as shown here:</span></p>
-<p class="MsoNormal"><span lang="EN-GB" style="color:black"> </span></p>
+<p class=MsoNormal><span lang=EN-GB style='color:black'> </span></p>
-<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="851" style="width:18.0cm;border-collapse:collapse">
+<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=851
+ style='width:18.0cm;border-collapse:collapse'>
<tr>
- <td width="851" valign="top" style="width:18.0cm;border:solid windowtext 1.0pt;
- padding:0cm 5.4pt 0cm 5.4pt">
- <p class="MsoNormal" style="text-autospace:none"><b><span lang="EN-GB" style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'> </span></b></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><b><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";
- color:#7F0055'>public</span></b><span lang="EN-US" style='font-size:10.0pt;
+ <td width=851 valign=top style='width:18.0cm;border:solid windowtext 1.0pt;
+ padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='text-autospace:none'><b><span lang=EN-GB
+ style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'> </span></b></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ </span><b><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
+ color:#7F0055'>public</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New";color:black'> PictogramElement add(IAddContext
context) {</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'> </span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#3F7F5F'>// ... EXISTING CODING ...</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
IPeCreateService peCreateService = Graphiti.getPeCreateService();<br>
- IGaService gaService =
- Graphiti.getGaService();</span></p>
- <p class="MsoNormal" style="text-autospace:none"> </p>
- <p class="MsoNormal" style="text-autospace:none"> </p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";
+ IGaService gaService =
+ Graphiti.getGaService();</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#3F7F5F'>// SHAPE WITH TEXT</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
{</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#3F7F5F'>// create shape for text</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- Shape shape = </span><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>peCreateService</span><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>.createShape(containerShape, </span><b><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>false</span></b><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ Shape shape = peCreateService.createShape(containerShape, </span><b><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>false</span></b><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#3F7F5F'>// create and set text graphics algorithm</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- Text text = </span><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>gaService</span><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>.createDefaultText(shape, addedClass.getName());</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- text.setForeground(manageColor(</span><i><span lang="EN-US" style='font-size:
- 10.0pt;font-family:"Courier New";color:#0000C0'>CLASS_TEXT_FOREGROUND</span></i><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>));</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- text.setHorizontalAlignment(OrientationEnum.</span><i><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:#0000C0'>ALIGNMENT_CENTER</span></i><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- text.setVerticalAlignment(OrientationEnum.</span><i><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:#0000C0'>ALIGNMENT_CENTER</span></i><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- text.getFont().setBold(</span><b><span lang="EN-US" style='font-size:10.0pt;
- font-family:"Courier New";color:#7F0055'>true</span></b><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>gaService</span><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>.setLocationAndSizeOfGraphicsAlgorithm(text, 0, 0,
- <br>
- width, 20);</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ Text text = gaService.createDefaultText(shape, addedClass.getName());</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ text.setForeground(manageColor(</span><i><span lang=EN-US style='font-size:
+ 10.0pt;font-family:"Courier New";color:#0000C0'>CLASS_TEXT_FOREGROUND</span></i><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>));</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ text.setHorizontalAlignment(OrientationEnum.</span><i><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:#0000C0'>ALIGNMENT_CENTER</span></i><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ text.setVerticalAlignment(OrientationEnum.</span><i><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:#0000C0'>ALIGNMENT_CENTER</span></i><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ text.getFont().setBold(</span><b><span lang=EN-US style='font-size:10.0pt;
+ font-family:"Courier New";color:#7F0055'>true</span></b><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ gaService.setLocationAndSize(text, 0, 0, width, 20);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#3F7F5F'>// create link and wire it</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
link(shape, addedClass);</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#3F7F5F'>// provide information to support direct-editing directly </span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#3F7F5F'>// after object creation (must be activated additionally)</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
IDirectEditingInfo directEditingInfo =</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
getFeatureProvider().getDirectEditingInfo();</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#3F7F5F'>// set container shape for direct editing after object
creation</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
directEditingInfo.setMainPictogramElement(containerShape);</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#3F7F5F'>// set shape and graphics algorithm where the editor for</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#3F7F5F'>// direct editing shall be opened after object creation</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
directEditingInfo.setPictogramElement(shape);</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
directEditingInfo.setGraphicsAlgorithm(text);</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
}</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:#3F7F5F'>// ... EXISTING CODING ...</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'> </span></p>
- <p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>}</span></p>
- <p class="MsoNormal" style="text-autospace:none"><span style='font-size:10.0pt;
+ <p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'> </span></p>
</td>
</tr>
</table>
-<p class="MsoNormal"><span lang="EN-GB" style="color:black"> </span></p>
+<p class=MsoNormal><span lang=EN-GB style='color:black'> </span></p>
-<h2><span lang="EN-GB">Test: Direct Editing after Creation of a EClass</span></h2>
+<h2><span lang=EN-GB>Test: Direct Editing after Creation of a EClass</span></h2>
-<p class="MsoNormal"><span lang="EN-GB" style="color:black"> </span></p>
+<p class=MsoNormal><span lang=EN-GB style='color:black'> </span></p>
-<p class="MsoNormal"><span lang="EN-GB" style="color:black">Open a diagram and
+<p class=MsoNormal><span lang=EN-GB style='color:black'>Open a diagram and
create a new EClass from the palette. The shape for the EClass should
immediately allow the direct editing of the class name.</span></p>
-<hr>
- <a href="http://www.eclipse.org/legal/epl-v10.html" shape="rect">Copyright (c) SAP AG 2005, 2010.</a>
+
+<div class=MsoNormal align=center style='text-align:center'>
+
+<hr size=3 width="100%" align=center>
+
+</div>
+
+<p class=MsoNormal><a href="http://www.eclipse.org/legal/epl-v10.html"
+shape=rect>Copyright (c) SAP AG 2005, 2010.</a> </p>
+
+</div>
</body>
diff --git a/examples/org.eclipse.graphiti.doc/resources/docu/gfw/selection-behavior.htm b/examples/org.eclipse.graphiti.doc/resources/docu/gfw/selection-behavior.htm
index d445ebf..f207536 100644
--- a/examples/org.eclipse.graphiti.doc/resources/docu/gfw/selection-behavior.htm
+++ b/examples/org.eclipse.graphiti.doc/resources/docu/gfw/selection-behavior.htm
@@ -1,1422 +1,1191 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
+
<head>
-<meta name="generator" content=
-"HTML Tidy for Windows (vers 25 March 2009), see www.w3.org">
-<meta http-equiv="Content-Type" content=
-"text/html; charset=us-ascii">
-<meta name="Generator" content="Microsoft Word 12 (filtered)">
+<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
+<meta name=Generator content="Microsoft Word 12 (filtered)">
<title>Selection behavior</title>
-<link rel="Stylesheet" type="text/css" media="all" href=
-"../book.css">
-<style type="text/css">
+<link rel=Stylesheet type="text/css" media=all href="../book.css">
+<style>
<!--
/* Font Definitions */
@font-face
- {font-family:"Cambria Math";
- panose-1:2 4 5 3 5 4 6 3 2 4;}
+ {font-family:"Cambria Math";
+ panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
- {font-family:Cambria;
- panose-1:2 4 5 3 5 4 6 3 2 4;}
+ {font-family:Cambria;
+ panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;}
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
- {font-family:Consolas;
- panose-1:2 11 6 9 2 2 4 3 2 4;}
+ {font-family:Consolas;
+ panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
- {margin:0cm;
- margin-bottom:.0001pt;
- font-size:12.0pt;
- font-family:"Times New Roman","serif";}
+ {margin:0cm;
+ margin-bottom:.0001pt;
+ font-size:12.0pt;
+ font-family:"Times New Roman","serif";}
h1
- {mso-style-link:"Überschrift 1 Zchn";
- margin-top:12.0pt;
- margin-right:0cm;
- margin-bottom:3.0pt;
- margin-left:0cm;
- page-break-after:avoid;
- font-size:16.0pt;
- font-family:"Times New Roman","serif";
- font-weight:bold;}
+ {mso-style-link:"\00DCberschrift 1 Zchn";
+ margin-top:12.0pt;
+ margin-right:0cm;
+ margin-bottom:3.0pt;
+ margin-left:0cm;
+ page-break-after:avoid;
+ font-size:16.0pt;
+ font-family:"Times New Roman","serif";
+ font-weight:bold;}
h2
- {mso-style-link:"Überschrift 2 Zchn";
- margin-top:12.0pt;
- margin-right:0cm;
- margin-bottom:3.0pt;
- margin-left:0cm;
- page-break-after:avoid;
- font-size:14.0pt;
- font-family:"Times New Roman","serif";
- font-weight:bold;
- font-style:italic;}
+ {mso-style-link:"\00DCberschrift 2 Zchn";
+ margin-top:12.0pt;
+ margin-right:0cm;
+ margin-bottom:3.0pt;
+ margin-left:0cm;
+ page-break-after:avoid;
+ font-size:14.0pt;
+ font-family:"Times New Roman","serif";
+ font-weight:bold;
+ font-style:italic;}
h3
- {mso-style-link:"Überschrift 3 Zchn";
- margin-top:12.0pt;
- margin-right:0cm;
- margin-bottom:3.0pt;
- margin-left:0cm;
- page-break-after:avoid;
- font-size:13.0pt;
- font-family:"Times New Roman","serif";
- font-weight:bold;}
+ {mso-style-link:"\00DCberschrift 3 Zchn";
+ margin-top:12.0pt;
+ margin-right:0cm;
+ margin-bottom:3.0pt;
+ margin-left:0cm;
+ page-break-after:avoid;
+ font-size:13.0pt;
+ font-family:"Times New Roman","serif";
+ font-weight:bold;}
h4
- {mso-style-link:"Überschrift 4 Zchn";
- margin-top:11.25pt;
- margin-right:0cm;
- margin-bottom:1.7pt;
- margin-left:0cm;
- font-size:12.0pt;
- font-family:"Times New Roman","serif";
- font-weight:bold;
- font-style:italic;}
+ {mso-style-link:"\00DCberschrift 4 Zchn";
+ margin-top:11.25pt;
+ margin-right:0cm;
+ margin-bottom:1.7pt;
+ margin-left:0cm;
+ font-size:12.0pt;
+ font-family:"Times New Roman","serif";
+ font-weight:bold;
+ font-style:italic;}
h5
- {mso-style-link:"Überschrift 5 Zchn";
- margin-right:0cm;
- margin-left:0cm;
- font-size:10.0pt;
- font-family:"Times New Roman","serif";
- font-weight:bold;}
+ {mso-style-link:"\00DCberschrift 5 Zchn";
+ margin-right:0cm;
+ margin-left:0cm;
+ font-size:10.0pt;
+ font-family:"Times New Roman","serif";
+ font-weight:bold;}
h6
- {mso-style-link:"Überschrift 6 Zchn";
- margin-right:0cm;
- margin-left:0cm;
- font-size:7.5pt;
- font-family:"Times New Roman","serif";
- font-weight:bold;}
+ {mso-style-link:"\00DCberschrift 6 Zchn";
+ margin-right:0cm;
+ margin-left:0cm;
+ font-size:7.5pt;
+ font-family:"Times New Roman","serif";
+ font-weight:bold;}
p.MsoCaption, li.MsoCaption, div.MsoCaption
- {margin-top:6.0pt;
- margin-right:0cm;
- margin-bottom:24.0pt;
- margin-left:0cm;
- text-align:justify;
- font-size:10.0pt;
- font-family:"Times New Roman","serif";
- font-weight:bold;}
+ {margin-top:6.0pt;
+ margin-right:0cm;
+ margin-bottom:24.0pt;
+ margin-left:0cm;
+ text-align:justify;
+ font-size:10.0pt;
+ font-family:"Times New Roman","serif";
+ font-weight:bold;}
a:link, span.MsoHyperlink
- {color:blue;
- text-decoration:underline;}
+ {color:blue;
+ text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
- {color:purple;
- text-decoration:underline;}
+ {color:purple;
+ text-decoration:underline;}
p
- {margin-top:5.65pt;
- margin-right:0cm;
- margin-bottom:5.65pt;
- margin-left:0cm;
- font-size:12.0pt;
- font-family:"Times New Roman","serif";}
+ {margin-top:5.65pt;
+ margin-right:0cm;
+ margin-bottom:5.65pt;
+ margin-left:0cm;
+ font-size:12.0pt;
+ font-family:"Times New Roman","serif";}
pre
- {mso-style-link:"HTML Vorformatiert Zchn";
- margin-top:0cm;
- margin-right:0cm;
- margin-bottom:0cm;
- margin-left:3.4pt;
- margin-bottom:.0001pt;
- font-size:11.0pt;
- font-family:"Courier New";}
+ {mso-style-link:"HTML Vorformatiert Zchn";
+ margin-top:0cm;
+ margin-right:0cm;
+ margin-bottom:0cm;
+ margin-left:3.4pt;
+ margin-bottom:.0001pt;
+ font-size:11.0pt;
+ font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
- {mso-style-link:"Sprechblasentext Zchn";
- margin:0cm;
- margin-bottom:.0001pt;
- font-size:8.0pt;
- font-family:"Tahoma","sans-serif";}
+ {mso-style-link:"Sprechblasentext Zchn";
+ margin:0cm;
+ margin-bottom:.0001pt;
+ font-size:8.0pt;
+ font-family:"Tahoma","sans-serif";}
span.berschrift1Zchn
- {mso-style-name:"Überschrift 1 Zchn";
- mso-style-link:"Überschrift 1";
- font-family:"Cambria","serif";
- color:#365F91;
- font-weight:bold;}
+ {mso-style-name:"\00DCberschrift 1 Zchn";
+ mso-style-link:"\00DCberschrift 1";
+ font-family:"Cambria","serif";
+ color:#365F91;
+ font-weight:bold;}
span.berschrift2Zchn
- {mso-style-name:"Überschrift 2 Zchn";
- mso-style-link:"Überschrift 2";
- font-family:"Cambria","serif";
- color:#4F81BD;
- font-weight:bold;}
+ {mso-style-name:"\00DCberschrift 2 Zchn";
+ mso-style-link:"\00DCberschrift 2";
+ font-family:"Cambria","serif";
+ color:#4F81BD;
+ font-weight:bold;}
span.berschrift3Zchn
- {mso-style-name:"Überschrift 3 Zchn";
- mso-style-link:"Überschrift 3";
- font-family:"Cambria","serif";
- color:#4F81BD;
- font-weight:bold;}
+ {mso-style-name:"\00DCberschrift 3 Zchn";
+ mso-style-link:"\00DCberschrift 3";
+ font-family:"Cambria","serif";
+ color:#4F81BD;
+ font-weight:bold;}
span.berschrift4Zchn
- {mso-style-name:"Überschrift 4 Zchn";
- mso-style-link:"Überschrift 4";
- font-family:"Cambria","serif";
- color:#4F81BD;
- font-weight:bold;
- font-style:italic;}
+ {mso-style-name:"\00DCberschrift 4 Zchn";
+ mso-style-link:"\00DCberschrift 4";
+ font-family:"Cambria","serif";
+ color:#4F81BD;
+ font-weight:bold;
+ font-style:italic;}
span.berschrift5Zchn
- {mso-style-name:"Überschrift 5 Zchn";
- mso-style-link:"Überschrift 5";
- font-family:"Cambria","serif";
- color:#243F60;}
+ {mso-style-name:"\00DCberschrift 5 Zchn";
+ mso-style-link:"\00DCberschrift 5";
+ font-family:"Cambria","serif";
+ color:#243F60;}
span.berschrift6Zchn
- {mso-style-name:"Überschrift 6 Zchn";
- mso-style-link:"Überschrift 6";
- font-family:"Cambria","serif";
- color:#243F60;
- font-style:italic;}
+ {mso-style-name:"\00DCberschrift 6 Zchn";
+ mso-style-link:"\00DCberschrift 6";
+ font-family:"Cambria","serif";
+ color:#243F60;
+ font-style:italic;}
span.HTMLVorformatiertZchn
- {mso-style-name:"HTML Vorformatiert Zchn";
- mso-style-link:"HTML Vorformatiert";
- font-family:Consolas;}
+ {mso-style-name:"HTML Vorformatiert Zchn";
+ mso-style-link:"HTML Vorformatiert";
+ font-family:Consolas;}
span.SprechblasentextZchn
- {mso-style-name:"Sprechblasentext Zchn";
- mso-style-link:Sprechblasentext;
- font-family:"Tahoma","sans-serif";}
+ {mso-style-name:"Sprechblasentext Zchn";
+ mso-style-link:Sprechblasentext;
+ font-family:"Tahoma","sans-serif";}
p.code, li.code, div.code
- {mso-style-name:code;
- margin-top:0cm;
- margin-right:0cm;
- margin-bottom:0cm;
- margin-left:15.0pt;
- margin-bottom:.0001pt;
- font-size:12.0pt;
- font-family:"Times New Roman","serif";}
+ {mso-style-name:code;
+ margin-top:0cm;
+ margin-right:0cm;
+ margin-bottom:0cm;
+ margin-left:15.0pt;
+ margin-bottom:.0001pt;
+ font-size:12.0pt;
+ font-family:"Times New Roman","serif";}
p.note, li.note, div.note
- {mso-style-name:note;
- margin-top:19.5pt;
- margin-right:0cm;
- margin-bottom:19.5pt;
- margin-left:30.0pt;
- font-size:13.0pt;
- font-family:"Times New Roman","serif";
- font-style:italic;}
+ {mso-style-name:note;
+ margin-top:19.5pt;
+ margin-right:0cm;
+ margin-bottom:19.5pt;
+ margin-left:30.0pt;
+ font-size:13.0pt;
+ font-family:"Times New Roman","serif";
+ font-style:italic;}
p.msochpdefault, li.msochpdefault, div.msochpdefault
- {mso-style-name:msochpdefault;
- margin-top:5.65pt;
- margin-right:0cm;
- margin-bottom:5.65pt;
- margin-left:0cm;
- font-size:10.0pt;
- font-family:"Times New Roman","serif";}
+ {mso-style-name:msochpdefault;
+ margin-top:5.65pt;
+ margin-right:0cm;
+ margin-bottom:5.65pt;
+ margin-left:0cm;
+ font-size:10.0pt;
+ font-family:"Times New Roman","serif";}
+p.Uuml, li.Uuml, div.Uuml
+ {mso-style-name:"Ü\,berschrift 1";
+ mso-style-link:"Ü6\,berschrift 6 Zchn1";
+ margin:0cm;
+ margin-bottom:.0001pt;
+ font-size:12.0pt;
+ font-family:"Times New Roman","serif";}
+span.Uuml1
+ {mso-style-name:"Ü1\,berschrift 1 Zchn1";
+ mso-style-link:"Ü\,berschrift 1";
+ font-family:"Cambria","serif";
+ color:#365F91;
+ font-weight:bold;}
+span.Uuml2
+ {mso-style-name:"Ü2\,berschrift 2 Zchn1";
+ mso-style-link:"Ü\,berschrift 1";
+ font-family:"Cambria","serif";
+ color:#4F81BD;
+ font-weight:bold;}
+span.Uuml3
+ {mso-style-name:"Ü3\,berschrift 3 Zchn1";
+ mso-style-link:"Ü\,berschrift 1";
+ font-family:"Cambria","serif";
+ color:#4F81BD;
+ font-weight:bold;}
+span.Uuml4
+ {mso-style-name:"Ü4\,berschrift 4 Zchn1";
+ mso-style-link:"Ü\,berschrift 1";
+ font-family:"Cambria","serif";
+ color:#4F81BD;
+ font-weight:bold;
+ font-style:italic;}
+span.Uuml5
+ {mso-style-name:"Ü5\,berschrift 5 Zchn1";
+ mso-style-link:"Ü\,berschrift 1";
+ font-family:"Cambria","serif";
+ color:#243F60;}
+span.Uuml6
+ {mso-style-name:"Ü6\,berschrift 6 Zchn1";
+ mso-style-link:"Ü\,berschrift 1";
+ font-family:"Cambria","serif";
+ color:#243F60;
+ font-style:italic;}
span.code1
- {mso-style-name:code1;
- font-style:italic;}
+ {mso-style-name:code1;
+ font-style:italic;}
span.code0
- {mso-style-name:code0;
- font-style:italic;}
+ {mso-style-name:code0;
+ font-style:italic;}
.MsoChpDefault
- {font-size:10.0pt;}
+ {font-size:10.0pt;}
@page Section1
- {size:595.45pt 841.7pt;
- margin:72.0pt 89.85pt 72.0pt 89.85pt;}
+ {size:595.45pt 841.7pt;
+ margin:72.0pt 89.85pt 72.0pt 89.85pt;}
div.Section1
- {page:Section1;}
+ {page:Section1;}
-->
</style>
+
</head>
-<body bgcolor="white" lang="DE" link="blue" vlink="purple" style=
-'margin-bottom:12.0pt'>
-<div class="Section1">
-<h1><span lang="EN-US">Selection Behavior</span></h1>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'> </span></p>
-<h2><span lang="EN-US">Introduction</span></h2>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'> </span></p>
-<p class="MsoNormal"><span lang="EN-US" style='color:black'>In
-most cases a graphical figure is depicted by one outer
-‘main’ graphics algorithm, inside which several other
-graphics algorithms are located. The outer bounds of this outer
-‘main’ graphics algorithm also define the
+
+<body bgcolor=white lang=DE link=blue vlink=purple style='margin-bottom:12.0pt'>
+
+<div class=Section1>
+
+<h1><span lang=EN-US>Selection Behavior</span></h1>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
+
+<h2><span lang=EN-US>Introduction</span></h2>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'>In most cases a
+graphical figure is depicted by one outer ‘main’ graphics
+algorithm, inside which several other graphics algorithms are located. The
+outer bounds of this outer ‘main’ graphics algorithm also define
+the selection-behavior of the graphical figure.</span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'>But it is also possible
+to assemble a shape from overlapping or even distributed graphics algorithms.
+In such a case it is not so clear anymore, which bounds define the
selection-behavior of the graphical figure.</span></p>
-<p class="MsoNormal"><span lang="EN-US" style='color:black'>But
-it is also possible to assemble a shape from overlapping or even
-distributed graphics algorithms. In such a case it is not so
-clear anymore, which bounds define the selection-behavior of the
-graphical figure.</span></p>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'> </span></p>
-<p class="MsoNormal"><span lang="EN-US" style='color:black'>For a
-better understanding look at the following figure:</span></p>
-<p class="MsoNormal"><span style='color:black'><img width="111"
-height="71" src="visio/rendering-area-1a.gif" alt=""></span></p>
-<p class="MsoCaption"><span class="code1"><span lang="EN-US"
-style='font-style:normal'>Figure: Graphical figure with
-distributed graphics algorithms (ellipse and
-text)</span></span></p>
-<p class="MsoNormal"><span lang="EN-US" style='color:black'>This
-graphical figure consists of an ellipse and a text. For technical
-reasons there is still an outer invisible rectangle, which
-contains the ellipse and text. But in this example it would seem
-strange for the user, if this outer invisible rectangle would
-define the selection-behavior, meaning that clicking on the
-invisible rectangle would select it and show the
-selection-handles along the bounds of the invisible
-rectangle.</span></p>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'>Instead the selection-behavior should work as can
-be seen in the following figure:</span></p>
-<p class="MsoNormal"><span style='color:black'><img width="111"
-height="72" src="visio/rendering-area-1b.gif" alt=""></span></p>
-<p class="MsoCaption"><span class="code1"><span lang="EN-US"
-style='font-style:normal'>Figure: Selection area is smaller than
-complete graphical figure</span></span></p>
-<p class="MsoNormal"><span lang="EN-US" style='color:black'>The
-selection-handles appear only along the borders of the ellipse
-and not along the borders of the larger invisible rectangle. It
-is possible to move or resize the circle along these
-selection-handles (which will implicitly move or resize the
-complete graphical figure). This makes the ellipse the
-‘main’ graphics algorithm, although the ellipse is
-technically not the outer graphics algorithm of the graphical
-figure.</span></p>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'>Another aspect of the selection-behavior is that
-the graphical figure shall be selected when the mouse clicks on
-either the ellipse or the text. When the mouse clicks the text
-however, then the handle-bounds still appear around the ellipse
-as described above, and not around the text. This means, that the
-selection-handles can be shown around a different area, than the
-area which reacts on the mouse clicks to select the graphical
-figure.</span></p>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'> </span></p>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'> </span></p>
-<h2><span lang="EN-US">Creating an Extended Rendering
-Area</span></h2>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'> </span></p>
-<p class="MsoNormal"><span lang="EN-US" style='color:black'>The
-following example bases on the <a href="anchors.htm">box relative
-anchor</a> we created previously. As you can see the box relative
-anchor was located completely inside the bounds of the rectangle
-depicting the EClass.</span></p>
-<p class="MsoNormal"><span lang="EN-US" style='color:black'>Now
-we want to change the location of the box relative anchor, so
-that it exceeds the bounds of the rectangle. This is actually
-quite typical, that box relative anchors or fix point anchors
-exceed the bounds of the graphical figure it belongs
-to.</span></p>
-<p class="MsoNormal"><span style='color:black'><img border="0"
-width="121" height="71" src="visio/rendering-area-2a.gif" alt=
-""></span></p>
-<p class="MsoCaption"><span class="code1"><span lang="EN-US"
-style='font-style:normal'>Figure: Box relative anchor exceeds
-bounds of graphical figure</span></span></p>
-<p class="MsoNormal"><span lang="EN-US" style='color:black'>As
-already mentioned, for technical reasons a graphics algorithm can
-never be painted outside the bounds of its parent graphics
-algorithm. Although it is possible to set the bounds of a
-graphics algorithm to exceed the bounds of its parent graphics
-algorithm, it will just be clipped when painting.</span></p>
-<p class="MsoNormal"><span lang="EN-US" style='color:black'>You
-can try that out by changing the bounds of the <a href=
-"anchors.htm">box relative anchor</a> we created
-previously:</span></p>
-<p class="MsoNormal"><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'>gaService<span style='color:black'>.<i>setLocationAndSizeOfGraphicsAlgorithm</i>(boxRect,
--8, -4,</span> <b>16</b><span style='color:black'>,
-8);</span></span></p>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'> </span></p>
-<p class="MsoNormal"><span lang="EN-US" style='color:black'>As
-this doesn’t work, we have to change the structure of the
-graphics algorithms for the EClass. The outer graphics algorithm
-shall be an invisible rectangle, which contains the rectangle
-depicting the EClass. The size of the invisible rectangle equals
-the size of the rectangle depicting the EClass, plus the space
-needed for the box relative anchor at its right side. You can see
-the bounds of the invisible rectangle when you select the
-graphical figure:</span></p>
-<p class="MsoNormal"><span style='color:black'><img border="0"
-width="131" height="71" src="visio/rendering-area-2b.gif" alt=
-""></span><span lang="EN-US" style=
-'color:black'> </span></p>
-<p class="MsoCaption"><span class="code1"><span lang="EN-US"
-style='font-style:normal'>Figure: Selection-handles around the
-invisible rectangle</span></span><span lang=
-"EN-US"> </span></p>
-<p class="MsoNormal"><span lang="EN-US" style='color:black'>The
-invisible rectangle has to be created in the add method of the
-<a href="add-feature.htm">add feature</a><span class=
-"code1"><span style='font-style:normal'>, as explained in the
-following code snippet. Additionally the bounds of the box
-relative anchor have to be set differently. Note, that the
-expanded width of the invisible rectangle is set in a static
-field, because it also has to be used in calculations outside
-this class.</span></span></span></p>
-<p class="MsoNormal"><span lang="EN-US"> </span></p>
-<table class="MsoNormalTable" border="0" cellspacing="0"
-cellpadding="0" width="851" style=
-'width:18.0cm;border-collapse:collapse'>
-<tr>
-<td width="851" valign="top" style=
-'width:18.0cm;border:solid windowtext 1.0pt; padding:0cm 5.4pt 0cm 5.4pt'>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:#3F7F5F'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-the additional size of the invisible rectangle at the right
-border</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-(this also equals the half width of the anchor to paint
-there)</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>public</span></b>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:#7F0055'>static</span></b>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:#7F0055'>final</span></b>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:#7F0055'>int</span></b>
-<i><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:#0000C0'>INVISIBLE_RECT_RIGHT</span></i>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>=
-6;</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>public</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:black'>PictogramElement
-add(IAddContext context) {</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-EClass addedClass = (EClass) context.getNewObject();</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-Diagram targetDiagram = (Diagram)
-context.getTargetContainer();</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-CONTAINER SHAPE WITH ROUNDED RECTANGLE</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:#3F7F5F'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'>IPeCreateService
-peCreateService = Graphiti.getPeCreateService();</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-ContainerShape containerShape =</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'>peCreateService<span style='color:black'>.createContainerShape(targetDiagram,</span>
-<b><span style='color:#7F0055'>true</span></b><span style=
-'color:black'>);</span></span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-check whether the context has a size (e.g. from a create
-feature)</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-otherwise define a default size for the shape</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>int</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:black'>width =
-context.getWidth() <= 0 ? 100 : context.getWidth();</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>int</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:black'>height
-= context.getHeight() <= 0 ? 50 :
-context.getHeight();</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-RoundedRectangle roundedRectangle;</span> <span lang="EN-US"
-style=
-'font-size: 10.0pt;font-family:"Courier New";color:#3F7F5F'>//
-need to access it later</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:#3F7F5F'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'> IGaService
-gaService = Graphiti.getGaService();</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-{</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-create invisible outer rectangle expanded by</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-the width needed for the anchor</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-Rectangle invisibleRectangle =</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'>gaService<span style='color:black'>.createInvisibleRectangle(containerShape);</span></span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
- </span><span lang="EN-US"
-style=
-'font-size:10.0pt;font-family:"Courier New"'>gaService<span style='color:black'>.setLocationAndSizeOfGraphicsAlgorithm(invisibleRectangle,</span></span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-context.getX(), context.getY(), width +</span> <i><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:#0000C0'>INVISIBLE_RECT_RIGHT</span></i><span lang="EN-US"
-style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>,</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-height);</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-create and set visible rectangle inside invisible
-rectangle</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
- roundedRectangle
-=</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'>gaService<span style='color:black'>.createRoundedRectangle(invisibleRectangle,
-5, 5);</span></span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-roundedRectangle.setForeground(manageColor(</span><i><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:#0000C0'>CLASS_FOREGROUND</span></i><span lang="EN-US"
-style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>));</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-roundedRectangle.setBackground(manageColor(</span><i><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:#0000C0'>CLASS_BACKGROUND</span></i><span lang="EN-US"
-style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>));</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
- roundedRectangle.setLineWidth(2);</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'>gaService<span style='color:black'>.setLocationAndSizeOfGraphicsAlgorithm(roundedRectangle,
-0,</span></span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-0, width, height);</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-create link and wire it</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-link(containerShape, addedClass);</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-}</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:#3F7F5F'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-... EXISTING CODING ...</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-add a chopbox anchor to the shape</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'>peCreateService<span style='color:black'>.createChopboxAnchor(containerShape);</span></span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-create an additional box relative anchor at
-middle-right</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-BoxRelativeAnchor boxAnchor =</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'>peCreateService<span style='color:black'>.createBoxRelativeAnchor(containerShape);</span></span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-boxAnchor.setRelativeWidth(1.0);</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-boxAnchor.setRelativeHeight(0.5);</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-anchor references visible rectangle instead of invisible
-rectangle</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-boxAnchor.setReferencedGraphicsAlgorithm(roundedRectangle);</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-assign a graphics algorithm for the box relative
-anchor</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-Rectangle boxRect =</span> <span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New"'>gaService<span style='color:black'>.createRectangle(boxAnchor);</span></span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-anchor is located on the right border of the visible
-rectangle</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-and touches the border of the invisible rectangle</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>int</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:black'>w
-=</span> <i><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:#0000C0'>INVISIBLE_RECT_RIGHT</span></i><span lang="EN-US"
-style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>;</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'>gaService<span style='color:black'>.setLocationAndSizeOfGraphicsAlgorithm(boxRect,
--w, -w, 2 * w,</span></span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-2 * w);</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-Color c =</span> <span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'>gaService<span style='color:black'>.manageColor(getDiagram(),
-IColorConstant.</span><i><span style=
-'color:#0000C0'>DARK_BLUE</span></i><span style=
-'color:black'>);</span></span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-boxRect.setBackground(c);</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-call the layout feature</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>layoutPictogramElement(containerShape);</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span style=
-'font-size:10.0pt; font-family:"Courier New"'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span style=
-'font-size:10.0pt; font-family:"Courier New";color:black'> </span>
-<b><span style=
-'font-size:10.0pt;font-family:"Courier New";color:#7F0055'>return</span></b>
-<span style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>containerShape;</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span style=
-'font-size:10.0pt; font-family:"Courier New";color:black'>
-}</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span></p>
-</td>
-</tr>
-</table>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'> </span></p>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'> </span></p>
-<p class="MsoNormal"><span lang="EN-US" style='color:black'>Next
-we have to change the layout method of the <a href=
-"layout-feature.htm">layout feature</a><span class=
-"code1"><span style='font-style:normal'>. Previously it adjusted
-the size of the inner graphics algorithms (line and text) in
-relation to the container graphics algorithm (visible rectangle).
-Now it has to adjust the size of the inner graphics algorithms
-(visible rectangle, line and text) in relation to the container
-graphics algorithm (invisible
-rectangle).</span></span></span></p>
-<p class="MsoNormal"><span class="code1"><span lang="EN-US"
-style='color:black; font-style:normal'>The implementation can be
-seen in the following code-snippet:</span></span></p>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'> </span></p>
-<table class="MsoNormalTable" border="0" cellspacing="0"
-cellpadding="0" width="851" style=
-'width:18.0cm;border-collapse:collapse'>
-<tr>
-<td width="851" valign="top" style=
-'width:18.0cm;border:solid windowtext 1.0pt; padding:0cm 5.4pt 0cm 5.4pt'>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style='color:black'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>public</span></b>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:#7F0055'>boolean</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>layout(ILayoutContext
-context) {</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>boolean</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:black'>anythingChanged
-=</span> <b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:#7F0055'>false</span></b><span lang="EN-US"
-style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>;</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-ContainerShape containerShape =</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-(ContainerShape) context.getPictogramElement();</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-GraphicsAlgorithm containerGa =
-containerShape.getGraphicsAlgorithm();</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-the containerGa is the invisible rectangle</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-containing the visible rectangle as its (first and only)
-child</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-GraphicsAlgorithm rectangle =</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-containerGa.getGraphicsAlgorithmChildren().get(0);</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-height of invisible rectangle</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>if</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:black'>(containerGa.getHeight()
-<</span> <i><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:#0000C0'>MIN_HEIGHT</span></i><span lang="EN-US"
-style='font-size:10.0pt;font-family:"Courier New";color:black'>)
-{</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-containerGa.setHeight(</span><i><span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:#0000C0'>MIN_HEIGHT</span></i><span lang="EN-US"
-style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-anythingChanged =</span> <b><span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:#7F0055'>true</span></b><span lang="EN-US"
-style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>;</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-}</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-height of visible rectangle (same as invisible
-rectangle)</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>if</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:black'>(rectangle.getHeight()
-!= containerGa.getHeight()) {</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-rectangle.setHeight(containerGa.getHeight());</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-anythingChanged =</span> <b><span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:#7F0055'>true</span></b><span lang="EN-US"
-style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>;</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-}</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-width of invisible rectangle</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>if</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:black'>(containerGa.getWidth()
-<</span> <i><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:#0000C0'>MIN_WIDTH</span></i><span lang="EN-US"
-style='font-size:10.0pt;font-family:"Courier New";color:black'>)
-{</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
- containerGa.setWidth(</span><i><span lang="EN-US"
-style=
-'font-size:10.0pt;font-family:"Courier New";color:#0000C0'>MIN_WIDTH</span></i><span lang="EN-US"
-style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-anythingChanged =</span> <b><span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:#7F0055'>true</span></b><span lang="EN-US"
-style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>;</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-}</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-width of visible rectangle (smaller than invisible
-rectangle)</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>int</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:black'>rectangleWidth
-=</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-containerGa.getWidth()</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-- TutorialEAddClassFeature.</span><i><span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:#0000C0'>INVISIBLE_RECT_RIGHT</span></i><span lang="EN-US"
-style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>;</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>if</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:black'>(rectangle.getWidth()
-!= rectangleWidth) {</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-rectangle.setWidth(rectangleWidth);</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-anythingChanged =</span> <b><span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:#7F0055'>true</span></b><span lang="EN-US"
-style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>;</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-}</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#3F7F5F'>//
-width of text and line (same as visible rectangle)</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-Iterator iter =
-containerShape.getChildren().iterator();</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>while</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:black'>(iter.hasNext())
-{</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-Shape shape = (Shape) iter.next();</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-GraphicsAlgorithm graphicsAlgorithm =
-shape.getGraphicsAlgorithm();</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'>
-IGaService gaService = Graphiti.getGaService();</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-IDimension size =</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'>gaService<span style='color:black'>.<i>calculateSizeOfGraphicsAlgorithm</i>(graphicsAlgorithm);</span></span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>if</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:black'>(rectangleWidth
-!= size.getWidth()) {</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>if</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:black'>(graphicsAlgorithm</span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:#7F0055'>instanceof</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>Polyline)
-{</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-Polyline polyline = (Polyline) graphicsAlgorithm;</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-Point secondPoint = polyline.getPoints().get(1);</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-Point newSecondPoint =</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'>gaService<span style='color:black'>.<i>createPoint</i>(rectangleWidth,</span></span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-secondPoint.getY());</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-polyline.getPoints().set(1, newSecondPoint);</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-anythingChanged =</span> <b><span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:#7F0055'>true</span></b><span lang="EN-US"
-style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>;</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-}</span> <b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>else</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:black'>{</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'>gaService<span style='color:black'>.<i>setWidthOfGraphicsAlgorithm</i>(graphicsAlgorithm,</span></span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-rectangleWidth);</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-anythingChanged =</span> <b><span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:#7F0055'>true</span></b><span lang="EN-US"
-style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>;</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-}</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-}</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-}</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>return</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:black'>anythingChanged;</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>}</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span></p>
-</td>
-</tr>
-</table>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'> </span></p>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'> </span></p>
-<h2><span lang="EN-US">Test: Create a EClass with Extended
-Rendering Area</span></h2>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'> </span></p>
-<p class="MsoNormal"><span lang="EN-US" style='color:black'>Start
-the editor and create a new EClass. Verify that the EClass and
-its selection-handles look similar to the figures
-above. </span></p>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'> </span></p>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'> </span></p>
-<h2><span lang="EN-US">Adjusting the Selection
-Behavior</span></h2>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'> </span></p>
-<p class="MsoNormal"><span lang="EN-US" style='color:black'>As
-you can see above the selection-handles of the EClass are around
+
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'>For a better
+understanding look at the following figure:</span></p>
+
+<p class=MsoNormal><span style='color:black'><img width=111 height=71
+src="visio/rendering-area-1a.gif"></span></p>
+
+<p class=MsoCaption><span class=code1><span lang=EN-US style='font-style:normal'>Figure:
+Graphical figure with distributed graphics algorithms (ellipse and text)</span></span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'>This graphical figure
+consists of an ellipse and a text. For technical reasons there is still an
+outer invisible rectangle, which contains the ellipse and text. But in this
+example it would seem strange for the user, if this outer invisible rectangle
+would define the selection-behavior, meaning that clicking on the invisible
+rectangle would select it and show the selection-handles along the bounds of
the invisible rectangle.</span></p>
-<p class="MsoNormal"><span lang="EN-US" style='color:black'>This
-is not a good selection-behavior, because the user considers the
-visible rectangle as the ‘main’ graphics algorithm
-and doesn’t care about the extra space needed to show the
-anchor. This also means that when resizing/moving the EClass,
-this should be done on the visible rectangle and not the
-invisible rectangle.</span></p>
-<p class="MsoNormal"><span lang="EN-US" style='color:black'>In
-the following we want to change the selection behavior in a way
-that the selection-handles appear directly around the visible
-rectangle, as you can see in the following figure:</span></p>
-<p class="MsoNormal"><span style='color:black'><img border="0"
-width="121" height="71" src="visio/rendering-area-2c.gif" alt=
-""></span></p>
-<p class="MsoCaption"><span class="code1"><span lang="EN-US"
-style='font-style:normal'>Figure: Selection-handles around the
-visible rectangle</span></span><span lang=
-"EN-US"> </span></p>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'>Additionally we want to define the visible
-rectangle as the selection-area, which activates the selection
-when the mouse clicks into it. So a mouse click on the invisible
-rectangle outside the visible rectangle will no longer activate
-the selection. </span></p>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'> </span></p>
-<p class="MsoNormal"><span lang="EN-GB" style=
-'color:black'>Selection areas are defined in the tool behavior
-provider.</span></p>
-<p class="MsoNormal"><span lang="EN-GB" style='color:black'>If
-you didn’t do so already you must <b>first create a tool
-behavior provider and add it to the diagram type provider as
-described <a href=
-"tool-behavior-provider.htm">here</a>.</b></span></p>
-<p class="MsoNormal"><span lang="EN-GB" style='color:black'>The
-following methods of the tool behavior provider must be
-overwritten:</span></p>
-<p class="MsoNormal"><span lang="EN-GB" style='color:black'>The
-method <a href=
-"file://///wdfd00184898a/../javadoc/com/sap/tc/emf/gfw/tb/IToolBehaviorProvider.html#getSelectionGraphicsAlgorithm(com.sap.tc.emf.gfw.mm.pictograms.PictogramElement)">
-getSelectionGraphicsAlgorithm</a> has to return one graphics
-algorithm, which defines the selection-handle.</span></p>
-<p class="MsoNormal"><span lang="EN-GB" style='color:black'>The
-method <a href=
-"file://///wdfd00184898a/../javadoc/com/sap/tc/emf/gfw/tb/IToolBehaviorProvider.html#getSelectionArea(com.sap.tc.emf.gfw.mm.pictograms.PictogramElement)">
-getSelectionArea</a> has to return multiple graphics algorithms,
-which union defines the selection-area inside which mouse-clicks
-activate the selection.</span></p>
-<p class="MsoNormal"><span lang="EN-GB" style=
-'color:black'> </span></p>
-<p class="MsoNormal"><span lang="EN-GB" style='color:black'>In
-this example we want to return the visible rectangle in both
-methods. </span></p>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'> </span></p>
-<p class="MsoNormal"><span lang="EN-GB" style='color:black'>You
-can see the complete implementation of the selection area
-here:</span></p>
-<p class="MsoNormal"><span lang="EN-GB" style=
-'color:black'> </span></p>
-<table class="MsoNormalTable" border="0" cellspacing="0"
-cellpadding="0" width="851" style=
-'width:18.0cm;border-collapse:collapse'>
-<tr>
-<td width="851" valign="top" style=
-'width:18.0cm;border:solid windowtext 1.0pt; padding:0cm 5.4pt 0cm 5.4pt'>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style='color:black'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#646464'>@Override</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>public</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:black'>GraphicsAlgorithm[]
-getSelectionArea(PictogramElement pe) {</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-IFeatureProvider featureProvider =
-getFeatureProvider();</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-Object bo =
-featureProvider.getBusinessObjectForPictogramElement(pe);</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>if</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:black'>(bo</span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:#7F0055'>instanceof</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>EClass)
-{</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-GraphicsAlgorithm invisible =
-pe.getGraphicsAlgorithm();</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-GraphicsAlgorithm rectangle =</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-invisible.getGraphicsAlgorithmChildren().get(0);</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>return</span></b>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:#7F0055'>new</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>GraphicsAlgorithm[]
-{ rectangle };</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-}</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>return</span></b>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:#7F0055'>super</span></b><span lang="EN-US"
-style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>.getSelectionArea(pe);</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-}</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#646464'>@Override</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>public</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:black'>GraphicsAlgorithm
-getSelectionGraphicsAlgorithm(</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-PictogramElement pe) {</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-IFeatureProvider featureProvider =
-getFeatureProvider();</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-Object bo =
-featureProvider.getBusinessObjectForPictogramElement(pe);</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>if</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt; font-family:"Courier New";color:black'>(bo</span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:#7F0055'>instanceof</span></b>
-<span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>EClass)
-{</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-GraphicsAlgorithm invisible = pe.getGraphicsAlgorithm();<br>
-
-EList<GraphicsAlgorithm> graphicsAlgorithmChildren =<br>
-
-invisible.getGraphicsAlgorithmChildren();</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"'>
-<b><span style='color:purple'>if</span></b>
-(!graphicsAlgorithmChildren.isEmpty()) {<br>
-
-<b><span style='color:purple'>return</span></b>
-graphicsAlgorithmChildren.get(0);<br>
-
-}</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>
-}</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New"; color:#7F0055'>return</span></b>
-<b><span lang="EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:#7F0055'>super</span></b><span lang="EN-US"
-style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>.getSelectionGraphicsAlgorithm(pe);</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span>
-<span style=
-'font-size:10.0pt;font-family:"Courier New";color:black'>}</span></p>
-<p class="MsoNormal" style='text-autospace:none'><span style=
-'font-size:10.0pt; font-family:"Courier New"'> </span></p>
-<p class="MsoNormal" style='text-autospace:none'><span lang=
-"EN-US" style=
-'font-size:10.0pt;font-family:"Courier New";color:black'> </span></p>
-</td>
-</tr>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'>Instead the
+selection-behavior should work as can be seen in the following figure:</span></p>
+
+<p class=MsoNormal><span style='color:black'><img width=111 height=72
+src="visio/rendering-area-1b.gif"></span></p>
+
+<p class=MsoCaption><span class=code1><span lang=EN-US style='font-style:normal'>Figure:
+Selection area is smaller than complete graphical figure</span></span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'>The selection-handles
+appear only along the borders of the ellipse and not along the borders of the
+larger invisible rectangle. It is possible to move or resize the circle along
+these selection-handles (which will implicitly move or resize the complete
+graphical figure). This makes the ellipse the ‘main’ graphics
+algorithm, although the ellipse is technically not the outer graphics algorithm
+of the graphical figure.</span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'>Another aspect of the
+selection-behavior is that the graphical figure shall be selected when the
+mouse clicks on either the ellipse or the text. When the mouse clicks the text
+however, then the handle-bounds still appear around the ellipse as described
+above, and not around the text. This means, that the selection-handles can be
+shown around a different area, than the area which reacts on the mouse clicks
+to select the graphical figure.</span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
+
+<h2><span lang=EN-US>Creating an Extended Rendering Area</span></h2>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'>The following example
+bases on the <a href="anchors.htm">box relative anchor</a> we created
+previously. As you can see the box relative anchor was located completely
+inside the bounds of the rectangle depicting the EClass.</span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'>Now we want to change
+the location of the box relative anchor, so that it exceeds the bounds of the
+rectangle. This is actually quite typical, that box relative anchors or fix
+point anchors exceed the bounds of the graphical figure it belongs to.</span></p>
+
+<p class=MsoNormal><span style='color:black'><img border=0 width=121 height=71
+src="visio/rendering-area-2a.gif"></span></p>
+
+<p class=MsoCaption><span class=code1><span lang=EN-US style='font-style:normal'>Figure:
+Box relative anchor exceeds bounds of graphical figure</span></span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'>As already mentioned,
+for technical reasons a graphics algorithm can never be painted outside the
+bounds of its parent graphics algorithm. Although it is possible to set the
+bounds of a graphics algorithm to exceed the bounds of its parent graphics
+algorithm, it will just be clipped when painting.</span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'>You can try that out by
+changing the bounds of the <a href="anchors.htm">box relative anchor</a> we
+created previously:</span></p>
+
+<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>gaService<span
+style='color:black'>.<i>setLocationAndSize</i>(boxRect, -8, -4,</span> <b>16</b><span
+style='color:black'>, 8);</span></span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'>As this doesn’t
+work, we have to change the structure of the graphics algorithms for the
+EClass. The outer graphics algorithm shall be an invisible rectangle, which
+contains the rectangle depicting the EClass. The size of the invisible
+rectangle equals the size of the rectangle depicting the EClass, plus the space
+needed for the box relative anchor at its right side. You can see the bounds of
+the invisible rectangle when you select the graphical figure:</span></p>
+
+<p class=MsoNormal><span style='color:black'><img border=0 width=131 height=71
+src="visio/rendering-area-2b.gif"></span><span lang=EN-US style='color:black'> </span></p>
+
+<p class=MsoCaption><span class=code1><span lang=EN-US style='font-style:normal'>Figure:
+Selection-handles around the invisible rectangle</span></span><span lang=EN-US> </span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'>The invisible rectangle
+has to be created in the add method of the <a href="add-feature.htm">add
+feature</a><span class=code1><span style='font-style:normal'>, as explained in
+the following code snippet. Additionally the bounds of the box relative anchor
+have to be set differently. Note, that the expanded width of the invisible
+rectangle is set in a static field, because it also has to be used in
+calculations outside this class.</span></span></span></p>
+
+<p class=MsoNormal><span lang=EN-US> </span></p>
+
+<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=851
+ style='width:18.0cm;border-collapse:collapse'>
+ <tr>
+ <td width=851 valign=top style='width:18.0cm;border:solid windowtext 1.0pt;
+ padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:#3F7F5F'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// the additional size of the invisible rectangle at
+ the right border</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// (this also equals the half width of the anchor to
+ paint there)</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <b><span
+ style='color:#7F0055'>public</span></b> <b><span style='color:#7F0055'>static</span></b>
+ <b><span style='color:#7F0055'>final</span></b> <b><span style='color:#7F0055'>int</span></b>
+ <i><span style='color:#0000C0'>INVISIBLE_RECT_RIGHT</span></i> <span
+ style='color:black'>= 6;</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <b><span
+ style='color:#7F0055'>public</span></b> <span style='color:black'>PictogramElement
+ add(IAddContext context) {</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ EClass addedClass = (EClass) context.getNewObject();</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ Diagram targetDiagram = (Diagram) context.getTargetContainer();</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// CONTAINER SHAPE WITH ROUNDED RECTANGLE</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:#3F7F5F'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> IPeCreateService
+ peCreateService = Graphiti.getPeCreateService();</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ ContainerShape containerShape =</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> peCreateService<span
+ style='color:black'>.createContainerShape(targetDiagram,</span> <b><span
+ style='color:#7F0055'>true</span></b><span style='color:black'>);</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// check whether the context has a size (e.g. from a
+ create feature)</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// otherwise define a default size for the shape</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <b><span
+ style='color:#7F0055'>int</span></b> <span style='color:black'>width =
+ context.getWidth() <= 0 ? 100 : context.getWidth();</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <b><span
+ style='color:#7F0055'>int</span></b> <span style='color:black'>height =
+ context.getHeight() <= 0 ? 50 : context.getHeight();</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ RoundedRectangle roundedRectangle;</span><span lang=EN-US style='font-size:
+ 10.0pt;font-family:"Courier New"'> <span style='color:#3F7F5F'>// need to
+ access it later</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:#3F7F5F'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> IGaService
+ gaService = Graphiti.getGaService();</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ {</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// create invisible outer rectangle expanded by</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// the width needed for the anchor</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ Rectangle invisibleRectangle =</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> gaService<span
+ style='color:black'>.createInvisibleRectangle(containerShape);</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ </span><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'>gaService<span
+ style='color:black'>.setLocationAndSize(invisibleRectangle,</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ context.getX(), context.getY(), width +</span><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> <i><span
+ style='color:#0000C0'>INVISIBLE_RECT_RIGHT</span></i><span style='color:black'>,</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ height);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// create and set visible rectangle inside invisible
+ rectangle</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ roundedRectangle =</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> gaService<span
+ style='color:black'>.createRoundedRectangle(invisibleRectangle, 5, 5);</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ roundedRectangle.setForeground(manageColor(</span><i><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:#0000C0'>CLASS_FOREGROUND</span></i><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>));</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ roundedRectangle.setBackground(manageColor(</span><i><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:#0000C0'>CLASS_BACKGROUND</span></i><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>));</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ roundedRectangle.setLineWidth(2);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> gaService<span
+ style='color:black'>.setLocationAndSize(roundedRectangle, 0,</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ 0, width, height);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// create link and wire it</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ link(containerShape, addedClass);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ }</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:#3F7F5F'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// ... EXISTING CODING ...</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// add a chopbox anchor to the shape</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> peCreateService<span
+ style='color:black'>.createChopboxAnchor(containerShape);</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// create an additional box relative anchor at middle-right</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ BoxRelativeAnchor boxAnchor =</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> peCreateService<span
+ style='color:black'>.createBoxRelativeAnchor(containerShape);</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ boxAnchor.setRelativeWidth(1.0);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ boxAnchor.setRelativeHeight(0.5);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// anchor references visible rectangle instead of
+ invisible rectangle</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ boxAnchor.setReferencedGraphicsAlgorithm(roundedRectangle);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// assign a graphics algorithm for the box relative
+ anchor</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ Rectangle boxRect =</span><span lang=EN-US style='font-size:10.0pt;
+ font-family:"Courier New"'> gaService<span style='color:black'>.createRectangle(boxAnchor);</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// anchor is located on the right border of the visible
+ rectangle</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// and touches the border of the invisible rectangle</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <b><span
+ style='color:#7F0055'>int</span></b> <span style='color:black'>w =</span> <i><span
+ style='color:#0000C0'>INVISIBLE_RECT_RIGHT</span></i><span style='color:black'>;</span></span></p>
+ <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
+ color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>
+ gaService.setLocationAndSize(boxRect, -w, -w, 2 * w 2 * w); </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ Color c =</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>
+ gaService<span style='color:black'>.manageColor(getDiagram(), IColorConstant.</span><i><span
+ style='color:#0000C0'>DARK_BLUE</span></i><span style='color:black'>);</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ boxRect.setBackground(c);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// call the layout feature</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> </span><span
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>layoutPictogramElement(containerShape);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
+ font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
+ font-family:"Courier New";color:black'> </span><span
+ style='font-size:10.0pt;font-family:"Courier New"'> <b><span
+ style='color:#7F0055'>return</span></b> <span style='color:black'>containerShape;</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
+ font-family:"Courier New";color:black'> }</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span></p>
+ </td>
+ </tr>
</table>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'> </span></p>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'> </span></p>
-<h2><span lang="EN-US">Test: Verify the Adjusted Selection
-Behavior</span></h2>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'><i>Note</i>: This change is incompatible with diagrams created in earlier stages of the tutorial. You will get an exception, when opening these diagrams.</span></p>
-<p class="MsoNormal"><span lang="EN-US" style=
-'color:black'> </span></p>
-<p class="MsoNormal">S<span lang="EN-US" style='color:black'>tart
-the editor and create a new EClass. Click on the visible
-rectangle and verify that the selection-handles are only around
-the visible rectangle. Click slightly right of the visible
-rectangle on the invisible rectangle and verify that the EClass
-becomes deselected.</span></p>
-<p class="MsoNormal"><span lang="EN-US"> </span></p>
-<p class="MsoNormal"><span lang="EN-GB" style=
-'color:black'> </span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'>Next we have to change
+the layout method of the <a href="layout-feature.htm">layout feature</a><span
+class=code1><span style='font-style:normal'>. Previously it adjusted the size
+of the inner graphics algorithms (line and text) in relation to the container
+graphics algorithm (visible rectangle). Now it has to adjust the size of the
+inner graphics algorithms (visible rectangle, line and text) in relation to the
+container graphics algorithm (invisible rectangle).</span></span></span></p>
+
+<p class=MsoNormal><span class=code1><span lang=EN-US style='color:black;
+font-style:normal'>The implementation can be seen in the following
+code-snippet:</span></span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
+
+<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=851
+ style='width:18.0cm;border-collapse:collapse'>
+ <tr>
+ <td width=851 valign=top style='width:18.0cm;border:solid windowtext 1.0pt;
+ padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='color:black'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New";color:#7F0055'>public</span></b><span lang=EN-US> </span><b><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>boolean</span></b><span
+ lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
+ color:black'>layout(ILayoutContext context) {</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New";color:#7F0055'>boolean</span></b><span lang=EN-US> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>anythingChanged
+ =</span><span lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;
+ font-family:"Courier New";color:#7F0055'>false</span></b><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ ContainerShape containerShape =</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ (ContainerShape) context.getPictogramElement();</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ GraphicsAlgorithm containerGa = containerShape.getGraphicsAlgorithm();</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
+ color:#3F7F5F'>// the containerGa is the invisible rectangle</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
+ color:#3F7F5F'>// containing the visible rectangle as its (first and only)
+ child</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ GraphicsAlgorithm rectangle =</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ containerGa.getGraphicsAlgorithmChildren().get(0);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
+ color:#3F7F5F'>// height of invisible rectangle</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New";color:#7F0055'>if</span></b><span lang=EN-US> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>(containerGa.getHeight()
+ <</span><span lang=EN-US> </span><i><span lang=EN-US style='font-size:
+ 10.0pt;font-family:"Courier New";color:#0000C0'>MIN_HEIGHT</span></i><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>) {</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ containerGa.setHeight(</span><i><span lang=EN-US style='font-size:10.0pt;
+ font-family:"Courier New";color:#0000C0'>MIN_HEIGHT</span></i><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ anythingChanged =</span><span lang=EN-US> </span><b><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>true</span></b><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ }</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
+ color:#3F7F5F'>// height of visible rectangle (same as invisible rectangle)</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New";color:#7F0055'>if</span></b><span lang=EN-US> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>(rectangle.getHeight()
+ != containerGa.getHeight()) {</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ rectangle.setHeight(containerGa.getHeight());</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ anythingChanged =</span><span lang=EN-US> </span><b><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>true</span></b><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ }</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
+ color:#3F7F5F'>// width of invisible rectangle</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New";color:#7F0055'>if</span></b><span lang=EN-US> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>(containerGa.getWidth()
+ <</span><span lang=EN-US> </span><i><span lang=EN-US style='font-size:
+ 10.0pt;font-family:"Courier New";color:#0000C0'>MIN_WIDTH</span></i><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>) {</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ containerGa.setWidth(</span><i><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#0000C0'>MIN_WIDTH</span></i><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ anythingChanged =</span><span lang=EN-US> </span><b><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>true</span></b><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ }</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
+ color:#3F7F5F'>// width of visible rectangle (smaller than invisible
+ rectangle)</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New";color:#7F0055'>int</span></b><span lang=EN-US> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>rectangleWidth
+ =</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ containerGa.getWidth()</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ - TutorialEAddClassFeature.</span><i><span lang=EN-US style='font-size:10.0pt;
+ font-family:"Courier New";color:#0000C0'>INVISIBLE_RECT_RIGHT</span></i><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New";color:#7F0055'>if</span></b><span lang=EN-US> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>(rectangle.getWidth()
+ != rectangleWidth) {</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ rectangle.setWidth(rectangleWidth);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ anythingChanged =</span><span lang=EN-US> </span><b><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>true</span></b><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ }</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
+ color:#3F7F5F'>// width of text and line (same as visible rectangle)</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ Iterator iter = containerShape.getChildren().iterator();</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New";color:#7F0055'>while</span></b><span lang=EN-US> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>(iter.hasNext())
+ {</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ Shape shape = (Shape) iter.next();</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ GraphicsAlgorithm graphicsAlgorithm = shape.getGraphicsAlgorithm();</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'>
+ IGaService gaService = Graphiti.getGaService();</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ IDimension size =</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>gaService<span
+ style='color:black'>.<i>calculateSize</i>(graphicsAlgorithm);</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New";color:#7F0055'>if</span></b><span lang=EN-US> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>(rectangleWidth
+ != size.getWidth()) {</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New";color:#7F0055'>if</span></b><span lang=EN-US> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>(graphicsAlgorithm</span><span
+ lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New";color:#7F0055'>instanceof</span></b><span lang=EN-US> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>Polyline)
+ {</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ Polyline polyline = (Polyline) graphicsAlgorithm;</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ Point secondPoint = polyline.getPoints().get(1);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ Point newSecondPoint =</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>gaService<span
+ style='color:black'>.<i>createPoint</i>(rectangleWidth,</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ secondPoint.getY());</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ polyline.getPoints().set(1, newSecondPoint);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ anythingChanged =</span><span lang=EN-US> </span><b><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>true</span></b><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ }</span><span lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;
+ font-family:"Courier New";color:#7F0055'>else</span></b><span lang=EN-US> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>{</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>gaService<span
+ style='color:black'>.<i>setWidthOfGraphicsAlgorithm</i>(graphicsAlgorithm,</span></span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ rectangleWidth);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ anythingChanged =</span><span lang=EN-US> </span><b><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>true</span></b><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>;</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ }</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ }</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ }</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New";color:#7F0055'>return</span></b><span lang=EN-US> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>anythingChanged;</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><span style='font-size:10.0pt;font-family:"Courier New";
+ color:black'>}</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span></p>
+ </td>
+ </tr>
+</table>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
+
+<h2><span lang=EN-US>Test: Create a EClass with Extended Rendering Area</span></h2>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'>Start the editor and
+create a new EClass. Verify that the EClass and its selection-handles look
+similar to the figures above. </span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
+
+<h2><span lang=EN-US>Adjusting the Selection Behavior</span></h2>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'>As you can see above
+the selection-handles of the EClass are around the invisible rectangle.</span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'>This is not a good
+selection-behavior, because the user considers the visible rectangle as the
+‘main’ graphics algorithm and doesn’t care about the extra
+space needed to show the anchor. This also means that when resizing/moving the
+EClass, this should be done on the visible rectangle and not the invisible
+rectangle.</span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'>In the following we
+want to change the selection behavior in a way that the selection-handles
+appear directly around the visible rectangle, as you can see in the following
+figure:</span></p>
+
+<p class=MsoNormal><span style='color:black'><img border=0 width=121 height=71
+src="visio/rendering-area-2c.gif"></span></p>
+
+<p class=MsoCaption><span class=code1><span lang=EN-US style='font-style:normal'>Figure:
+Selection-handles around the visible rectangle</span></span><span lang=EN-US> </span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'>Additionally we want to
+define the visible rectangle as the selection-area, which activates the
+selection when the mouse clicks into it. So a mouse click on the invisible
+rectangle outside the visible rectangle will no longer activate the
+selection. </span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
+
+<p class=MsoNormal><span lang=EN-GB style='color:black'>Selection areas are
+defined in the tool behavior provider.</span></p>
+
+<p class=MsoNormal><span lang=EN-GB style='color:black'>If you didn’t do
+so already you must <b>first create a tool behavior provider and add it to the
+diagram type provider as described <a href="tool-behavior-provider.htm">here</a>.</b></span></p>
+
+<p class=MsoNormal><span lang=EN-GB style='color:black'>The following methods
+of the tool behavior provider must be overwritten:</span></p>
+
+<p class=MsoNormal><span lang=EN-GB style='color:black'>The method <a
+href="file:///\\wdfd00184898a\..\javadoc\com\sap\tc\emf\gfw\tb\IToolBehaviorProvider.html#getSelectionGraphicsAlgorithm(com.sap.tc.emf.gfw.mm.pictograms.PictogramElement)">getSelectionGraphicsAlgorithm</a>
+has to return one graphics algorithm, which defines the selection-handle.</span></p>
+
+<p class=MsoNormal><span lang=EN-GB style='color:black'>The method <a
+href="file:///\\wdfd00184898a\..\javadoc\com\sap\tc\emf\gfw\tb\IToolBehaviorProvider.html#getSelectionArea(com.sap.tc.emf.gfw.mm.pictograms.PictogramElement)">getSelectionArea</a>
+has to return multiple graphics algorithms, which union defines the
+selection-area inside which mouse-clicks activate the selection.</span></p>
+
+<p class=MsoNormal><span lang=EN-GB style='color:black'> </span></p>
+
+<p class=MsoNormal><span lang=EN-GB style='color:black'>In this example we want
+to return the visible rectangle in both methods. </span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
+
+<p class=MsoNormal><span lang=EN-GB style='color:black'>You can see the
+complete implementation of the selection area here:</span></p>
+
+<p class=MsoNormal><span lang=EN-GB style='color:black'> </span></p>
+
+<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=851
+ style='width:18.0cm;border-collapse:collapse'>
+ <tr>
+ <td width=851 valign=top style='width:18.0cm;border:solid windowtext 1.0pt;
+ padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='color:black'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
+ color:#646464'>@Override</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New";color:#7F0055'>public</span></b><span lang=EN-US> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>GraphicsAlgorithm[]
+ getSelectionArea(PictogramElement pe) {</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ IFeatureProvider featureProvider = getFeatureProvider();</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ Object bo = featureProvider.getBusinessObjectForPictogramElement(pe);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New";color:#7F0055'>if</span></b><span lang=EN-US> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>(bo</span><span
+ lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New";color:#7F0055'>instanceof</span></b><span lang=EN-US> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>EClass)
+ {</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ GraphicsAlgorithm invisible = pe.getGraphicsAlgorithm();</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ GraphicsAlgorithm rectangle =</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ invisible.getGraphicsAlgorithmChildren().get(0);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New";color:#7F0055'>return</span></b><span lang=EN-US> </span><b><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>new</span></b><span
+ lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
+ color:black'>GraphicsAlgorithm[] { rectangle };</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ }</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New";color:#7F0055'>return</span></b><span lang=EN-US> </span><b><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>super</span></b><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>.getSelectionArea(pe);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ }</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
+ color:#646464'>@Override</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New";color:#7F0055'>public</span></b><span lang=EN-US> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>GraphicsAlgorithm
+ getSelectionGraphicsAlgorithm(</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ PictogramElement pe) {</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ IFeatureProvider featureProvider = getFeatureProvider();</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ Object bo = featureProvider.getBusinessObjectForPictogramElement(pe);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New";color:#7F0055'>if</span></b><span lang=EN-US> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>(bo</span><span
+ lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New";color:#7F0055'>instanceof</span></b><span lang=EN-US> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>EClass)
+ {</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ GraphicsAlgorithm invisible = pe.getGraphicsAlgorithm();<br>
+
+ EList<GraphicsAlgorithm> graphicsAlgorithmChildren =<br>
+
+ invisible.getGraphicsAlgorithmChildren();</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'>
+ <b><span style='color:purple'>if</span></b>
+ (!graphicsAlgorithmChildren.isEmpty()) {<br>
+
+ <b><span style='color:purple'>return</span></b>
+ graphicsAlgorithmChildren.get(0);<br>
+ }</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'>
+ }</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New";color:#7F0055'>return</span></b><span lang=EN-US> </span><b><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>super</span></b><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>.getSelectionGraphicsAlgorithm(pe);</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
+ lang=EN-US> </span><span style='font-size:10.0pt;font-family:"Courier New";
+ color:black'>}</span></p>
+ <p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
+ font-family:"Courier New"'> </span></p>
+ <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New";color:black'> </span></p>
+ </td>
+ </tr>
+</table>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
+
+<h2><span lang=EN-US>Test: Verify the Adjusted Selection Behavior</span></h2>
+
+<p class=MsoNormal><i><span lang=EN-US style='color:black'>Note</span></i><span
+lang=EN-US style='color:black'>: This change is incompatible with diagrams
+created in earlier stages of the tutorial. You will get an exception, when
+opening these diagrams.</span></p>
+
+<p class=MsoNormal><span lang=EN-US style='color:black'> </span></p>
+
+<p class=MsoNormal><span lang=EN-US>S<span style='color:black'>tart the editor
+and create a new EClass. Click on the visible rectangle and verify that the
+selection-handles are only around the visible rectangle. Click slightly
+right of the visible rectangle on the invisible rectangle and verify that the
+EClass becomes deselected.</span></span></p>
+
+<p class=MsoNormal><span lang=EN-US> </span></p>
+
+<p class=MsoNormal><span lang=EN-GB style='color:black'> </span></p>
+
+<div class=MsoNormal align=center style='text-align:center'>
+
+<hr size=3 width="100%" align=center>
+
</div>
-<hr>
- <a href="http://www.eclipse.org/legal/epl-v10.html" shape="rect">Copyright (c) SAP AG 2005, 2010.</a>
+
+<p class=MsoNormal><a href="http://www.eclipse.org/legal/epl-v10.html"
+shape=rect>Copyright (c) SAP AG 2005, 2010.</a> </p>
+
+</div>
+
</body>
+
</html>
diff --git a/examples/org.eclipse.graphiti.doc/resources/docu/gfw/styles.htm b/examples/org.eclipse.graphiti.doc/resources/docu/gfw/styles.htm
index 677b9c9..8ff9c69 100644
--- a/examples/org.eclipse.graphiti.doc/resources/docu/gfw/styles.htm
+++ b/examples/org.eclipse.graphiti.doc/resources/docu/gfw/styles.htm
@@ -712,16 +712,15 @@
style='color:black'> </span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
- "Courier New";color:#7F0055'>public</span></b><span lang=EN-US> </span><span
- lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>PictogramElement
- add(IAddContext context) {</span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <b><span
+ style='color:#7F0055'>public</span></b> <span style='color:black'>PictogramElement
+ add(IAddContext context) {</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
- color:#3F7F5F'>// ... EXISTING CODING ...</span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// ... EXISTING CODING ...</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>
IGaService gaService = Graphiti.getGaService();</span></p>
@@ -729,36 +728,36 @@
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
- RoundedRectangle roundedRectangle;</span><span lang=EN-US> </span><span
- lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#3F7F5F'>//
- need to access it later</span></p>
+ RoundedRectangle roundedRectangle;</span><span lang=EN-US style='font-size:
+ 10.0pt;font-family:"Courier New"'> <span style='color:#3F7F5F'>// need to
+ access it later</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
{</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
- color:#3F7F5F'>// create invisible outer rectangle expanded by</span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// create invisible outer rectangle expanded by</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
- color:#3F7F5F'>// the width needed for the anchor</span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// the width needed for the anchor</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
Rectangle invisibleRectangle =</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>gaService<span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> gaService<span
style='color:black'>.createInvisibleRectangle(containerShape);</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>gaService<span
- style='color:black'>.setLocationAndSizeOfGraphicsAlgorithm(invisibleRectangle,</span></span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> gaService<span
+ style='color:black'>.setLocationAndSize(invisibleRectangle,</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
- context.getX(), context.getY(), width +</span><span lang=EN-US> </span><i><span
- lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#0000C0'>INVISIBLE_RECT_RIGHT</span></i><span
- lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>,</span></p>
+ context.getX(), context.getY(), width +</span><span lang=EN-US
+ style='font-size:10.0pt;font-family:"Courier New"'> <i><span
+ style='color:#0000C0'>INVISIBLE_RECT_RIGHT</span></i><span style='color:black'>,</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
height);</span></p>
@@ -766,14 +765,15 @@
style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
- color:#3F7F5F'>// create and set visible rectangle inside invisible rectangle</span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// create and set visible rectangle inside invisible
+ rectangle</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
roundedRectangle =</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>gaService<span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> gaService<span
style='color:black'>.createRoundedRectangle(invisibleRectangle, 5, 5);</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
@@ -781,20 +781,17 @@
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
.getStyleForEClass(getDiagram()));</span></p>
- <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>gaService<span
- style='color:black'>.setLocationAndSizeOfGraphicsAlgorithm(roundedRectangle,
- 0,</span></span></p>
- <p class=MsoNormal style='text-autospace:none'><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New";color:black'>
- 0, width, height);</span></p>
+ <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
+ color:black'> </span><span
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> gaService<span
+ style='color:black'>.setLocationAndSize(roundedRectangle, 0,</span> 0, width,
+ height); </span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
- color:#3F7F5F'>// create link and wire it</span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// create link and wire it</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
link(containerShape, addedClass);</span></p>
@@ -805,40 +802,35 @@
style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
- color:#3F7F5F'>// SHAPE WITH LINE</span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// SHAPE WITH LINE</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
{</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
- color:#3F7F5F'>// create shape for line</span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// create shape for line</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
- Shape shape =</span><span lang=EN-US> </span><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New"'>peCreateService<span
- style='color:black'>.createShape(containerShape,</span></span><span
- lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
- "Courier New";color:#7F0055'>false</span></b><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
+ Shape shape =</span><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New"'> peCreateService<span style='color:black'>.createShape(containerShape,</span>
+ <b><span style='color:#7F0055'>false</span></b><span style='color:black'>);</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
- color:#3F7F5F'>// create and set graphics algorithm</span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// create and set graphics algorithm</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
Polyline polyline =</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>gaService<span
- style='color:black'>.createPolyline(shape,</span></span><span lang=EN-US> </span><b><span
- lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>new</span></b><span
- lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
- "Courier New";color:#7F0055'>int</span></b><span lang=EN-US style='font-size:
- 10.0pt;font-family:"Courier New";color:black'>[] { 0, 20, width, 20 });</span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> gaService<span
+ style='color:black'>.createPolyline(shape,</span> <b><span style='color:#7F0055'>new</span></b>
+ <b><span style='color:#7F0055'>int</span></b><span style='color:black'>[] {
+ 0, 20, width, 20 });</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
polyline.setStyle(StyleUtil.<i>getStyleForEClass</i>(getDiagram()));</span></p>
@@ -849,33 +841,30 @@
style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
- color:#3F7F5F'>// SHAPE WITH TEXT</span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// SHAPE WITH TEXT</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
{</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
- color:#3F7F5F'>// create shape for text</span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// create shape for text</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
- Shape shape =</span><span lang=EN-US> </span><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New"'>peCreateService<span
- style='color:black'>.<i>createShape</i>(containerShape,</span></span><span
- lang=EN-US> </span><b><span lang=EN-US style='font-size:10.0pt;font-family:
- "Courier New";color:#7F0055'>false</span></b><span lang=EN-US
- style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
+ Shape shape =</span><span lang=EN-US style='font-size:10.0pt;font-family:
+ "Courier New"'> peCreateService<span style='color:black'>.<i>createShape</i>(containerShape,</span>
+ <b><span style='color:#7F0055'>false</span></b><span style='color:black'>);</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
- color:#3F7F5F'>// create and set text graphics algorithm</span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// create and set text graphics algorithm</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
- Text text =</span><span lang=EN-US> </span><span lang=EN-US style='font-size:
- 10.0pt;font-family:"Courier New"'>gaService<span style='color:black'>.createDefaultText(shape,
+ Text text =</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>
+ gaService<span style='color:black'>.createDefaultText(shape,
addedClass.getName());</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
@@ -897,16 +886,14 @@
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>gaService<span
- style='color:black'>.setLocationAndSizeOfGraphicsAlgorithm(text, 0, 0,<br>
-
- width, 20);</span></span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> gaService<span
+ style='color:black'>.setLocationAndSize(text, 0, 0, width, 20);</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
- color:#3F7F5F'>// create link and wire it</span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// create link and wire it</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
link(shape, addedClass);</span></p>
@@ -914,12 +901,14 @@
style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
- color:#3F7F5F'>// provide information to support direct-editing directly</span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// provide information to support direct-editing
+ directly</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
- color:#3F7F5F'>// after object creation (must be activated additionally)</span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// after object creation (must be activated
+ additionally)</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
IDirectEditingInfo directEditingInfo =</span></p>
@@ -928,20 +917,21 @@
getFeatureProvider().getDirectEditingInfo();</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
- color:#3F7F5F'>// set container shape for direct editing after object
- creation</span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// set container shape for direct editing after object
+ creation</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
directEditingInfo.setMainPictogramElement(containerShape);</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
- color:#3F7F5F'>// set shape and graphics algorithm where the editor for</span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// set shape and graphics algorithm where the editor
+ for</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
- color:#3F7F5F'>// direct editing shall be opened after object creation</span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// direct editing shall be opened after object creation</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>
directEditingInfo.setPictogramElement(shape);</span></p>
@@ -955,14 +945,14 @@
style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
- lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
- color:#3F7F5F'>// ... EXISTING CODING ...</span></p>
+ lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
+ style='color:#3F7F5F'>// ... EXISTING CODING ...</span></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'> </span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
- font-family:"Courier New";color:black'> </span>
- <b><span style='font-size:10.0pt;font-family:"Courier New";color:#7F0055'>return</span></b>
- <span style='font-size:10.0pt;font-family:"Courier New";color:black'>containerShape;</span></p>
+ font-family:"Courier New";color:black'> </span><span
+ style='font-size:10.0pt;font-family:"Courier New"'> <b><span
+ style='color:#7F0055'>return</span></b> <span style='color:black'>containerShape;</span></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
color:black'> }</span></p>
<p class=MsoNormal> </p>
@@ -979,8 +969,8 @@
feature</a>, which allows changing the foreground color or background color of
the style.</span></p>
-<p class=MsoNormal><span lang=EN-GB style='color:black'>The implementation can be
-seen here:</span></p>
+<p class=MsoNormal><span lang=EN-GB style='color:black'>The implementation can
+be seen here:</span></p>
<p class=MsoNormal><span lang=EN-GB style='color:black'> </span></p>
@@ -1170,8 +1160,7 @@
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
- color:#3F7F5F'>// so theoretically it would be possible that canExecute()
- always</span></p>
+ color:#3F7F5F'>// so theoretically it would be possible that canExecute() always</span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
lang=EN-US> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
@@ -1325,8 +1314,8 @@
<p class=MsoNormal><span lang=EN-GB style='color:black'> </span></p>
-<p class=MsoNormal><span lang=EN-GB style='color:black'>Finally the feature provider
-has to deliver our newly created custom feature (overwrite the method</span><span
+<p class=MsoNormal><span lang=EN-GB style='color:black'>Finally the feature
+provider has to deliver our newly created custom feature (overwrite the method</span><span
lang=EN-GB> </span><span class=code1><span lang=EN-US style='color:black'><a
href="../../../javadoc/com/sap/tc/emf/gfw/features/IFeatureProvider.html#getCustomFeatures(com.sap.tc.emf.gfw.features.context.ICustomContext)"><span
style='font-style:normal'>getCustomFeatures</span></a></span></span><span