2013年2月3日日曜日

Tobagoのレイアウト設定

Tobagoのグリッドレイアウトを説明したドキュメント。
http://myfaces.apache.org/tobago/guide.html#Layout

Layout
レイアウト
Tobago organizes the placement of components with the help of layout managers.
Tobagoは、レイアウトマネージャの助けを借りて、コンポーネントの配置を整理します。
The main layout manager is called grid layout.
メインレイアウトマネージャは、グリッドレイアウトと呼ばれます。
It divides the available rectangular space into grid cells.
これは、グリッドのセルに使用可能な矩形領域を分割する。
The grid is spawned by the column and row values of the tag. 
グリッドは、タグの列と行の値によって生成されます。
The syntax of these values is based on the multi-length notation known from HTML.
これらの値の構文は、HTMLから知られているマルチレングス表記に基づいています。
To add a layout manager to a container like box, panel or page you have to add a layout facet (i.e. a facet with the name 'layout') to the respective container tag.
box, panelやpageのようなコンテナにレイアウトを追加するには、それぞれのコンテナにレイアウトファセットを追加する必要があります。
A code fragment from the address book example:
アドレスブックの例のコード·フラグメント:
<tc:panel>
  <f:facet name="layout">
    <tc:gridlayout columns="*" rows="fixed;fixed;*" />
  </f:facet>
  <tx:in label="First Name" />
  <tx:in label="Last Name" />
  <tc:cell />
</tc:panel>

In this example we place to two input controls with labels into two consecutive rows.
この例では、2つの連続した行にラベルを使用して2つの入力コントロールを配置します。
Below the two input fields we add a spacer element.
2つの入力フィールドの下にスペーサ要素を追加します。
The layout token 'fixed' advises the layout manager to give the input control the height, which this kind of control normally possesses in the selected theme.
レイアウト・トークン'fixed'は、レイアウトマネージャにインプット・コントロールの高さを与えるアドバイスを行い、この種のコントロールは通常選択されたテーマ中で処理されます。
The values of the column and row attributes of the tag can contain a semicolon separated list of layout tokens. 
タグのcolumnとrow属性の値は、セミコロン区切りでレイアウト・トークンのリストを含めることができます。
A layout token can be an exact length in pixels like 200px, a percentage length like 25%, a relative length like 2*, or a specific length called fixed, which's exact length is determined by the theme and make sure the control is usable -- a single-line input control for example needs to be so high that characters from the assigned font can be read inside the control.
レイアウト・トークンは「200px」のような ピクセルの正確な長さ、「25%」のようなパーセンテージ 、 「2*」のような相対的な 長さ、あるいは、「fixed」と呼ばれる特定の長さが可能です--たとえば、1行の入力コントロールは、割り当てられたフォント からのキャラクターがコントロール中に読まれることができるように高い必要があります。
Relative lengths are determined last by the layout manager.
相対的な長さは、レイアウトマネージャによって最後に決定されます。
The available remaining space is distributed among the existing relative lengths.
利用できる残りのスペースは、既存の相対的な長さに分配されます。
Each length receives space proportional to the integer before the '*'.
各々の長さは、「*」前の整数に比例したスペースを受けます。
A single '*' is a shorthand for '1*'.
一つの「*」は、「1*」の短縮形です。
The layout manager handles the rendered attribute of controls, too.
レイアウトマネージャは、コントロールのrendered属性も取り扱います。
If the rendered attribute is dynamically defined by a value binding, the page can contain fewer controls in some cases than in others.
rendered属性は動的にバリュー・バインディングによって定義されている場合、ページが他に比べていくつかのケースでは少ないコントロールを含めることができます。
The layout manager can then distribute the newly available space between the remaining relative and percentage lengths.
レイアウトマネージャは、その後、残りの相対的な割合と長との間に新たに利用可能なスペースを分配することができます。

0 件のコメント:

コメントを投稿