1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="xcosPalAddBlock" xml:lang="en">
4
<refname>xcosPalAddBlock</refname>
5
<refpurpose>Add a block to a Scilab/Xcos palette instance. Some
6
optional properties can be added to customize the palette icon
7
and the style of the block.
11
<title>Calling Sequence</title>
13
pal = xcosPalAddBlock(pal, block)
14
pal = xcosPalAddBlock(pal, block, pal_block_img)
15
pal = xcosPalAddBlock(pal, block, [], style)
16
pal = xcosPalAddBlock(pal, block, pal_block_img, style)
20
<title>Arguments</title>
25
<para>the palette to update</para>
31
<para>the block to add to the palette</para>
35
<term>pal_block_img:</term>
37
<para>the block icon to use on the palette
38
manager (png, jpg, gif).
45
<para>the style to apply to the block</para>
51
<title>Description</title>
52
<para>This macros add a block instance to a palette. This block
53
parameter can be an instantiated block or a name
54
(interface-function) or a path to a saved instance. Some
55
operations are performed to load this block and check it's
56
availability so it's interface-function must be loaded on
57
Scilab. Some temporary files are also generated without full
60
<para>The optional pal_block_img argument is generated on the
61
<link linkend="TMPDIR">TMPDIR</link>using Scilab graphics if
62
not specified.Be careful that if you use our palette to be
63
persistent you then need to specify it. Otherwise the generated
64
image will be deleted at the end of the Scilab session.
66
<para>The optional style argument allow the user to determine
67
the kind of style to be used by this block. This argument can
69
<link linkend="string">string</link> to an image (svg, png, jpg, gif) or a
70
<link linkend="struct">struct</link>. If it is a string then a
71
default style value is generated and formatted as a style else
72
a struct is wrapped to a key-value jgraphx settings. The
73
<link linkend="jgraphx-style-list">following
76
correspond to jgraphx version 1.4.0.2. These style
77
keys can change with new version of jgraphx without any
81
<variablelist xml:id="jgraphx-style-list">
82
<title>JGraphx style keys</title>
85
<literal>"opacity"</literal>
88
<para>Defines the key for the opacity style. The type
89
of the value is float and the possible range is
90
<literal>0-100</literal>.
96
<literal>"textOpacity"</literal>
99
<para>Defines the key for the text opacity style. The
100
type of the value is float and the possible range is
101
<literal>0-100</literal>.
107
<literal>"overflow"</literal>
110
<para>Defines the key for the overflow style. Possible
112
<literal>"visible"</literal>,
113
<literal>"hidden"</literal>or
114
<literal>"fill"</literal>. The default value is
115
"visible". This value specifies how overlapping vertex
116
labels are handles. A value of "visible" will show the
117
complete label. A value of "hidden" will clip the label
118
so that it does not overlap the vertex bounds. A value
119
of "fill" will use the vertex bounds for the
126
<literal>"orthogonal"</literal>
129
<para>Defines if the connection points on either end of
130
the edge should be computed so that the edge is
131
vertical or horizontal if possible and if the point is
132
not at a fixed location. Default is
133
<literal>false</literal>.
139
<literal>"exitX"</literal>
142
<para>Defines the key for the horizontal relative
143
coordinate connection point of an edge with its source
150
<literal>"exitY"</literal>
153
<para>Defines the key for the vertical relative
154
coordinate connection point of an edge with its source
161
<literal>"exitPerimeter"</literal>
164
<para>Defines if the perimeter should be used to find
165
the exact entry point along the perimeter of the
166
source. The type of the value is
167
<link linkend="boolean">boolean</link>. Default is
168
<literal>true</literal>.
174
<literal>"entryX"</literal>
177
<para>Defines the key for the horizontal relative
178
coordinate connection point of an edge with its target
185
<literal>"entryY"</literal>
188
<para>Defines the key for the vertical relative
189
coordinate connection point of an edge with its target
196
<literal>"entryPerimeter"</literal>
199
<para>Defines if the perimeter should be used to find
200
the exact entry point along the perimeter of the
201
target. The type of the value is
202
<link linkend="boolean">boolean</link>. Default is
203
<literal>true</literal>.
209
<literal>"whiteSpace"</literal>
212
<para>Defines the key for the white-space style.
214
<literal>"nowrap"</literal>and
215
<literal>"wrap"</literal>. The default value is
216
<literal>"nowrap"</literal>. This value specifies how
217
white-space inside a HTML vertex label should be
219
<literal>"nowrap"</literal>means the text will never
220
wrap to the next line until a linefeed is encountered.
222
<literal>"wrap"</literal>means text will wrap when
229
<literal>"rotation"</literal>
232
<para>Defines the key for the rotation style. The type
233
of the value is double and the possible range is
234
<literal>0-360</literal>.
240
<literal>"fillColor"</literal>
243
<para>Defines the key for the fillColor style. The
244
value is a string expression described on the
245
<link linkend="jgraphx-style-color-list">color
254
<literal>"gradientColor"</literal>
257
<para>Defines the key for the gradientColor style. The
258
value is a string expression described on the
259
<link linkend="jgraphx-style-color-list">color
262
.This is ignored if no
263
<literal>"fillColor"</literal>is defined.
269
<literal>"gradientDirection"</literal>
272
<para>Defines the key for the gradient direction. The
273
value is a string expression described on the
274
<link linkend="jgraphx-style-direction-list">direction
278
<literal>"south"</literal>. Generally, and by default,
279
gradient painting is done from the value of
280
<literal>"fillColor"</literal>to the value of
281
<literal>"gradientColor"</literal>. Taking the example
283
<literal>"north"</literal>, this means
284
<literal>"fillColor"</literal>color at the bottom of
286
<literal>"gradientColor"</literal>at top, with a
293
<literal>"strokeColor"</literal>
296
<para>Defines the key for the strokeColor style. The
297
value is a string expression on the
298
<link linkend="jgraphx-style-color-list">color
307
<literal>"separatorColor"</literal>
310
<para>Defines the key for the separatorColor style. The
311
value is a string expression described on the
312
<link linkend="jgraphx-style-color-list">color
315
.This style is only used for
316
<literal>swimlane</literal>shapes.
322
<literal>"strokeWidth"</literal>
325
<para>Defines the key for the strokeWidth style. The
326
type of the value is float and the possible range is
327
any non-negative value. The value reflects the stroke
334
<literal>"align"</literal>
337
<para>Defines the key for the align style. Possible
338
values are described on the
339
<link linkend="jgraphx-style-align-list">alignment
342
.This value defines how the lines of the
343
label are horizontally aligned.
344
<literal>"left"</literal>mean label text lines are
345
aligned to left of the label bounds,
346
<literal>"right"</literal>to the right of the label
348
<literal>"center"</literal>means the center of the text
349
lines are aligned in the center of the label bounds.
350
Note this value does not affect the positioning of the
351
overall label bounds relative to the vertex, to move
352
the label bounds horizontally, use
353
<literal>"labelPosition"</literal>.
359
<literal>"verticalAlign"</literal>
362
<para>Defines the key for the verticalAlign style.
363
Possible values are described on the
364
<link linkend="jgraphx-style-align-list">alignment
367
.This value defines how the lines of the
368
label are vertically aligned.
369
<literal>"top"</literal>means the topmost label text
370
line is aligned against the top of the label bounds,
371
<literal>"bottom"</literal>means the bottom-most label
372
text line is aligned against the bottom of the label
374
<literal>"middle"</literal>means there is equal spacing
375
between the topmost text label line and the top of the
376
label bounds and the bottom-most text label line and
377
the bottom of the label bounds. Note this value does not
378
affect the positioning of the overall label bounds
379
relative to the vertex, to move the label bounds
381
<literal>"verticalLabelPosition"</literal>.
387
<literal>"labelPosition"</literal>
390
<para>Defines the key for the horizontal label position
391
of vertices. Possible values are described on the
392
<link linkend="jgraphx-style-align-list">alignment
396
<literal>"center"</literal>. The label align defines
397
the position of the label relative to the cell.
398
<literal>"left"</literal>means the entire label bounds
399
is placed completely just to the left of the vertex,
400
<literal>"right"</literal>means adjust to the right and
402
<literal>"center"</literal>means the label bounds are
403
vertically aligned with the bounds of the vertex. Note
404
this value does not affect the positioning of label
405
within the label bounds, to move the label horizontally
406
within the label bounds, use
407
<literal>"align"</literal>.
413
<literal>"verticalLabelPosition"</literal>
416
<para>Defines the key for the vertical label position
417
of vertices. Possible values are described on the
418
<link linkend="jgraphx-style-align-list">alignment
422
<literal>"middle"</literal>. The label align defines
423
the position of the label relative to the cell.
424
<literal>"top"</literal>means the entire label bounds
425
is placed completely just on the top of the vertex,
426
<literal>"bottom"</literal>means adjust on the bottom
428
<literal>"middle"</literal>means the label bounds are
429
horizontally aligned with the bounds of the vertex.
430
Note this value does not affect the positioning of label
431
within the label bounds, to move the label vertically
432
within the label bounds, use
433
<literal>"verticalAlign"</literal>.
439
<literal>"imageAlign"</literal>
442
<para>Defines the key for the align style. Possible
443
values are described on the
444
<link linkend="jgraphx-style-align-list">alignment
447
.The value defines how any image in the
448
vertex label is aligned horizontally within the label
450
<literal>"label"</literal>shape.
456
<literal>"imageVerticalAlign"</literal>
459
<para>Defines the key for the verticalAlign style.
460
Possible values are described on the
461
<link linkend="jgraphx-style-align-list">alignment
464
.The value defines how any image in the
465
vertex label is aligned vertically within the label
467
<literal>"label"</literal>shape.
473
<literal>"image"</literal>
476
<para>Defines the key for the image style. Possible
477
values are any image URL, the type of the value is
478
String. This is the path to the image to image that is
479
to be displayed within the label of a vertex.
485
<literal>"imageWidth"</literal>
488
<para>Defines the key for the imageWidth style. The
489
type of this value is int, the value is the image width
490
in pixels and must be greated than
491
<literal>0</literal>.
497
<literal>"imageHeight"</literal>
500
<para>Defines the key for the imageHeight style The
501
type of this value is int, the value is the image
502
height in pixels and must be greater than
503
<literal>0</literal>.
509
<literal>"noLabel"</literal>
512
<para>Defines the key for the noLabel style. If this is
514
<literal>true</literal>then no label is visible for a
515
given cell. The type of the value is
516
<link linkend="boolean">boolean</link>. Default is
517
<literal>false</literal>.
523
<literal>"noEdgeStyle"</literal>
526
<para>Defines the key for the noEdgeStyle style. If
528
<literal>true</literal>then no edge style is applied
529
for a given edge. The type of the value is
530
<link linkend="boolean">boolean</link>. Default is
531
<literal>false</literal>.
537
<literal>"labelBackgroundColor"</literal>
540
<para>Defines the key for the label background color.
541
The value is a string expression described on the
542
<link linkend="jgraphx-style-color-list">color
551
<literal>"labelBorderColor"</literal>
554
<para>Defines the key for the label border color. The
555
value is a string expression described on the
556
<link linkend="jgraphx-style-color-list">color
565
<literal>"indicatorShape"</literal>
568
<para>Defines the key for the indicatorShape style.
569
Possible values are described on the
570
<link linkend="jgraphx-style-shape-list">shape
579
<literal>"indicatorImage"</literal>
582
<para>Defines the key for the indicatorImage style.
583
Possible values are any image URL, the type of the
590
<literal>"indicatorColor"</literal>
593
<para>Defines the key for the indicatorColor style. The
594
value is a string expression described below.
600
<literal>"indicatorGradientColor"</literal>
603
<para>Defines the key for the indicatorGradientColor
604
style. The value is a string expression described on
606
<link linkend="jgraphx-style-color-list">color
609
.This style is only supported in
610
<literal>shape</literal>shapes.
616
<literal>"indicatorSpacing"</literal>
619
<para>Defines the key for the indicatorSpacing style
626
<literal>"indicatorWidth"</literal>
629
<para>Defines the key for the indicatorWidth style (in
636
<literal>"indicatorHeight"</literal>
639
<para>Defines the key for the indicatorHeight style (in
646
<literal>"shadow"</literal>
649
<para>Defines the key for the shadow style. The type of
651
<link linkend="boolean">boolean</link>. This style
652
applies to vertices and arrow style edges.
658
<literal>"endArrow"</literal>
661
<para>Defines the key for the endArrow style. Possible
662
values are described on the
663
<link linkend="jgraphx-style-arrow-list">arrow
672
<literal>"startArrow"</literal>
675
<para>Defines the key for the startArrow style.
676
Possible values are described on the
677
<link linkend="jgraphx-style-arrow-list">arrow
686
<literal>"endSize"</literal>
689
<para>Defines the key for the endSize style. The type
690
of this value is float and the value represents the
691
size of the end marker in pixels.
697
<literal>"startSize"</literal>
700
<para>Defines the key for the startSize style. The type
701
of this value is float and the value represents the
702
size of the start marker or the size of the swimlane
703
title region depending on the shape it is used
710
<literal>"dashed"</literal>
713
<para>Defines the key for the dashed style. The type of
715
<link linkend="boolean">boolean</link>and the value
716
determines whether or not an edge or border is drawn
717
with a dashed pattern along the line.
723
<literal>"rounded"</literal>
726
<para>Defines the key for the rounded style. The type
728
<link linkend="boolean">boolean</link>. For edges this
729
determines whether or not joins between edges segments
730
are smoothed to a rounded finish. For vertices that
731
have the rectangle shape, this determines whether or
732
not the rectangle is rounded.
738
<literal>"sourcePerimeterSpacing"</literal>
741
<para>Defines the key for the source perimeter spacing.
742
The type of this value is double. This is the distance
743
between the source connection point of an edge and the
744
perimeter of the source vertex in pixels. This style
745
only applies to edges.
751
<literal>"targetPerimeterSpacing"</literal>
754
<para>Defines the key for the target perimeter spacing.
755
The type of this value is double. This is the distance
756
between the target connection point of an edge and the
757
perimeter of the target vertex in pixels. This style
758
only applies to edges.
764
<literal>"perimeterSpacing"</literal>
767
<para>Defines the key for the perimeter spacing. This
768
is the distance between the connection point and the
769
perimeter in pixels. When used in a vertex style, this
770
applies to all incoming edges to floating ports (edges
771
that terminate on the perimeter of the vertex). When
772
used in an edge style, this spacing applies to the
773
source and target separately, if they terminate in
774
floating ports (on the perimeter of the vertex).
780
<literal>"spacing"</literal>
783
<para>Defines the key for the spacing. The value
784
represents the spacing, in pixels, added to each side
785
of a label in a vertex (style applies to vertices
792
<literal>"spacingTop"</literal>
795
<para>Defines the key for the spacingTop style. The
796
value represents the spacing, in pixels, added to the
797
top side of a label in a vertex (style applies to
804
<literal>"spacingLeft"</literal>
807
<para>Defines the key for the spacingLeft style. The
808
value represents the spacing, in pixels, added to the
809
left side of a label in a vertex (style applies to
816
<literal>"spacingBottom"</literal>
819
<para>Defines the key for the spacingBottom style The
820
value represents the spacing, in pixels, added to the
821
bottom side of a label in a vertex (style applies to
828
<literal>"spacingRight"</literal>
831
<para>Defines the key for the spacingRight style The
832
value represents the spacing, in pixels, added to the
833
right side of a label in a vertex (style applies to
840
<literal>"horizontal"</literal>
843
<para>Defines the key for the horizontal style. The
844
type of this value is
845
<link linkend="boolean">boolean</link>. This value only
846
applies to vertices. If the
847
<literal>"shape"</literal>is
848
<literal>"swimlane"</literal>a value of
849
<literal>false</literal>indicates that the swimlane
850
should be drawn vertically,
851
<literal>true</literal>indicates to draw it
852
horizontally. If the shape style does not indicate that
853
this vertex is a swimlane, this value affects only
854
whether the label is drawn horizontally or
861
<literal>"direction"</literal>
864
<para>Defines the key for the direction style. The
865
direction style is used to specify the direction of
866
certain shapes. Possible values are described on the
867
<link linkend="jgraphx-style-direction-list">direction
870
.This value only applies to
877
<literal>"elbow"</literal>
880
<para>Defines the key for the elbow style. Possible
882
<literal>"horizontal"</literal>and
883
<literal>"vertical"</literal>. Default is
884
<literal>"horizontal"</literal>. This defines how the
885
three segment orthogonal edge style leaves its terminal
886
vertices. The vertical style leaves the terminal
887
vertices at the top and bottom sides.
893
<literal>"fontColor"</literal>
896
<para>Defines the key for the fontColor style. The
897
value is type String and of the expression described
904
<literal>"fontFamily"</literal>
907
<para>Defines the key for the fontFamily style.
908
Possible values are names such as
909
<literal>Arial</literal>;
910
<literal>Dialog</literal>;
911
<literal>Verdana</literal>;
912
<literal>Times New Roman</literal>. The value is of
919
<literal>"fontSize"</literal>
922
<para>Defines the key for the fontSize style (in
923
points). The type of the value is int.
929
<literal>"fontStyle"</literal>
932
<para>Defines the key for the fontStyle style. Values
933
may be any logical AND (sum) of values on the
934
<link linkend="jgraphx-style-font-table">font style
937
.The type of the value is int.
943
<literal>"shape"</literal>
946
<para>Defines the key for the shape style. Possible
948
<link linkend="jgraphx-style-shape-list">shape
957
<literal>"routingCenterX"</literal>
960
<para>Defines the key for the horizontal routing
961
center. Possible values are between -0.5 and 0.5. This
962
is the relative offset from the center used for
963
connecting edges. The type of this value is
970
<literal>"routingCenterY"</literal>
973
<para>Defines the key for the vertical routing center.
974
Possible values are between -0.5 and 0.5. This is the
975
relative offset from the center used for connecting
976
edges. The type of this value is float;
983
<itemizedlist xml:id="jgraphx-style-align-list">
984
<title>JGraphx alignment values</title>
987
<literal>"left"</literal>- horizontal alignment
992
<literal>"center"</literal>- horizontal alignment
997
<literal>"right"</literal>- horizontal alignment
1002
<literal>"top"</literal>- vertical alignment
1007
<literal>"middle"</literal>- vertical alignment
1012
<literal>"bottom"</literal>- vertical alignment
1016
<itemizedlist xml:id="jgraphx-style-arrow-list">
1017
<title>JGraphx arrow values</title>
1020
<literal>"classic"</literal>
1025
<literal>"block"</literal>
1030
<literal>"oval"</literal>
1035
<literal>"diamond"</literal>
1039
<itemizedlist xml:id="jgraphx-style-shape-list">
1040
<title>JGraphx shape values</title>
1043
<literal>"rectangle"</literal>
1048
<literal>"ellipse"</literal>
1053
<literal>"doubleEllipse"</literal>
1058
<literal>"rhombus"</literal>
1063
<literal>"line"</literal>
1068
<literal>"image"</literal>
1073
<literal>"arrow"</literal>
1078
<literal>"curve"</literal>
1083
<literal>"label"</literal>
1088
<literal>"cylinder"</literal>
1093
<literal>"swimlane"</literal>
1098
<literal>"connector"</literal>
1103
<literal>"actor"</literal>
1108
<literal>"cloud"</literal>
1113
<literal>"triangle"</literal>
1118
<literal>"hexagon"</literal>
1122
<itemizedlist xml:id="jgraphx-style-color-list">
1123
<title>JGraphx valid color values</title>
1125
<para>Web notation colors -
1126
<literal>"#E1E1E1"</literal>for example
1130
<para>Java parseable colors - int values as RGB or sRGB
1136
<literal>"white"</literal>
1141
<literal>"black"</literal>
1146
<literal>"red"</literal>
1151
<literal>"green"</literal>
1156
<literal>"blue"</literal>
1161
<literal>"orange"</literal>
1166
<literal>"yellow"</literal>
1171
<literal>"pink"</literal>
1176
<literal>"turquoise"</literal>
1181
<literal>"gray"</literal>
1185
<itemizedlist xml:id="jgraphx-style-direction-list">
1186
<title>JGraphx direction values</title>
1189
<literal>"north"</literal>
1194
<literal>"south"</literal>
1199
<literal>"east"</literal>
1204
<literal>"west"</literal>
1208
<itemizedlist xml:id="jgraphx-style-font-table">
1209
<title>JGraphx font modifier values</title>
1212
<literal>1</literal>
1217
<literal>2</literal>
1222
<literal>4</literal>
1227
<literal>8</literal>
1235
<title>Examples</title>
1237
<programlisting role="example"><![CDATA[
4
<refname>xcosPalAddBlock</refname>
5
<refpurpose>Add a block to a Scilab/Xcos palette instance. Some
6
optional properties can be added to customize the palette icon
7
and the style of the block.
11
<title>Calling Sequence</title>
13
pal = xcosPalAddBlock(pal, block)
14
pal = xcosPalAddBlock(pal, block, pal_block_img)
15
pal = xcosPalAddBlock(pal, block, [], style)
16
pal = xcosPalAddBlock(pal, block, pal_block_img, style)
20
<title>Arguments</title>
25
<para>the palette to update</para>
31
<para>the block to add to the palette</para>
35
<term>pal_block_img:</term>
37
<para>the block icon to use on the palette
38
manager (png, jpg, gif).
45
<para>the style to apply to the block</para>
51
<title>Description</title>
52
<para>This macros add a block instance to a palette. This block
53
parameter can be an instantiated block or a name
54
(interface-function) or a path to a saved instance. Some
55
operations are performed to load this block and check it's
56
availability so it's interface-function must be loaded on
57
Scilab. Some temporary files are also generated without full
60
<para>The optional pal_block_img argument is generated on the
61
<link linkend="TMPDIR">TMPDIR</link>using Scilab graphics if
62
not specified.Be careful that if you use our palette to be
63
persistent you then need to specify it. Otherwise the generated
64
image will be deleted at the end of the Scilab session.
66
<para>The optional style argument allow the user to determine
67
the kind of style to be used by this block. This argument can
69
<link linkend="string">string</link> to an image (svg, png, jpg, gif) or a
70
<link linkend="struct">struct</link>. If it is a string then a
71
default style value is generated and formatted as a style else
72
a struct is wrapped to a key-value jgraphx settings. The
73
<link linkend="jgraphx-style-list">following
76
correspond to jgraphx version 1.4.0.2. These style
77
keys can change with new version of jgraphx without any
81
<variablelist xml:id="jgraphx-style-list">
82
<title>JGraphx style keys</title>
85
<literal>"opacity"</literal>
88
<para>Defines the key for the opacity style. The type
89
of the value is float and the possible range is
90
<literal>0-100</literal>.
96
<literal>"textOpacity"</literal>
99
<para>Defines the key for the text opacity style. The
100
type of the value is float and the possible range is
101
<literal>0-100</literal>.
107
<literal>"overflow"</literal>
110
<para>Defines the key for the overflow style. Possible
112
<literal>"visible"</literal>,
113
<literal>"hidden"</literal>or
114
<literal>"fill"</literal>. The default value is
115
"visible". This value specifies how overlapping vertex
116
labels are handles. A value of "visible" will show the
117
complete label. A value of "hidden" will clip the label
118
so that it does not overlap the vertex bounds. A value
119
of "fill" will use the vertex bounds for the
126
<literal>"orthogonal"</literal>
129
<para>Defines if the connection points on either end of
130
the edge should be computed so that the edge is
131
vertical or horizontal if possible and if the point is
132
not at a fixed location. Default is
133
<literal>false</literal>.
139
<literal>"exitX"</literal>
142
<para>Defines the key for the horizontal relative
143
coordinate connection point of an edge with its source
150
<literal>"exitY"</literal>
153
<para>Defines the key for the vertical relative
154
coordinate connection point of an edge with its source
161
<literal>"exitPerimeter"</literal>
164
<para>Defines if the perimeter should be used to find
165
the exact entry point along the perimeter of the
166
source. The type of the value is
167
<link linkend="boolean">boolean</link>. Default is
168
<literal>true</literal>.
174
<literal>"entryX"</literal>
177
<para>Defines the key for the horizontal relative
178
coordinate connection point of an edge with its target
185
<literal>"entryY"</literal>
188
<para>Defines the key for the vertical relative
189
coordinate connection point of an edge with its target
196
<literal>"entryPerimeter"</literal>
199
<para>Defines if the perimeter should be used to find
200
the exact entry point along the perimeter of the
201
target. The type of the value is
202
<link linkend="boolean">boolean</link>. Default is
203
<literal>true</literal>.
209
<literal>"whiteSpace"</literal>
212
<para>Defines the key for the white-space style.
214
<literal>"nowrap"</literal>and
215
<literal>"wrap"</literal>. The default value is
216
<literal>"nowrap"</literal>. This value specifies how
217
white-space inside a HTML vertex label should be
219
<literal>"nowrap"</literal>means the text will never
220
wrap to the next line until a linefeed is encountered.
222
<literal>"wrap"</literal>means text will wrap when
229
<literal>"rotation"</literal>
232
<para>Defines the key for the rotation style. The type
233
of the value is double and the possible range is
234
<literal>0-360</literal>.
240
<literal>"fillColor"</literal>
243
<para>Defines the key for the fillColor style. The
244
value is a string expression described on the
245
<link linkend="jgraphx-style-color-list">color
254
<literal>"gradientColor"</literal>
257
<para>Defines the key for the gradientColor style. The
258
value is a string expression described on the
259
<link linkend="jgraphx-style-color-list">color
262
.This is ignored if no
263
<literal>"fillColor"</literal>is defined.
269
<literal>"gradientDirection"</literal>
272
<para>Defines the key for the gradient direction. The
273
value is a string expression described on the
274
<link linkend="jgraphx-style-direction-list">direction
278
<literal>"south"</literal>. Generally, and by default,
279
gradient painting is done from the value of
280
<literal>"fillColor"</literal>to the value of
281
<literal>"gradientColor"</literal>. Taking the example
283
<literal>"north"</literal>, this means
284
<literal>"fillColor"</literal>color at the bottom of
286
<literal>"gradientColor"</literal>at top, with a
293
<literal>"strokeColor"</literal>
296
<para>Defines the key for the strokeColor style. The
297
value is a string expression on the
298
<link linkend="jgraphx-style-color-list">color
307
<literal>"separatorColor"</literal>
310
<para>Defines the key for the separatorColor style. The
311
value is a string expression described on the
312
<link linkend="jgraphx-style-color-list">color
315
.This style is only used for
316
<literal>swimlane</literal>shapes.
322
<literal>"strokeWidth"</literal>
325
<para>Defines the key for the strokeWidth style. The
326
type of the value is float and the possible range is
327
any non-negative value. The value reflects the stroke
334
<literal>"align"</literal>
337
<para>Defines the key for the align style. Possible
338
values are described on the
339
<link linkend="jgraphx-style-align-list">alignment
342
.This value defines how the lines of the
343
label are horizontally aligned.
344
<literal>"left"</literal>mean label text lines are
345
aligned to left of the label bounds,
346
<literal>"right"</literal>to the right of the label
348
<literal>"center"</literal>means the center of the text
349
lines are aligned in the center of the label bounds.
350
Note this value does not affect the positioning of the
351
overall label bounds relative to the vertex, to move
352
the label bounds horizontally, use
353
<literal>"labelPosition"</literal>.
359
<literal>"verticalAlign"</literal>
362
<para>Defines the key for the verticalAlign style.
363
Possible values are described on the
364
<link linkend="jgraphx-style-align-list">alignment
367
.This value defines how the lines of the
368
label are vertically aligned.
369
<literal>"top"</literal>means the topmost label text
370
line is aligned against the top of the label bounds,
371
<literal>"bottom"</literal>means the bottom-most label
372
text line is aligned against the bottom of the label
374
<literal>"middle"</literal>means there is equal spacing
375
between the topmost text label line and the top of the
376
label bounds and the bottom-most text label line and
377
the bottom of the label bounds. Note this value does not
378
affect the positioning of the overall label bounds
379
relative to the vertex, to move the label bounds
381
<literal>"verticalLabelPosition"</literal>.
387
<literal>"labelPosition"</literal>
390
<para>Defines the key for the horizontal label position
391
of vertices. Possible values are described on the
392
<link linkend="jgraphx-style-align-list">alignment
396
<literal>"center"</literal>. The label align defines
397
the position of the label relative to the cell.
398
<literal>"left"</literal>means the entire label bounds
399
is placed completely just to the left of the vertex,
400
<literal>"right"</literal>means adjust to the right and
402
<literal>"center"</literal>means the label bounds are
403
vertically aligned with the bounds of the vertex. Note
404
this value does not affect the positioning of label
405
within the label bounds, to move the label horizontally
406
within the label bounds, use
407
<literal>"align"</literal>.
413
<literal>"verticalLabelPosition"</literal>
416
<para>Defines the key for the vertical label position
417
of vertices. Possible values are described on the
418
<link linkend="jgraphx-style-align-list">alignment
422
<literal>"middle"</literal>. The label align defines
423
the position of the label relative to the cell.
424
<literal>"top"</literal>means the entire label bounds
425
is placed completely just on the top of the vertex,
426
<literal>"bottom"</literal>means adjust on the bottom
428
<literal>"middle"</literal>means the label bounds are
429
horizontally aligned with the bounds of the vertex.
430
Note this value does not affect the positioning of label
431
within the label bounds, to move the label vertically
432
within the label bounds, use
433
<literal>"verticalAlign"</literal>.
439
<literal>"imageAlign"</literal>
442
<para>Defines the key for the align style. Possible
443
values are described on the
444
<link linkend="jgraphx-style-align-list">alignment
447
.The value defines how any image in the
448
vertex label is aligned horizontally within the label
450
<literal>"label"</literal>shape.
456
<literal>"imageVerticalAlign"</literal>
459
<para>Defines the key for the verticalAlign style.
460
Possible values are described on the
461
<link linkend="jgraphx-style-align-list">alignment
464
.The value defines how any image in the
465
vertex label is aligned vertically within the label
467
<literal>"label"</literal>shape.
473
<literal>"image"</literal>
476
<para>Defines the key for the image style. Possible
477
values are any image URL, the type of the value is
478
String. This is the path to the image to image that is
479
to be displayed within the label of a vertex.
485
<literal>"imageWidth"</literal>
488
<para>Defines the key for the imageWidth style. The
489
type of this value is int, the value is the image width
490
in pixels and must be greated than
491
<literal>0</literal>.
497
<literal>"imageHeight"</literal>
500
<para>Defines the key for the imageHeight style The
501
type of this value is int, the value is the image
502
height in pixels and must be greater than
503
<literal>0</literal>.
509
<literal>"noLabel"</literal>
512
<para>Defines the key for the noLabel style. If this is
514
<literal>true</literal>then no label is visible for a
515
given cell. The type of the value is
516
<link linkend="boolean">boolean</link>. Default is
517
<literal>false</literal>.
523
<literal>"noEdgeStyle"</literal>
526
<para>Defines the key for the noEdgeStyle style. If
528
<literal>true</literal>then no edge style is applied
529
for a given edge. The type of the value is
530
<link linkend="boolean">boolean</link>. Default is
531
<literal>false</literal>.
537
<literal>"labelBackgroundColor"</literal>
540
<para>Defines the key for the label background color.
541
The value is a string expression described on the
542
<link linkend="jgraphx-style-color-list">color
551
<literal>"labelBorderColor"</literal>
554
<para>Defines the key for the label border color. The
555
value is a string expression described on the
556
<link linkend="jgraphx-style-color-list">color
565
<literal>"indicatorShape"</literal>
568
<para>Defines the key for the indicatorShape style.
569
Possible values are described on the
570
<link linkend="jgraphx-style-shape-list">shape
579
<literal>"indicatorImage"</literal>
582
<para>Defines the key for the indicatorImage style.
583
Possible values are any image URL, the type of the
590
<literal>"indicatorColor"</literal>
593
<para>Defines the key for the indicatorColor style. The
594
value is a string expression described below.
600
<literal>"indicatorGradientColor"</literal>
603
<para>Defines the key for the indicatorGradientColor
604
style. The value is a string expression described on
606
<link linkend="jgraphx-style-color-list">color
609
.This style is only supported in
610
<literal>shape</literal>shapes.
616
<literal>"indicatorSpacing"</literal>
619
<para>Defines the key for the indicatorSpacing style
626
<literal>"indicatorWidth"</literal>
629
<para>Defines the key for the indicatorWidth style (in
636
<literal>"indicatorHeight"</literal>
639
<para>Defines the key for the indicatorHeight style (in
646
<literal>"shadow"</literal>
649
<para>Defines the key for the shadow style. The type of
651
<link linkend="boolean">boolean</link>. This style
652
applies to vertices and arrow style edges.
658
<literal>"endArrow"</literal>
661
<para>Defines the key for the endArrow style. Possible
662
values are described on the
663
<link linkend="jgraphx-style-arrow-list">arrow
672
<literal>"startArrow"</literal>
675
<para>Defines the key for the startArrow style.
676
Possible values are described on the
677
<link linkend="jgraphx-style-arrow-list">arrow
686
<literal>"endSize"</literal>
689
<para>Defines the key for the endSize style. The type
690
of this value is float and the value represents the
691
size of the end marker in pixels.
697
<literal>"startSize"</literal>
700
<para>Defines the key for the startSize style. The type
701
of this value is float and the value represents the
702
size of the start marker or the size of the swimlane
703
title region depending on the shape it is used
710
<literal>"dashed"</literal>
713
<para>Defines the key for the dashed style. The type of
715
<link linkend="boolean">boolean</link>and the value
716
determines whether or not an edge or border is drawn
717
with a dashed pattern along the line.
723
<literal>"rounded"</literal>
726
<para>Defines the key for the rounded style. The type
728
<link linkend="boolean">boolean</link>. For edges this
729
determines whether or not joins between edges segments
730
are smoothed to a rounded finish. For vertices that
731
have the rectangle shape, this determines whether or
732
not the rectangle is rounded.
738
<literal>"sourcePerimeterSpacing"</literal>
741
<para>Defines the key for the source perimeter spacing.
742
The type of this value is double. This is the distance
743
between the source connection point of an edge and the
744
perimeter of the source vertex in pixels. This style
745
only applies to edges.
751
<literal>"targetPerimeterSpacing"</literal>
754
<para>Defines the key for the target perimeter spacing.
755
The type of this value is double. This is the distance
756
between the target connection point of an edge and the
757
perimeter of the target vertex in pixels. This style
758
only applies to edges.
764
<literal>"perimeterSpacing"</literal>
767
<para>Defines the key for the perimeter spacing. This
768
is the distance between the connection point and the
769
perimeter in pixels. When used in a vertex style, this
770
applies to all incoming edges to floating ports (edges
771
that terminate on the perimeter of the vertex). When
772
used in an edge style, this spacing applies to the
773
source and target separately, if they terminate in
774
floating ports (on the perimeter of the vertex).
780
<literal>"spacing"</literal>
783
<para>Defines the key for the spacing. The value
784
represents the spacing, in pixels, added to each side
785
of a label in a vertex (style applies to vertices
792
<literal>"spacingTop"</literal>
795
<para>Defines the key for the spacingTop style. The
796
value represents the spacing, in pixels, added to the
797
top side of a label in a vertex (style applies to
804
<literal>"spacingLeft"</literal>
807
<para>Defines the key for the spacingLeft style. The
808
value represents the spacing, in pixels, added to the
809
left side of a label in a vertex (style applies to
816
<literal>"spacingBottom"</literal>
819
<para>Defines the key for the spacingBottom style The
820
value represents the spacing, in pixels, added to the
821
bottom side of a label in a vertex (style applies to
828
<literal>"spacingRight"</literal>
831
<para>Defines the key for the spacingRight style The
832
value represents the spacing, in pixels, added to the
833
right side of a label in a vertex (style applies to
840
<literal>"horizontal"</literal>
843
<para>Defines the key for the horizontal style. The
844
type of this value is
845
<link linkend="boolean">boolean</link>. This value only
846
applies to vertices. If the
847
<literal>"shape"</literal>is
848
<literal>"swimlane"</literal>a value of
849
<literal>false</literal>indicates that the swimlane
850
should be drawn vertically,
851
<literal>true</literal>indicates to draw it
852
horizontally. If the shape style does not indicate that
853
this vertex is a swimlane, this value affects only
854
whether the label is drawn horizontally or
861
<literal>"direction"</literal>
864
<para>Defines the key for the direction style. The
865
direction style is used to specify the direction of
866
certain shapes. Possible values are described on the
867
<link linkend="jgraphx-style-direction-list">direction
870
.This value only applies to
877
<literal>"elbow"</literal>
880
<para>Defines the key for the elbow style. Possible
882
<literal>"horizontal"</literal>and
883
<literal>"vertical"</literal>. Default is
884
<literal>"horizontal"</literal>. This defines how the
885
three segment orthogonal edge style leaves its terminal
886
vertices. The vertical style leaves the terminal
887
vertices at the top and bottom sides.
893
<literal>"fontColor"</literal>
896
<para>Defines the key for the fontColor style. The
897
value is type String and of the expression described
904
<literal>"fontFamily"</literal>
907
<para>Defines the key for the fontFamily style.
908
Possible values are names such as
909
<literal>Arial</literal>;
910
<literal>Dialog</literal>;
911
<literal>Verdana</literal>;
912
<literal>Times New Roman</literal>. The value is of
919
<literal>"fontSize"</literal>
922
<para>Defines the key for the fontSize style (in
923
points). The type of the value is int.
929
<literal>"fontStyle"</literal>
932
<para>Defines the key for the fontStyle style. Values
933
may be any logical AND (sum) of values on the
934
<link linkend="jgraphx-style-font-table">font style
937
.The type of the value is int.
943
<literal>"shape"</literal>
946
<para>Defines the key for the shape style. Possible
948
<link linkend="jgraphx-style-shape-list">shape
957
<literal>"routingCenterX"</literal>
960
<para>Defines the key for the horizontal routing
961
center. Possible values are between -0.5 and 0.5. This
962
is the relative offset from the center used for
963
connecting edges. The type of this value is
970
<literal>"routingCenterY"</literal>
973
<para>Defines the key for the vertical routing center.
974
Possible values are between -0.5 and 0.5. This is the
975
relative offset from the center used for connecting
976
edges. The type of this value is float;
983
<itemizedlist xml:id="jgraphx-style-align-list">
984
<title>JGraphx alignment values</title>
987
<literal>"left"</literal>- horizontal alignment
992
<literal>"center"</literal>- horizontal alignment
997
<literal>"right"</literal>- horizontal alignment
1002
<literal>"top"</literal>- vertical alignment
1007
<literal>"middle"</literal>- vertical alignment
1012
<literal>"bottom"</literal>- vertical alignment
1016
<itemizedlist xml:id="jgraphx-style-arrow-list">
1017
<title>JGraphx arrow values</title>
1020
<literal>"classic"</literal>
1025
<literal>"block"</literal>
1030
<literal>"oval"</literal>
1035
<literal>"diamond"</literal>
1039
<itemizedlist xml:id="jgraphx-style-shape-list">
1040
<title>JGraphx shape values</title>
1043
<literal>"rectangle"</literal>
1048
<literal>"ellipse"</literal>
1053
<literal>"doubleEllipse"</literal>
1058
<literal>"rhombus"</literal>
1063
<literal>"line"</literal>
1068
<literal>"image"</literal>
1073
<literal>"arrow"</literal>
1078
<literal>"curve"</literal>
1083
<literal>"label"</literal>
1088
<literal>"cylinder"</literal>
1093
<literal>"swimlane"</literal>
1098
<literal>"connector"</literal>
1103
<literal>"actor"</literal>
1108
<literal>"cloud"</literal>
1113
<literal>"triangle"</literal>
1118
<literal>"hexagon"</literal>
1122
<itemizedlist xml:id="jgraphx-style-color-list">
1123
<title>JGraphx valid color values</title>
1125
<para>Web notation colors -
1126
<literal>"#E1E1E1"</literal>for example
1130
<para>Java parseable colors - int values as RGB or sRGB
1136
<literal>"white"</literal>
1141
<literal>"black"</literal>
1146
<literal>"red"</literal>
1151
<literal>"green"</literal>
1156
<literal>"blue"</literal>
1161
<literal>"orange"</literal>
1166
<literal>"yellow"</literal>
1171
<literal>"pink"</literal>
1176
<literal>"turquoise"</literal>
1181
<literal>"gray"</literal>
1185
<itemizedlist xml:id="jgraphx-style-direction-list">
1186
<title>JGraphx direction values</title>
1189
<literal>"north"</literal>
1194
<literal>"south"</literal>
1199
<literal>"east"</literal>
1204
<literal>"west"</literal>
1208
<itemizedlist xml:id="jgraphx-style-font-table">
1209
<title>JGraphx font modifier values</title>
1212
<literal>1</literal>
1217
<literal>2</literal>
1222
<literal>4</literal>
1227
<literal>8</literal>
1235
<title>Examples</title>
1237
<programlisting role="example"><![CDATA[
1238
1238
loadXcosLibs();
1239
1239
pal = xcosPal();