utils.java

来自「EXTJS是一个流行的AJAX框架之一 extjs-serverside是一个J」· Java 代码 · 共 36 行

JAVA
36
字号
package com.extjs.serverside.table;public class Utils {	public final static ColumnRenderer BOLD_COLUMN = new CustomRenderer("bold",			"return '<b>'+value+'</b>';");	public static ColumnRenderer getDateFormatRenderer(String format) {		return new ColumnRenderer("Ext.util.Format.dateRenderer('"+format+"')");	}			public static String getDataIndex(TableColumn[] tc, int cellPosition) {		String tagName = tc[cellPosition].getDataIndex();		if (tagName == null) {			tagName = "cell" + cellPosition;		}		return tagName;	}	public static String getInitializer(TableColumn tc, int cellPosition) {		String definition = tc.getDefinition();		if (definition==null) {			// it's a hidden column, no need to initalize the column model.			return "";		}		String dataIndex = tc.getDataIndex();		if (dataIndex == null) {			dataIndex = "cell" + cellPosition;		}		return (cellPosition > 0 ? ",{" : "{") + definition				+ ", dataIndex:\"" + dataIndex + "\"}";	}	}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?