2 * Copyright (c) 2009 The openGion Project.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 * either express or implied. See the License for the specific language
14 * governing permissions and limitations under the License.
16 package org.opengion.plugin.column;
18 import org.opengion.hayabusa.db.AbstractEditor;
19 import org.opengion.hayabusa.db.CellEditor;
20 import org.opengion.hayabusa.db.DBColumn;
21 import org.opengion.fukurou.util.XHTMLTag;
22 import org.opengion.fukurou.util.Attributes;
25 * カラムのデータをHIDDENで編集する場合に使用するエディタークラスです。
27 * つまり、編集して欲しくないが、データは、飛ばしたい場合に使用します。
29 * カラムの表示に必要な属性は、DBColumn オブジェクト より取り出します。
30 * このクラスは、DBColumn オブジェクト毎に1つ作成されます。
32 * @og.rev 3.3.3.3 (2003/08/06) 新規作成
36 * @author Kazuhiko Hasegawa
39 public class Editor_HIDDEN extends AbstractEditor {
40 /** このプログラムのVERSION文字列を設定します。 {@value} */
41 private static final String VERSION = "6.4.4.2 (2016/04/01)" ;
45 * このコンストラクターで、基本オブジェクトを作成します。
48 public Editor_HIDDEN() { super(); } // これも、自動的に呼ばれるが、空のメソッドを作成すると警告されるので、明示的にしておきます。
51 * DBColumnオブジェクトを指定したprivateコンストラクター。
53 * @og.rev 3.5.5.7 (2004/05/17) attributes.clear() を追加
54 * @og.rev 3.5.6.0 (2004/06/18) XHTMLTag の 内部配列 INPUT_KEY を隠蔽します。
55 * @og.rev 4.3.6.0 (2009/04/01) eventColumn対応
56 * @og.rev 5.1.7.0 (2010/06/01) 動的プルダウン実装見直し
57 * @og.rev 6.4.4.2 (2016/04/01) nameのfinal化
59 * @param clm DBColumnオブジェクト
61 private Editor_HIDDEN( final DBColumn clm ) {
62 // super(); // 6.4.1.1 (2016/01/16) PMD refactoring. It is a good practice to call super() in a constructor
63 super( clm ); // 6.4.4.2 (2016/04/01) nameのfinal化
64 // name = clm.getName();
66 // 6.1.1.0 (2015/01/17) Attributesの連結記述
67 attributes = new Attributes()
68 .set( "type" ,"hidden" );
70 tagBuffer.add( XHTMLTag.inputAttri( attributes ) );
74 * 各オブジェクトから自分のインスタンスを返します。
75 * 自分自身をキャッシュするのか、新たに作成するのかは、各サブクラスの実装に
78 * @param clm DBColumnオブジェクト
80 * @return CellEditorオブジェクト
83 public CellEditor newInstance( final DBColumn clm ) {
84 return new Editor_HIDDEN( clm );