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.plugin.column;
017    
018    import org.opengion.hayabusa.db.AbstractEditor;
019    import org.opengion.hayabusa.db.CellEditor;
020    import org.opengion.hayabusa.db.DBColumn;
021    import org.opengion.fukurou.util.XHTMLTag;
022    
023    /**
024     * CHBOX2 エãƒ?‚£ターは、カラãƒ??ãƒ??タをチェãƒ?‚¯ボックスで編é›?�™るå?合に使用するクラスですã?
025     *
026     * こã?エãƒ?‚£ターは、CHBOXとは異なりチェãƒ?‚¯ボックス特有ã?制御をå?く行いませんã€?
027     * 特性としては、typeがcheckboxであるとã�?�†1点を除ã�?�¦、TEXT エãƒ?‚£ターと同じでã�?
028     *
029     * カラãƒ??表示にå¿?¦�な属æ?は, DBColumn オブジェクãƒ?より取り出しますã?
030     * こã?クラスは、DBColumn オブジェクト毎に?‘つ作æ?されますã?
031     *
032     * @og.group ãƒ??タ編é›?
033     *
034     * @version  4.0
035     * @author   Hiroki Nakamura
036     * @since    JDK5.0,
037     */
038    public class Editor_CHBOX2 extends AbstractEditor {
039            //* こã?プログラãƒ??VERSIONæ–?­—å?を設定しますã?       {@value} */
040            private static final String VERSION = "5.1.8.0 (2010/07/01)" ;
041    
042            /**
043             * ãƒ?ƒ•ォルトコンストラクターã€?
044             * こã?コンストラクターで、基本オブジェクトを作æ?しますã?
045             *
046             */
047            public Editor_CHBOX2() {
048                    return ;                // Document empty constructor 対ç­?
049            }
050    
051            /**
052             * コンストラクターã€?
053             *
054             * @param       clm     DBColumnオブジェクãƒ?
055             */
056            private Editor_CHBOX2( final DBColumn clm ) {
057                    super( clm );
058                    attributes.set( "type", "checkbox" );
059                    tagBuffer.add( XHTMLTag.inputAttri( attributes ) );
060            }
061    
062            /**
063             * å�?‚ªブジェクトからè?åˆ??インスタンスを返しますã?
064             * 自åˆ??身をキャãƒ?‚·ュするのかã?新たに作æ?するのかã?、各サブクラスの実è£?�«
065             * まかされますã?
066             *
067             * @param       clm     DBColumnオブジェクãƒ?
068             *
069             * @return      CellEditorオブジェクãƒ?
070             */
071            public CellEditor newInstance( final DBColumn clm ) {
072                    return new Editor_CHBOX2( clm );
073            }
074    }