biz-Streamマニュアル XMLページレイアウトタグ リファレンス 第8章 グループ化 8.3 表示/非表示制御<GroupDisplay>

8.3 表示/非表示制御<GroupDisplay>


8.3.1機能説明

GroupDisplayタグに含まれる項目をグループ化し、グループ内での項目表示/非表示を制御します。




8.3.2属性説明

属性名指定説明指定内容初期値
name任意名前CDATA
Target必須KEY項目CDATA
X任意X座標CDATA0
Y任意Y座標CDATA0
Width任意領域の幅CDATA
Height任意領域の高さCDATA
Unit任意単位(Choice)mm / cm / in / px / ptmm
Horizon任意配置(水平方向)(Choice)left / center / right / evenleft
Vertical任意配置(垂直方向)(Choice)top / center / bottom / evenbottom
Vector任意整列方向(Choice)horizon / vertical / nonehorizon
LineSpace任意行間CDATA0
LineWidth任意線幅CDATA0.1
LineColor任意線の色CDATA
FillColor任意背景色CDATA
Radius任意半径CDATA0
Corners任意CDATA角丸指定を解除する角にはfalseを指定
(左下;右下;右上;左上)
true;true; true;true
Margin任意領域内の余白(Choice)start:左端余白 /
end:右端余白 /
top:上部余白 /
bottom:下部余白
1px
1px
0px
2px
Narrow任意領域にデータが入りきらない場合の圧縮方法(Choice)horizon / size / nonesize
  • (注)初期値:出荷時のXMLデフォルト情報(default_values.properties)値を表します。ユーザにより値の変更が行われた場合は内容が異なります。


8.3.3記述例

GroupDisplayサンプル1

GroupDisplayサンプル1(『<biz-Stream_home>/sample/xml/GroupDisplay/GroupDisplaySample1.xml』)

<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<Layout Name="GroupDisplaySample1" Width="100" Height="50" 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="15" Height="10" LineColor="14,0,176" LineStyle="Solid"/>

    <GroupDisplay Name="group1" Target="label1" Horizon="left" Vertical="bottom" Vector="vertical" Narrow="horizon">
        <Label Name="label1" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="horizon">KEY項目</Label>
        <Label Name="label2" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="horizon">サンプル</Label>
    </GroupDisplay>
    <!-- (2)group2 -->

    <Square Width="15" Height="10" X="20" LineColor="14,0,176" LineStyle="Solid"/>

    <GroupDisplay Name="group2" Target="label1" X="20" Horizon="left" Vertical="bottom" Vector="vertical" Narrow="horizon">
        <Label Name="label1" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="horizon"/>
        <Label Name="label2" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="horizon">サンプル</Label>
    </GroupDisplay>
    <!-- (3)Group3 -->

    <Square Width="15" Height="10" X="40" LineColor="14,0,176" LineStyle="Solid"/>

    <GroupDisplay Name="group3" Target="label1" X="40" Horizon="left" Vertical="bottom" Vector="vertical" Narrow="horizon">
        <Label Name="label1" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="horizon">KEY項目</Label>
        <Label Name="label2" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="horizon"/>
    </GroupDisplay>
    <!-- (4)Group4 -->

    <Square Width="15" Height="10" X="60" LineColor="14,0,176" LineStyle="Solid"/>

    <GroupDisplay Name="group4" Target="label1" X="60" Horizon="left" Vertical="bottom" Vector="vertical" Narrow="horizon">
        <Label Name="label1" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="horizon"/>
        <Label Name="label2" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="horizon"/>
    </GroupDisplay>
</Layout>

生成されるPDF(『<biz-Stream_home>/sample/xml/GroupDisplay/GroupDisplaySample1.pdf』)


GroupDisplayサンプル1
  • KEYとして指定された項目にデータが無い場合は、<GroupDisplay>内全ての項目が非表示になります。

  • group1:KEY項目データあり・その他項目データあり ⇒ group内の項目が全て表示
  • group2:KEY項目データなし・その他項目データあり ⇒ group内の項目が全て非表示
  • group3:KEY項目データあり・その他項目データなし ⇒ group内でKEY項目のみ表示
  • group4:KEY項目データなし・その他項目データなし ⇒ group内の項目が全て非表示

GroupDisplayサンプル2

GroupDisplayの背景/枠線など書式設定に関するサンプルです。
設定内容として、GroupAlignmentと同様の指定が可能です。

GroupDisplayサンプル2(『<biz-Stream_home>/sample/xml/GroupDisplay/GroupDisplaySample2.xml』)

<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<Layout Name="GroupDisplaySample2" Width="110" Height="40" 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 -->

    <GroupDisplay Name="group1" Target="label1" Width="30" Height="10" Horizon="left" Vertical="center" Vector="vertical" FillColor="204,204,204" Radius="2" Corners="true;true;true;true" Narrow="horizon">
        <Label Name="label1" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="horizon">KEY項目</Label>
        <Label Name="label2" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="horizon">テキストテキストテキストテキスト</Label>
    </GroupDisplay>
    <!-- (2)Group2 -->

    <GroupDisplay Name="group2" Target="label1" X="35" Horizon="left" Vertical="bottom" Vector="vertical" LineColor="153,153,153" Margin="start:5;end:5;top:10;bottom:5" Narrow="horizon">
        <Label Name="label1" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="horizon">KEY項目</Label>
        <Label Name="label2" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="horizon">テキストテキストテキストテキスト</Label>
    </GroupDisplay>
</Layout>

生成されるPDF(『<biz-Stream_home>/sample/xml/GroupDisplay/GroupDisplaySample2.pdf』)


GroupDisplayサンプル2
  • group1:Corner="true;true;true;true"、Radius="2"、FillColor="80"
  • group2:LineColor="80"、Margin="start:5;end:5;top:10;bottom:20"
  • GroupAlignmentと同内容の書式設定が可能です。
  • GroupDisplayと他要素(ex.Square、Round)を重ねることなく、背景/枠線/余白などを指定できます。