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 }