当前位置: 首页>>代码示例>>Java>>正文


Java SafeHtmlCell类代码示例

本文整理汇总了Java中com.google.gwt.cell.client.SafeHtmlCell的典型用法代码示例。如果您正苦于以下问题:Java SafeHtmlCell类的具体用法?Java SafeHtmlCell怎么用?Java SafeHtmlCell使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SafeHtmlCell类属于com.google.gwt.cell.client包,在下文中一共展示了SafeHtmlCell类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: DomainList

import com.google.gwt.cell.client.SafeHtmlCell; //导入依赖的package包/类
public DomainList() {
	
	table = new CellTable<>(15, (Resources) GWT.create(TableResources.class));
	
	table.addColumn( new Column<String,SafeHtml>(new SafeHtmlCell() ) {
		@Override
		public SafeHtml getValue(String domain) {
			return new LinkHtml( domain, "javascript:selectDomain(\"" + domain + "\")" ); };
	}, "Domain");
	
	dataProvider = new ListDataProvider<String>();
	dataProvider.addDataDisplay( table );
	
	SimplePager pager = new SimplePager();
    pager.setDisplay( table );
    
    table.setWidth("100%");
	tablePanel.add( table );
	tablePanel.add( pager );
	tablePanel.setWidth("100%");
	
	
}
 
开发者ID:RISCOSS,项目名称:riscoss-corporate,代码行数:24,代码来源:DomainList.java

示例2: createAddressColumn

import com.google.gwt.cell.client.SafeHtmlCell; //导入依赖的package包/类
private Column<OrderDataDto, SafeHtml> createAddressColumn() {
	return new Column<OrderDataDto, SafeHtml>(new SafeHtmlCell()) {

		@Override
		public SafeHtml getValue(OrderDataDto orderData) {
			SafeHtmlBuilder builder = new SafeHtmlBuilder();
			builder.appendEscapedLines(orderData.getAddress());
			return builder.toSafeHtml();
		}
	};
}
 
开发者ID:wte4j,项目名称:wte4j,代码行数:12,代码来源:GenerateDocumentPanel.java

示例3: loadRiskConfsTable

import com.google.gwt.cell.client.SafeHtmlCell; //导入依赖的package包/类
private void loadRiskConfsTable(JSONValue response) {
	tablePanel.clear();
	table = new CellTable<RCInfo>(15, (Resources) GWT.create(TableResources.class));
	
	table.addColumn( new Column<RCInfo,SafeHtml>(new SafeHtmlCell() ) {
		@Override
		public SafeHtml getValue(RCInfo object) {
			return new LinkHtml( object.name, "javascript:selectRC(\"" + object.name + "\")" ); };
	}, "Risk Configuration");
	table.setWidth("100%");
	dataProvider = new ListDataProvider<RCInfo>();
	dataProvider.addDataDisplay(table);

	GWT.log( response.toString() );
	if( response.isArray() != null ) {
		for( int i = 0; i < response.isArray().size(); i++ ) {
			JSONObject o = (JSONObject)response.isArray().get( i );
			dataProvider.getList().add( new RCInfo( 
					o.get( "name" ).isString().stringValue() ) );
		}
	}

	SimplePager pager = new SimplePager();
    pager.setDisplay( table );
	
	tablePanel.add( table );
	tablePanel.add( pager );
	tablePanel.setWidth("100%");
	
	spTable.setWidget(tablePanel);
	
}
 
开发者ID:RISCOSS,项目名称:riscoss-corporate,代码行数:33,代码来源:RiskConfsModule.java

示例4: NarrativeSectionsTable

import com.google.gwt.cell.client.SafeHtmlCell; //导入依赖的package包/类
public NarrativeSectionsTable(String csv) {
	super(csv, 1, false);

	Column<String[], SafeHtml> idcol = new Column<String[], SafeHtml>(
			new SafeHtmlCell()) {
		private final int col = 0;

		public SafeHtml getValue(String[] row) {
			if (col < row.length) {
				String id = normalizeSectionId(row[col]);

				String url = "#"
						+ Action.SEARCH
								.toToken(
										Searcher.UserField.NARRATIVE_SECTION
												.name(), id, "0");
				String link = "<a href='" + URL.encode(url) + "'>" + id
						+ "</a>";

				return SafeHtmlUtils.fromTrustedString(link);
			}

			return SafeHtmlUtils.EMPTY_SAFE_HTML;
		}
	};

	displayColumn(idcol, 0, Labels.INSTANCE.sectionId(), false);
	displayStringColumn(3, Labels.INSTANCE.description(), false);
	displayStringColumn(2, Labels.INSTANCE.lecoy(), false);
}
 
开发者ID:jhu-digital-manuscripts,项目名称:rosa,代码行数:31,代码来源:NarrativeSectionsTable.java

示例5: IllustrationTitlesTable

import com.google.gwt.cell.client.SafeHtmlCell; //导入依赖的package包/类
public IllustrationTitlesTable(String csv) {
	super(csv, 1, true);

	Column<String[], SafeHtml> titlecol = new Column<String[], SafeHtml>(
			new SafeHtmlCell()) {
		private final int col = 1;

		public SafeHtml getValue(String[] row) {
			if (col < row.length) {
				String title = row[col];
				String query = Searcher.createLiteralQuery(title);

				String url = "#"
						+ Action.SEARCH.toToken(
								Searcher.UserField.ILLUSTRATION_TITLE
										.name(), query, "0");
				String link = "<a href='" + URL.encode(url) + "'>" + title
						+ "</a>";

				return SafeHtmlUtils.fromTrustedString(link);
			}

			return SafeHtmlUtils.EMPTY_SAFE_HTML;
		}
	};

	displayIntegerColumn(0, Labels.INSTANCE.position(), true);
	displayColumn(titlecol, 1, Labels.INSTANCE.illustrationTitle(), false);
	displayIntegerColumn(2, Labels.INSTANCE.frequency(), false);
}
 
开发者ID:jhu-digital-manuscripts,项目名称:rosa,代码行数:31,代码来源:IllustrationTitlesTable.java

示例6: RCSelectionPanel

import com.google.gwt.cell.client.SafeHtmlCell; //导入依赖的package包/类
public RCSelectionPanel() {
	
	exportJS();
	
	table = new CellTable<ModelInfo>(15, (Resources) GWT.create(TableResources.class));
	
	table.addColumn( new Column<ModelInfo,SafeHtml>(new SafeHtmlCell() ) {
		@Override
		public SafeHtml getValue(ModelInfo object) {
			return new LinkHtml( object.getName(), "javascript:setSelectedRC(\"" + object.getName() + "\")" ); };
	}, "Available Risk Configurations");
	
	modelDataProvider = new ListDataProvider<ModelInfo>();
	modelDataProvider.addDataDisplay(table);
	
	SimplePager pager = new SimplePager();
    pager.setDisplay( table );
    
	tablePanel.add( table );
	tablePanel.add( pager );
	
}
 
开发者ID:RISCOSS,项目名称:riscoss-corporate,代码行数:23,代码来源:RCSelectionPanel.java

示例7: getEmail

import com.google.gwt.cell.client.SafeHtmlCell; //导入依赖的package包/类
@Column(cellType = SafeHtmlCell.class)
//   @ColumnActions(position = 2)
   public SafeHtml getEmail()
   {
      return email;
   }
 
开发者ID:symulakr,项目名称:generators-example,代码行数:7,代码来源:Customer.java

示例8: SafeHtmlColumn

import com.google.gwt.cell.client.SafeHtmlCell; //导入依赖的package包/类
public SafeHtmlColumn() {
	super(new SafeHtmlCell());
}
 
开发者ID:nodchip,项目名称:QMAClone,代码行数:4,代码来源:SafeHtmlColumn.java


注:本文中的com.google.gwt.cell.client.SafeHtmlCell类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。