用法类似oracle DECODE的语法:DECODE(value,if1,then1,if2,then2,if3,then3,...,else)
1.根据当前列值使当前列/其它多个列/或整行显示不同前景/背景颜色
2.根据当前列值使其他列(单个'列名'或多个'列名/列名/...'或整行'*')显示不同颜色
'B'背景色,'F'前景色
agile.erp.dt.color.ColorTransfer(B, *, var1, g, 2, r, b),设置背景色,当前列值=var1时为Green,当前列值=2时为Red,其他时为Blue
var1为$$开头时($$COL_NAME)表示引用其它列,要使用table中colName列的值比较
如要与dt转换后的值比较,'$$'改为'$$#',注意转换列'$$#'必须在当前dt/ct所在列前(这样才能保证$$#所在列已经转换了)

eg:
ct='agile.erp.dt.color.ColorTransfer(B,-/OTHER_COL,$$PRE_MAKE_DATE_FIRST, ,rl)' 当前列值='PRE_MAKE_DATE_FIRST'列值时不设定颜色,不等时设定红色
ct='agile.erp.dt.color.ColorTransfer(B,-, , ,rl)' 当前列值不为空时设定列'CANCEL_TIME 和 WORK_ORDER_NO'为红色
ct='agile.erp.dt.color.ColorTransfer(B, -, 0, g, b)' 列值=0时为绿色;否则为蓝色
ct='agile.erp.dt.color.ColorTransferTest(B, -,$$A=0, g,b)' 同上
ct='agile.erp.dt.color.ColorTransferTest(B, -,$$A=0, g)'
ct='agile.erp.dt.color.ColorTransfer(B, -, 1, g, 0, y, 2,rl)'
* 注意同一列同时有颜色转化和数据转换时,颜色转换在数据转换前发生

1.根据Expression值使当前列('-')显示不同颜色
2.根据Expression值使其他列(单个'列名'或多个'列名/列名/...'或整行'*')显示不同颜色
agile.erp.dt.color.ColorTransferTest(B, *,testExpression, color4true,color4false),设置背景色,color4false为可选项
当Expression=1/true时为color4true,Expression=0/false时为color4false
Expression支持'&','|'运算
'BT'/'FT'表示在testExpression为true时当前列加上tip图标(默认warn.gif),可指定图片(加最后一个参数)
ct='agile.erp.dt.color.ColorTransferTest(B, -,$$QTY_PLACED!=$$QTY_REQUIRE_FACT,rl,wh)'
ct='agile.erp.dt.color.ColorTransferTest(B, -,$$QTY_PLACED>$$QTY_RECEIVE,rl,wh)'

mwt.Constant.java中定义可选颜色:
mapColor.put("g", Constant.COLOR_GREEN);
mapColor.put("gd", Constant.COLOR_GREEN_DARK);
mapColor.put("b", Constant.COLOR_BLUE);
mapColor.put("r", Constant.COLOR_RED);
mapColor.put("l", Constant.COLOR_LIGHT);
mapColor.put("rl", Constant.COLOR_RED_LIGHT);
mapColor.put("w", Constant.COLOR_WARNING);
mapColor.put("wh", Constant.COLOR_WHITE);
mapColor.put("y", Constant.COLOR_YELLOW);
mapColor.put("yl", Constant.COLOR_YELLOW_LIGHT);
mapColor.put("gr", Constant.COLOR_INVALID);
mapColor.put("or", Constant.COLOR_ORANGE);

'N' color为N时,不设置颜色