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; 024 025 /** 026 * カラãƒ??ç·¨é›?ƒ‘ラメーターã®é–‹å§‹ã?終äº??スãƒ?ƒƒãƒ—ã?フォーマットã?titleフォーマットã?æƒ??よりã€? 027 * プルãƒ?‚¦ãƒ³ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’作æ?ã—ã¦ç·¨é›?™ã‚‹å?åˆã«ä½¿ç”¨ã™ã‚‹ã‚¨ãƒ?‚£ã‚¿ãƒ¼ã‚¯ãƒ©ã‚¹ã§ã™ã? 028 * 029 * パラメータã®åˆæœŸå€¤ã¯ã€?–‹å§?0)ã€çµ‚äº?14)ã€ã‚¹ãƒ?ƒƒãƒ?1)ã€ãƒ•ォーマッãƒ?MM/dd)ã€titleフォーマッãƒ?null) ã§ã™ã? 030 * 031 * ã“ã“ã§ã¯ã€æ—¥ä»?å¹´/æœ?æ—¥?‰ã?自動生æˆã‚’行ã„ã¾ã™ã? 032 * 基準ã?ã€å®Ÿè¡Œæ—¥ã«å¯¾ã—ã¦ã€?¼‹ï¼ã?æ•°å—ã‚’æŒ?®šã—ã¾ã™ã? 033 * 例ï¼?0130206 ã«å¯¾ã—ã¦ã€?2,3,1 を指定ã™ã‚‹ã¨ã€?0130204,20130205,20130206,20130207,20130208,20130209 ã¨ãªã‚Šã¾ã™ã? 034 * 035 * é–‹å§‹ã?終äº?«ã€ç‰¹æ®Šãªã‚³ãƒžãƒ³ãƒ‰ã‚’æŒ?®šã™ã‚‹äº‹ã‚‚å¯èƒ½ã§ã™ã? 036 * ・SD ?šå½“æœˆã®æœ??ã®æ—¥ä»˜ã«ã‚»ãƒ?ƒˆã—ã¾ã™ã?(当月?‘æ—¥) 037 * ・ED ?šå½“æœˆã®æœ?¾Œã?日付ã«ã‚»ãƒ?ƒˆã—ã¾ã™ã?(当月月末) 038 * ・SW ?šæ—¥ä»˜å?ç??週åˆã‚(月曜日)ã«ã‚»ãƒ?ƒˆã—ã¾ã™ã?日付ã?当日よりå‰ã«ç§»å‹•ã—ã¾ã™ã? 039 * ・EW ?šæ—¥ä»˜å?ç??週末(日曜日)ã«ã‚»ãƒ?ƒˆã—ã¾ã™ã?日付ã?当日より後ã‚ã«ç§»å‹•ã—ã¾ã™ã? 040 * ・D1 ??DXXX ?šæ—¥ã‚’æŒ‡å®šã?åˆ? ã‘é?ã‚ã¾ã™ã?D1ãªã‚‰ç¿Œæ—¥ã€D200 ãªã‚?00æ—¥å¾? 041 * ・M1 ??MXXX ?šæœˆã‚’æŒ‡å®šã?åˆ? ã‘é?ã‚ã¾ã™ã?M1ãªã‚‰ç¿Œæœˆã€M6 ãªã‚‰åŠå¹´å¾? 042 * ・BSD ?šå?月ã?æœ??ã®æ—¥ä»˜ã«ã‚»ãƒ?ƒˆã—ã¾ã™ã?(先月?‘æ—¥) 043 * ・BED ?šå?月ã?æœ?¾Œã?日付ã«ã‚»ãƒ?ƒˆã—ã¾ã™ã?(先月月末) 044 * ・ASD ?šç¿Œæœˆã®æœ??ã®æ—¥ä»˜ã«ã‚»ãƒ?ƒˆã—ã¾ã™ã?(翌月?‘æ—¥) 045 * ・AED ?šç¿Œæœˆã®æœ?¾Œã?日付ã«ã‚»ãƒ?ƒˆã—ã¾ã™ã?(翌月月末) 046 * ・M1 ?šï¼‘ã‹æœˆå?。数å—部åˆ??ã€ä»»æ„ã«æŒ?®šã§ãã‚‹ãŸã‚ã€M5 ã¨ã™ã‚Œã°ã€?¼•ã‹æœˆå?ã€?-2 ã¯ã€?¼’ã‹æœˆå‰ 047 * 048 * スãƒ?ƒƒãƒ—ã?ã€ç„¡æŒ?®šã?å ´åˆã?ã€?¼‘æ—¥å˜ä½ã§ã™ã?例ãˆã°ã€SW,M6,7 ã¨ã™ã‚Œã°ã€æ¯Žé?æœˆæ›œæ—¥ã‚’ï¼–ã‹æœˆå?ã¾ã§ä½œæ?ã—ã¾ã™ã? 049 * ã¾ãŸã?M1 ã¯ã€?¼‘ã‹æœˆå˜ä½ã«ãªã‚Šã¾ã™ã?ãŸã ã—ã?é–‹å§‹æ—¥ã‚?SD ãªã©ã«ã—ãªã?¨ã€å¤§ã®æœˆã¨å°ã?月ã§ã€ãŠã‹ã—ããªã‚‹ã?ã§ 050 * ã”æ³¨æ„ãã?•ã?? 051 * 052 * ã‚ーã¯ã€?¼˜æ–‡å—ã? yyyyMMdd å½¢å¼ã§ä¸Žãˆã‚‰ã‚Œã¾ã™ã?ラベルã¯ã€ãƒ•ォーマットã?æŒ?®šã«æº–æ‹ ã—ã¾ã™ã? 053 * フォーマットをæŒ?®šã™ã‚‹å?åˆã?ã€ã‚¹ãƒ?ƒƒãƒ—ã?ã€å¿??ã¨ãªã‚Šã¾ã™ã? 054 * フォーマットã?åˆæœŸå€¤ã¯ã€MM/dd ã§ã™ã? 055 * titleフォーマッãƒ?ã¯ã€tips表示ã™ã‚‹å ´åˆã?フォーマットã«ãªã‚Šã¾ã™ã?åˆæœŸå€¤ã¯ã€ã‚りã¾ã›ã‚“ã€? 056 * 057 * カラãƒ??表示ã«å¿?¦ãªå±žæ?ã¯, DBColumn オブジェクãƒ?よりå–り出ã—ã¾ã™ã? 058 * ã“ã?クラスã¯ã€DBColumn オブジェクト毎ã«?‘ã¤ä½œæ?ã•れã¾ã™ã? 059 * 060 * @og.rev 5.6.1.1 (2013/02/08) æ–°è¦ä½œæ? 061 * @og.group ãƒ??ã‚¿ç·¨é›? 062 * 063 * @version 4.0 064 * @author Kazuhiko Hasegawa 065 * @since JDK5.0, 066 */ 067 public class Editor_YMDMENU extends Editor_MENU { 068 //* ã“ã?プãƒã‚°ãƒ©ãƒ??VERSIONæ–?—å?ã‚’è¨å®šã—ã¾ã™ã? {@value} */ 069 private static final String VERSION = "5.6.1.1 (2013/02/08)" ; 070 071 /** 072 * ãƒ?ƒ•ォルトコンストラクターã€? 073 * ã“ã?コンストラクターã§ã€åŸºæœ¬ã‚ªãƒ–ジェクトを作æ?ã—ã¾ã™ã? 074 * 075 */ 076 public Editor_YMDMENU() { 077 super(); 078 } 079 080 /** 081 * コンストラクターã€? 082 * 083 * ã“ã“ã§ã¯ã€è¦ªã‚¯ãƒ©ã‚¹ã® Editor_MENU ã§åˆæœŸåŒ–を行ã„ã€ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚ªãƒ–ジェクãƒ?ã«ã€? 084 * Selection_YMD を使用ã™ã‚‹ã‚ˆã†ã«å†è¨å®šã—ã¾ã™ã? 085 * 086 * @param clm DBColumnオブジェクãƒ? 087 */ 088 private Editor_YMDMENU( final DBColumn clm ) { 089 super( clm ); 090 091 selection = new Selection_YMD( clm.getEditorParam() ); 092 } 093 094 /** 095 * å?‚ªãƒ–ジェクトã‹ã‚‰è?åˆ??インスタンスを返ã—ã¾ã™ã? 096 * 自åˆ??身をã‚ャãƒ?‚·ãƒ¥ã™ã‚‹ã®ã‹ã?æ–°ãŸã«ä½œæ?ã™ã‚‹ã®ã‹ã?ã€å„サブクラスã®å®Ÿè£?« 097 * ã¾ã‹ã•れã¾ã™ã? 098 * 099 * @param clm DBColumnオブジェクãƒ? 100 * 101 * @return CellEditorオブジェクãƒ? 102 */ 103 @Override 104 public CellEditor newInstance( final DBColumn clm ) { 105 return new Editor_YMDMENU( clm ); 106 } 107 }