本文整理汇总了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%");
}
示例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();
}
};
}
示例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);
}
示例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);
}
示例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);
}
示例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 );
}
示例7: getEmail
import com.google.gwt.cell.client.SafeHtmlCell; //导入依赖的package包/类
@Column(cellType = SafeHtmlCell.class)
// @ColumnActions(position = 2)
public SafeHtml getEmail()
{
return email;
}
示例8: SafeHtmlColumn
import com.google.gwt.cell.client.SafeHtmlCell; //导入依赖的package包/类
public SafeHtmlColumn() {
super(new SafeHtmlCell());
}