001 /*
002 * Copyright (c) 2009 The openGion Project.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
013 * either express or implied. See the License for the specific language
014 * governing permissions and limitations under the License.
015 */
016 package org.opengion.hayabusa.db;
017
018 /**
019 * ãƒ??タのコード情報を取り扱ã�??通インターフェースですã?
020 *
021 * コードã?キーとラベルのæƒ??から、HTMLのメニューã‚?ƒªストを作æ?するための オプション
022 * タグを作æ?したりã?与えられたキーをもとに、チェãƒ?‚¯済みのオプションタグを作æ?したã‚?
023 * しますã?
024 *
025 * @og.group 選択データ制御
026 *
027 * @version 4.0
028 * @author Kazuhiko Hasegawa
029 * @since JDK5.0,
030 */
031 public interface Selection {
032 static final String NO_VALUE_OPTION = "<option value=\"\" ></option>" ; // 3.5.5.7 (2004/05/10)
033
034 /**
035 * 初期値が選択済みの 選択肢(オプション)を返しますã?
036 * こã?オプションは、引数の値をå?期å?とするオプションタグを返しますã?
037 * こã?メソãƒ?ƒ‰では、ラベル(短)が設定されてã�?‚‹場合でもã?これを使用せずにå¿?�šラベル(長)を使用しますã?
038 *
039 * @og.rev 3.6.0.6 (2004/10/22) シーケンスアクセス機è?を指定すã‚?seqFlag を導å?
040 *
041 * @param selectValue 選択されてã�?‚‹値
042 * @param seqFlag シーケンスアクセス機è? [true:ON/false:OFF]
043 *
044 * @return オプションタグ
045 */
046 String getOption( String selectValue,boolean seqFlag ) ;
047
048 /**
049 * 初期値が選択済みの 選択肢(オプション)を返しますã?
050 * こã?オプションは、引数の値をå?期å?とするオプションタグを返しますã?
051 * こã?メソãƒ?ƒ‰では、引数のuseShortLabelがtrueにæŒ?®šされた場合に、ラベル(短)をã?ースとした
052 * ãƒ??ルチップ表示を行いますã?
053 *
054 * @og.rev 5.1.3.0 (2010/02/01) 追åŠ?
055 *
056 * @param selectValue 選択されてã�?‚‹値
057 * @param seqFlag シーケンスアクセス機è? [true:ON/false:OFF]
058 * @param useShortLabel ラベル(短)をã?ースとしたオプション表示を行うかどã�?�‹ã€?
059 *
060 * @return オプションタグ
061 */
062 String getOption( String selectValue,boolean seqFlag, boolean useShortLabel ) ;
063
064 /**
065 * 選択肢(value)に対するラベルを返しますã?
066 * 選択肢(value)がã?存在しなかったå?合ã?ã€?�¸択肢そã?もã?を返しますã?
067 * getValueLabel( XX ) は、getValueLabel( XX,false ) と同じですã?
068 *
069 * @param selectValue 選択肢の値
070 *
071 * @return 選択肢のラベル
072 * @see #getValueLabel( String,boolean )
073 */
074 String getValueLabel( String selectValue ) ;
075
076 /**
077 * 選択肢(value)に対するラベルを返しますã?
078 * 選択肢(value)がã?存在しなかったå?合ã?ã€?�¸択肢そã?もã?を返しますã?
079 * こã?メソãƒ?ƒ‰では、短縮ラベルを返すかどã�?�‹を指定するフラグを指定しますã?
080 * getValueLabel( XX,false ) は、getValueLabel( XX ) と同じですã?
081 *
082 * @og.rev 4.0.0.0 (2005/11/30) を追åŠ?
083 *
084 * @param selectValue 選択肢の値
085 * @param flag 短縮ラベル使用有無 [true:使用する/false:しない]
086 *
087 * @return 選択肢のラベル
088 * @see #getValueLabel( String )
089 */
090 String getValueLabel( String selectValue,boolean flag ) ;
091
092 /**
093 * 初期値が選択済みの 選択肢(ラジオボタン)を返しますã?
094 * こã?ラジオボタンは、引数の値をå?期å?とするラジオボタンタグを返しますã?
095 *
096 * @og.rev 3.5.1.0 (2003/10/03) 新規作æ?
097 * @og.rev 3.8.6.0 (2006/09/29) useLabel 属æ? 追åŠ?
098 *
099 * @param name name属æ?になるキーæ–?—å?
100 * @param selectValue 選択されてã�?‚‹値
101 * @param useLabel ラベル表示の有無 [true:æœ?false:無]
102 *
103 * @return ラジオボタンタグ
104 */
105 String getRadio( String name, String selectValue, boolean useLabel ) ;
106
107 /**
108 * 選択肢(value)に対するラベルを返しますã?
109 * 選択肢(value)がã?存在しなかったå?合ã?ã€?�¸択肢そã?もã?を返しますã?
110 *
111 * @og.rev 3.8.6.0 (2006/09/29) 新規作æ?
112 *
113 * @param selectValue 選択肢の値
114 *
115 * @return 選択肢のラベル
116 */
117 String getRadioLabel( String selectValue ) ;
118
119 /**
120 * マルチã?キーセレクトを使用するかどã�?�‹を返しますã?
121 * true?š使用する。false:使用しなã�?ですã?
122 * ただしã?実際に使用するかどã�?�‹は、HTML出力時に決めることがå?来ますã?
123 * ここでは、USE_MULTI_KEY_SELECT ã�?true で、USE_SIZE(=20)以上ã?場合に
124 * true を返しますã?
125 *
126 * @og.rev 3.5.5.7 (2004/05/10) 新規作æ?
127 *
128 * @return 選択リストで、ã?ルチã?キーセレクトを使用するかどã�?�‹(true:使用する)
129 */
130 boolean useMultiSelect() ;
131
132 /**
133 * オブジェクトã?キャãƒ?‚·ュが時間å?れかどã�?�‹を返しますã?
134 * キャãƒ?‚·ュが時間å?ã‚?無効)であれば、true をã?有効であればã€?
135 * false を返しますã?
136 *
137 * @og.rev 4.0.0.0 (2005/01/31) 新規作æ?
138 *
139 * @return キャãƒ?‚·ュが時間å?れなã‚?true
140 */
141 boolean isTimeOver() ;
142 }