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