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 */ 016package org.opengion.plugin.column; 017 018import org.opengion.hayabusa.db.CellEditor; 019import org.opengion.hayabusa.db.DBColumn; 020import org.opengion.hayabusa.db.SelectionFactory; // 5.7.3.0 (2014/02/07) 021 022/** 023 * カラムの編集パラメーターの開始、終了、ステップの情報より、プルダウンメニューを作成して 024 * 編集する場合に使用するエディタークラスです。 025 * 026 * ここでは、時間(時:分)の自動生成を行います。パラメータで、開始、終了、ステップ、開始前設定値、終了後設定値 027 * を指定できます。 028 * キーは、4文字の HHMM 形式で与えられます。ラベルは、HH:MM になります。 029 * ステップは、分単位です。 030 * 開始前設定値、終了後設定値はそれぞれ、開始の前と終了の後ろに特別に値を設定できます。 031 * パラメータの初期値は、開始(0700)、終了(1900)、ステップ(30)、開始前設定値(null)、終了後設定値(null) です。 032 * 033 * 例:0800,2000,30 → 0800,0830,0900,0930,1000,・・・1900,1930,2000 のプルダウン 034 * 例:0800,2000,30,0000:△,2400:▽ → 0000,0800,0830,0900,0930,1000,・・・1900,1930,2000,2400 のプルダウン 035 * 036 * カラムの表示に必要な属性は, DBColumn オブジェクト より取り出します。 037 * このクラスは、DBColumn オブジェクト毎に1つ作成されます。 038 * 039 * @og.rev 5.6.1.1 (2013/02/08) 新規作成 040 * @og.group データ編集 041 * 042 * @version 4.0 043 * @author Kazuhiko Hasegawa 044 * @since JDK5.0, 045 */ 046public class Editor_HMMENU extends Editor_MENU { 047 //* このプログラムのVERSION文字列を設定します。 {@value} */ 048 private static final String VERSION = "5.7.3.0 (2014/02/07)" ; 049 050 /** 051 * デフォルトコンストラクター。 052 * このコンストラクターで、基本オブジェクトを作成します。 053 * 054 */ 055 public Editor_HMMENU() { 056 super(); 057 } 058 059 /** 060 * コンストラクター。 061 * 062 * ここでは、親クラスの Editor_MENU で初期化を行い、セレクションオブジェクト に、 063 * Selection_HM を使用するように再設定します。 064 * 065 * @og.rev 5.7.3.0 (2014/02/07) SelectionFactory 対応 066 * 067 * @param clm DBColumnオブジェクト 068 */ 069 private Editor_HMMENU( final DBColumn clm ) { 070 super( clm ); 071 072 // 5.7.3.0 (2014/02/07) SelectionFactory 対応 073 // selection = new Selection_HM( clm.getEditorParam() ); 074 selection = SelectionFactory.newSelection( "HM", clm.getEditorParam() ); 075 } 076 077 /** 078 * 各オブジェクトから自分のインスタンスを返します。 079 * 自分自身をキャッシュするのか、新たに作成するのかは、各サブクラスの実装に 080 * まかされます。 081 * 082 * @param clm DBColumnオブジェクト 083 * 084 * @return CellEditorオブジェクト 085 */ 086 @Override 087 public CellEditor newInstance( final DBColumn clm ) { 088 return new Editor_HMMENU( clm ); 089 } 090}