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 * @og.rev 5.8.1.0 (2014/11/07) HTML5対応ã?javaScriptで、BODYがなã�?�¨入れ子になってしまã�??
106 * @return 後続å?ç�??æŒ?¤º
107 */
108 @Override
109 public int doEndTag() {
110 debugPrint(); // 4.0.0 (2005/02/28)
111
112 tag.setBody( "<!-- -->" ); // 5.8.1.0 (2014/11/07) HTML5対応ã?
113 jspPrint( tag.makeTag() );
114
115 return(EVAL_PAGE); // ペã?ジの残りを評価するã€?
116 }
117
118 /**
119 * タグリブオブジェクトをリリースしますã?
120 * キャãƒ?‚·ュされて再利用されるã?で、フィールドã?初期設定を行いますã?
121 *
122 */
123 @Override
124 protected void release2() {
125 super.release2();
126 tag = new TagBuffer( "iTask" );
127 }
128
129 /**
130 * 【TAG】左右?’å?割で、固定したいカラãƒ?•°を指定しまã�?å¿??)ã€?
131 *
132 * @og.tag
133 * ?‘段çµ?�§も2段çµ?�§もã?固定したいカラãƒ?•°を指定しますã?
134 *
135 * @param fixedCols 固定したいカラãƒ?•°
136 */
137 public void setFixedCols( final String fixedCols ) {
138 tag.add( "fixedCols",StringUtil.nval( getRequestParameter( fixedCols ),null ) );
139 }
140
141 /**
142 * タグの名称をã?返しますã?
143 * 自åˆ??身のクラス名よりã?自動的に取り出せなã�?�Ÿめã?こã?メソãƒ?ƒ‰をオーバã?ライドしますã?
144 *
145 * @return タグの名称
146 */
147 @Override
148 protected String getTagName() {
149 return "iTask" ;
150 }
151
152 /**
153 * こã?オブジェクトã?æ–?—å?表現を返しますã?
154 * 基本çš?�«ãƒ?ƒ�ãƒ?‚°目çš?�«使用しますã?
155 *
156 * @return こã?クラスのæ–?—å?表現
157 */
158 @Override
159 public String toString() {
160 return org.opengion.fukurou.util.ToString.title( this.getClass().getName() )
161 .println( "VERSION" ,VERSION )
162 .println( "tag" ,tag.makeTag() )
163 .println( "Other..." ,getAttributes().getAttribute() )
164 .fixForm().toString() ;
165 }
166 }