GroupAlignmentサンプル1
整列方向(Vector属性)に関するサンプルです。
- ①Vector="none"指定の場合、GroupAlignmentに含まれる各要素は座標どおりに表示されます。
(例:Group1、2) - ②Vector="vertical"指定の場合、GroupAlignmentに含まれる各要素はページレイアウト情報が解析される順に
上から下へ整列されます。(例:Group3、4) - ③Vector="horizon"指定の場合、GroupAlignmentに含まれる各要素はページレイアウト情報が解析される順に
左から右へ整列されます。 (例:Group5、6)
GroupAlignmentサンプル1
(『<biz-Stream_home>/sample/xml/GroupAlignment/GroupAlignmentSample1.xml
』)
<?xml version="1.0" encoding="UTF-8"?> <!-- XML file created by biz-Stream Designer --> <!-- biz-Stream Copyright BrainSellers.com Corp. --> <Layout Name="GroupAlignmentSample1" Width="140" Height="140" X="10" Y="10" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:bs="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" xmlns:pdf="http://www.brainsellers.com/schema" version="5.0.0"> <!-- (1)Group1 --> <Square Width="45" Height="25" LineColor="14,0,176" LineStyle="Solid"/> <GroupAlignment Name="Group1" Width="45" Height="25" Horizon="left" Vertical="bottom" Vector="none" Narrow="size"> <Square Name="square1" Width="25" Height="5" X="0" Y="0" FillColor="255,0,0" LineStyle="Solid"/> <Square Name="square2" Width="25" Height="5" X="10" Y="10" FillColor="0,255,0" LineStyle="Solid"/> <Square Name="square3" Width="25" Height="5" X="20" Y="20" FillColor="0,0,255" LineStyle="Solid"/> </GroupAlignment> <!-- (2)Group2 --> <Square Width="45" Height="25" X="60" LineColor="14,0,176" LineStyle="Solid"/> <GroupAlignment Name="Group2" Width="45" Height="25" X="60" Horizon="left" Vertical="bottom" Vector="none" Narrow="size"> <Square Name="square1" Width="25" Height="5" FillColor="255,0,0" LineStyle="Solid"/> <Square Name="square2" Width="25" Height="5" FillColor="0,255,0" LineStyle="Solid"/> <Square Name="square3" Width="25" Height="5" FillColor="0,0,255" LineStyle="Solid"/> </GroupAlignment> <!-- (3)Group3 --> <Square Width="45" Height="25" Y="40" LineColor="14,0,176" LineStyle="Solid"/> <GroupAlignment Name="Group3" Width="45" Height="25" Y="40" Horizon="left" Vertical="bottom" Vector="vertical" Narrow="size"> <Square Name="square1" Width="25" Height="5" FillColor="255,0,0" LineStyle="Solid"/> <Square Name="square2" Width="25" Height="5" FillColor="0,255,0" LineStyle="Solid"/> <Square Name="square3" Width="25" Height="5" FillColor="0,0,255" LineStyle="Solid"/> </GroupAlignment> <!-- (4)Group4 --> <Square Width="45" Height="25" X="60" Y="40" LineColor="14,0,176" LineStyle="Solid"/> <GroupAlignment Name="Group4" Width="45" Height="25" X="60" Y="40" Horizon="left" Vertical="bottom" Vector="vertical" Narrow="size"> <Square Name="square1" Width="25" Height="5" Y="10" FillColor="255,0,0" LineStyle="Solid"/> <Square Name="square2" Width="25" Height="5" Y="10" FillColor="0,255,0" LineStyle="Solid"/> <Square Name="square3" Width="25" Height="5" FillColor="0,0,255" LineStyle="Solid"/> </GroupAlignment> <!-- (5)Group5 --> <Square Width="85" Height="5" Y="80" LineColor="14,0,176" LineStyle="Solid"/> <GroupAlignment Name="Group5" Width="85" Height="5" Y="80" Horizon="left" Vertical="bottom" Vector="horizon" Narrow="size"> <Square Name="square1" Width="25" Height="5" FillColor="255,0,0" LineStyle="Solid"/> <Square Name="square2" Width="25" Height="5" FillColor="0,255,0" LineStyle="Solid"/> <Square Name="square3" Width="25" Height="5" FillColor="0,0,255" LineStyle="Solid"/> </GroupAlignment> <!-- (6)Group6 --> <Square Width="85" Height="5" Y="100" LineColor="14,0,176" LineStyle="Solid"/> <GroupAlignment Name="Group6" Width="85" Height="5" Y="100" Horizon="left" Vertical="bottom" Vector="horizon" Narrow="size"> <Square Name="square1" Width="25" Height="5" FillColor="255,0,0" LineStyle="Solid"/> <Square Name="square2" Width="25" Height="5" X="10" FillColor="0,255,0" LineStyle="Solid"/> <Square Name="square3" Width="25" Height="5" X="10" FillColor="0,0,255" LineStyle="Solid"/> </GroupAlignment> </Layout>
生成されるPDF(『<biz-Stream_home>/sample/xml/GroupAlignment/GroupAlignmentSample1.pdf
』)

- ①Vector="none"の場合、各要素は座標どおりに表示されます。
- ②Vector="none"で座標が指定されない場合、各要素は全て同位置に表示されます。
- ③Vector="vertical"の場合、各要素は垂直方向に整列されて表示されます。ページレイアウト情報が解析される順に上から下へ整列されるため、group3では、上からsquare1、square2、square3の順になります。
- ※group3の場合、height="5"のsquareが縦方向に整列されているので、Vector="none"でsquare1(0,10)、square2(0,5)、square3(0,0)と指定した場合の表示と同じものになります。
- ④Vector="vertical"で座標が指定された場合、各要素が垂直方向に整列された後、座標が考慮されます。Group4ではsquare1、square2でそれぞれY="10"が指定されているため、垂直方向に整列された場合のY座標+10の位置にそれぞれ表示されることになります。
- ※group4の場合、height="5"のsquareが縦方向に整列された上でlabel1、label2にY="10"と指定されているので、Vector="none"でsquare1(0,20)、square2(0,15)、square3(0,0)と指定した場合の表示と同じものになります。(label1、label2のY座標は、group3の各Y座標に+10したものになります。)
- ⑤Vector="horizon"の場合、各要素は水平方向に整列されて表示されます。ページレイアウト情報が解析される順に左から右へ整列されるため、group5では、左からsquare1、square2、square3の順になります。
- ⑥Vector="horizon"で座標が指定された場合、各要素が水平方向に整列された後、座標が考慮されます。Group6ではsquare1、square2でそれぞれX="10"が指定されているため、水平方向に整列された場合のX座標+10の位置にそれぞれ表示されることになります。