jp.co.fujitsu.reffi.client.nexaweb.parser
クラス ElementValues

java.lang.Object
  上位を拡張 jp.co.fujitsu.reffi.client.nexaweb.parser.ElementValues

public class ElementValues
extends Object

[概 要]

エレメントの値を保持するElementValueオブジェクトを集約するクラスです。

[詳 細]

textFieldやcomboBoxは単一の値を保持しますが、マルチセレクタブルな listBoxエレメントや、マトリクスデータを扱うtableエレメントは、複数の 値を保持します。
その場合、一つの値(「name属性=値」)を持つElementValueオブジェクトを このElementValuesが集約する形で保持します。

[備 考]

ElementValueはnameフィールドを持ち、大抵の場合、エレメントが複数の値を 持つ場合でもnameフィールドの値は変わりません。

但し、tableエレメントの場合はnameフィールドが変わります。

        <table height="200px" id="table" name="dataTable" quickEdit="true"
                width="300px" x="40px" y="330px">

                <column>
                        <header text="姓名"/>
                </column>
                <column>
                        <header text="年齢"/>
                </column>
                <row>
                        <cell name="name" editable="true" text="山田太郎"/>
                        <cell name="age" editable="true" text="32"/>
                </row>
                <row>
                        <cell name="name" editable="true" text="鈴木一郎"/>
                        <cell name="age" editable="true" text="25"/>
                </row>
        </table>
 
上記のテーブル定義の場合、
 Parser parser = new ElementValueParser();
 ElementValues values = parser.parse(table);
 
戻り値valuesは以下のような構造になり、4つの名前と値を持ちます。
        ElementValues[
                ElementValue[
                        name = "dataTable[0].name"
                        value = "山田太郎"
                ]
                ElementValue[
                        name = "dataTable[0].age"
                        value = "32"
                ]
                ElementValue[
                        name = "dataTable[1].name"
                        value = "鈴木一郎"
                ]
                ElementValue[
                        name = "dataTable[1].age"
                        value = "25"
                ]
        }
 

[環 境] JDK 6.0 Update 11

Copyright (c) 2008-2009 FUJITSU Japan All rights reserved.

作成者:
Project Reffi

コンストラクタの概要
ElementValues()
          [概 要] デフォルトコンストラクタです。
 
メソッドの概要
 void addElementValue(ElementValue elementValue)
          [概 要] 単一の値を持つElementValueオブジェクトを追加します。
 ElementValue getElementValue(int index)
          [概 要] 単一の値を持つElementValueオブジェクトを返却します。
 int size()
          [概 要] このオブジェクトが何個のElementValueオブジェクトを保有しているか返却します。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

ElementValues

public ElementValues()

[概 要]

デフォルトコンストラクタです。

[詳 細]

ElementValueオブジェクトを集約するベクタ領域を生成します。

[備 考]

メソッドの詳細

size

public int size()

[概 要]

このオブジェクトが何個のElementValueオブジェクトを保有しているか返却します。

[詳 細]

elementValuesフィールドのサイズを取得して返却します。

[備 考]

戻り値:
このオブジェクトが保持するElementValueオブジェクトの数

addElementValue

public void addElementValue(ElementValue elementValue)

[概 要]

単一の値を持つElementValueオブジェクトを追加します。

[詳 細]

elementValuesフィールドに引数elementValueを追加します。

[備 考]

パラメータ:
elementValue - ElementValueオブジェクト

getElementValue

public ElementValue getElementValue(int index)

[概 要]

単一の値を持つElementValueオブジェクトを返却します。

[詳 細]

elementValuesフィールドの引数index番目を取得して返却します。

[備 考]

パラメータ:
index - 保持インデックス
戻り値:
ElementValueオブジェクト


Copyright(C) Fujitsu All Rights Reserved.