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.common.HybsSystem;
019 import org.opengion.hayabusa.common.HybsSystemException;
020 import org.opengion.hayabusa.db.CellEditor;
021 import org.opengion.hayabusa.db.DBColumn;
022 import org.opengion.hayabusa.db.Selection;
023 // import org.opengion.hayabusa.db.Selection_YMD; // 5.7.3.0 (2014/02/07) SelectionFactory を使ã�?§˜に変更
024 import org.opengion.hayabusa.db.SelectionFactory; // 5.7.3.0 (2014/02/07)
025
026 /**
027 * カラãƒ??編é›?ƒ‘ラメーターの開始ã?終äº??スãƒ?ƒƒプã?フォーマットã?titleフォーマットã?æƒ??よりã€?
028 * プルãƒ?‚¦ンメニューを作æ?して編é›?�™るå?合に使用するエãƒ?‚£タークラスですã?
029 *
030 * パラメータの初期値はã€?–‹å§?0)、終äº?14)、スãƒ?ƒƒãƒ?1)、フォーマッãƒ?MM/dd)、titleフォーマッãƒ?null) ですã?
031 *
032 * ここでは、日ä»?年/æœ?日?‰ã?自動生成を行いますã?
033 * 基準ã?、実行日に対してã€?¼‹-ã?数字をæŒ?®šしますã?
034 * 例ï¼?0130206 に対してã€?2,3,1 を指定するとã€?0130204,20130205,20130206,20130207,20130208,20130209 となりますã?
035 *
036 * 開始ã?終äº?�«、特殊なコマンドをæŒ?®šする事も可能ですã?
037 * ・SD ?š当月のæœ??の日付にセãƒ?ƒˆしますã?(当月?‘日)
038 * ・ED ?š当月のæœ?¾Œã?日付にセãƒ?ƒˆしますã?(当月月末)
039 * ・SW ?š日付å?ç�??週初め(月曜日)にセãƒ?ƒˆしますã?日付ã?当日より前に移動しますã?
040 * ・EW ?š日付å?ç�??週末(日曜日)にセãƒ?ƒˆしますã?日付ã?当日より後ろに移動しますã?
041 * ・D1 ??DXXX ?š日を指定ã?åˆ?� けé?めますã?D1なら翌日、D200 なã‚?00日å¾?
042 * ・M1 ??MXXX ?š月を指定ã?åˆ?� けé?めますã?M1なら翌月、M6 なら半年å¾?
043 * ・BSD ?šå?月ã?æœ??の日付にセãƒ?ƒˆしますã?(先月?‘日)
044 * ・BED ?šå?月ã?æœ?¾Œã?日付にセãƒ?ƒˆしますã?(先月月末)
045 * ・ASD ?š翌月のæœ??の日付にセãƒ?ƒˆしますã?(翌月?‘日)
046 * ・AED ?š翌月のæœ?¾Œã?日付にセãƒ?ƒˆしますã?(翌月月末)
047 * ・M1 ?š1か月å?。数字部åˆ??、任意にæŒ?®šできるため、M5 とすればã€?¼•か月å?ã€?-2 はã€?¼’か月前
048 *
049 * スãƒ?ƒƒプã?、無æŒ?®šã?場合ã?ã€?¼‘日単位ですã?例えば、SW,M6,7 とすれば、毎é?月曜日を6か月å?まで作æ?しますã?
050 * またã?M1 はã€?¼‘か月単位になりますã?ただしã?開始日ã‚?SD などにしなã�?�¨、大の月と小ã?月で、おかしくなるã?で
051 * ご注意くã�?�•ã�??
052 *
053 * キーはã€?¼˜文字ã? yyyyMMdd 形式で与えられますã?ラベルは、フォーマットã?æŒ?®šに準拠しますã?
054 * フォーマットをæŒ?®šするå?合ã?、スãƒ?ƒƒプã?、å¿??となりますã?
055 * フォーマットã?初期値は、MM/dd ですã?
056 * titleフォーマッãƒ?は、tips表示する場合ã?フォーマットになりますã?初期値は、ありませんã€?
057 *
058 * カラãƒ??表示にå¿?¦�な属æ?は, DBColumn オブジェクãƒ?より取り出しますã?
059 * こã?クラスは、DBColumn オブジェクト毎に?‘つ作æ?されますã?
060 *
061 * @og.rev 5.6.1.1 (2013/02/08) 新規作æ?
062 * @og.group ãƒ??タ編é›?
063 *
064 * @version 4.0
065 * @author Kazuhiko Hasegawa
066 * @since JDK5.0,
067 */
068 public class Editor_YMDMENU extends Editor_MENU {
069 //* こã?プログラãƒ??VERSIONæ–?—å?を設定しますã? {@value} */
070 private static final String VERSION = "5.7.3.0 (2014/02/07)" ;
071
072 /**
073 * ãƒ?ƒ•ォルトコンストラクターã€?
074 * こã?コンストラクターで、基本オブジェクトを作æ?しますã?
075 *
076 */
077 public Editor_YMDMENU() {
078 super();
079 }
080
081 /**
082 * コンストラクターã€?
083 *
084 * ここでは、親クラスの Editor_MENU で初期化を行い、セレクションオブジェクãƒ?にã€?
085 * Selection_YMD を使用するように再設定しますã?
086 *
087 * @og.rev 5.7.3.0 (2014/02/07) SelectionFactory 対å¿?
088 *
089 * @param clm DBColumnオブジェクãƒ?
090 */
091 private Editor_YMDMENU( final DBColumn clm ) {
092 super( clm );
093
094 // selection = new Selection_YMD( clm.getEditorParam() );
095 selection = SelectionFactory.newSelection( "YMD" , clm.getCodeData() );
096 }
097
098 /**
099 * å�?‚ªブジェクトからè?åˆ??インスタンスを返しますã?
100 * 自åˆ??身をキャãƒ?‚·ュするのかã?新たに作æ?するのかã?、各サブクラスの実è£?�«
101 * まかされますã?
102 *
103 * @param clm DBColumnオブジェクãƒ?
104 *
105 * @return CellEditorオブジェクãƒ?
106 */
107 @Override
108 public CellEditor newInstance( final DBColumn clm ) {
109 return new Editor_YMDMENU( clm );
110 }
111 }