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.hayabusa.taglib;
017
018 import org.opengion.hayabusa.common.HybsSystemException;
019 import org.opengion.fukurou.util.StringUtil;
020 import org.opengion.fukurou.util.TagBuffer;
021
022 /**
023 * 積上ガント(å?部積上方式)でガントå?体(ã?ージ全体ä¸?�¤設定)ã?æŒ?®šを行いますã?
024 *
025 * iTask タグは、積上ガントã?ã�?�¡、å?部積上方式ã?場合に使用しますã?
026 * å†?ƒ¨積上げとは、フレーãƒ?ƒ¯ーク側で積上げ計算を行う方式ã?事ですã?
027 * 処ç�??度は増しますが、積上ガンãƒ?JavaScriptç‰?は、積上と通常ガントã?混在ã�?
028 * 可能ですが、こちらã?、積上ã?みの表示になりますã?
029 * それぞれの使ã�??けをè€??してくださいã€?
030 * こã?タグは、viewFormType = "HTMLStackedGanttTable" 、innerStack="true" を指定しã�?view の後に記述しますã?
031 *
032 * @og.formSample
033 * ●形式ï¼?lt;og:iTask ... />
034 * ●body?šなã�?
035 * ●前提:headタグで、adjustEvent="Task" を指定してくださいã€?
036 *
037 * ●Tag定義??
038 * <og:iTask
039 * fixedCols 【TAG】左右?’å?割で、固定したいカラãƒ?•°(å¿??)
040 * debug 【TAG】デバッグæƒ??をå?力するかどã�?�‹[true/false]を指定しまã�?初期値:false)
041 * />
042 *
043 * ●使用ä¾?
044 * <og:view
045 * viewFormType = "HTMLStackedGanttTable"
046 * command = "{@command}"
047 * writable = "false"
048 * useScrollBar = "false"
049 * useParam = "true"
050 * numberType = "none"
051 * >
052 * <!-- stackParamでstackColumnsを指定しなかったå?合ã?customTableとほぼ同じ処ç�?�¨なã‚?-->
053 * <og:stackParam
054 * stackColumns = "NOORDER"
055 * innerStack = "true"
056 * costColumns = "COSTCLM,DYJYU,DYNOKI"
057 * stackHoliday = "{@stackHoliday}"
058 * capacityColumn = "CAPACITY"
059 * />
060 * <og:thead rowspan="2">
061 * <tr>
062 * <td>[NOORDER]</td>
063 * <td rowspan="2" class="gantt zoom{@SZOOM}" style="text-align:left;background-image: url('../image/stackBG{@SZOOM}.gif');" >
064 * <div style="position:relative;left:0px;z-index:101; " height="100%" width="100%" >
065 * <og:stackHeader
066 * startDate = "{@MIN_DATE}"
067 * endDate = "{@MAX_DATE}"
068 * zoom = "{@SZOOM}"
069 * calDB = "GE13"
070 * arg1 = "A"
071 * />
072 * </div>
073 * </td>
074 * </tr>
075 * </og:thead>
076 * <og:tbody rowspan="2">
077 * <tr>
078 * <td>[NOORDER]</td>
079 * </tr>
080 * </og:tbody>
081 * </og:view>
082 *
083 * <og:iTask
084 * fixedCols = "4"
085 * />
086 *
087 * @og.rev 5.6.3.2 (2013/04/12) 新規作æ?
088 * @og.group 画面部å“?
089 *
090 * @version 5.0
091 * @author Kazuhiko Hasegawa
092 * @since JDK6.0,
093 */
094 public class ViewITaskTag extends CommonTagSupport {
095 //* こã?プログラãƒ??VERSIONæ–?—å?を設定しますã? {@value} */
096 private static final String VERSION = "5.6.3.2 (2013/04/12)" ;
097
098 private static final long serialVersionUID = 563220130412L ;
099
100 private TagBuffer tag = new TagBuffer( "iTask" ) ;
101
102 /**
103 * Taglibの終äº?‚¿グが見つかったときに処ç�?�™ã‚?doEndTag() ã‚?オーバã?ライドしますã?
104 *
105 * @return 後続å?ç�??æŒ?¤º
106 */
107 @Override
108 public int doEndTag() {
109 debugPrint(); // 4.0.0 (2005/02/28)
110
111 jspPrint( tag.makeTag() );
112
113 return(EVAL_PAGE); // ペã?ジの残りを評価するã€?
114 }
115
116 /**
117 * タグリブオブジェクトをリリースしますã?
118 * キャãƒ?‚·ュされて再利用されるã?で、フィールドã?初期設定を行いますã?
119 *
120 */
121 @Override
122 protected void release2() {
123 super.release2();
124 tag = new TagBuffer( "iTask" );
125 }
126
127 /**
128 * 【TAG】左右?’å?割で、固定したいカラãƒ?•°を指定しまã�?å¿??)ã€?
129 *
130 * @og.tag
131 * ?‘段çµ?�§も2段çµ?�§もã?固定したいカラãƒ?•°を指定しますã?
132 *
133 * @param fixedCols 固定したいカラãƒ?•°
134 */
135 public void setFixedCols( final String fixedCols ) {
136 tag.add( "fixedCols",StringUtil.nval( getRequestParameter( fixedCols ),null ) );
137 }
138
139 /**
140 * タグの名称をã?返しますã?
141 * 自åˆ??身のクラス名よりã?自動的に取り出せなã�?�Ÿめã?こã?メソãƒ?ƒ‰をオーバã?ライドしますã?
142 *
143 * @return タグの名称
144 */
145 @Override
146 protected String getTagName() {
147 return "iTask" ;
148 }
149
150 /**
151 * こã?オブジェクトã?æ–?—å?表現を返しますã?
152 * 基本çš?�«ãƒ?ƒ�ãƒ?‚°目çš?�«使用しますã?
153 *
154 * @return こã?クラスのæ–?—å?表現
155 */
156 @Override
157 public String toString() {
158 return org.opengion.fukurou.util.ToString.title( this.getClass().getName() )
159 .println( "VERSION" ,VERSION )
160 .println( "tag" ,tag.makeTag() )
161 .println( "Other..." ,getAttributes().getAttribute() )
162 .fixForm().toString() ;
163 }
164 }