Java Code Examples for com.google.gwt.safehtml.shared.SafeHtmlUtils#fromTrustedString()
The following examples show how to use
com.google.gwt.safehtml.shared.SafeHtmlUtils#fromTrustedString() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LayerCatalogDialog.java From geowe-core with GNU General Public License v3.0 | 5 votes |
private ColumnModel<LayerDef> createColumnList(LayerDefProperties props, RowExpander<LayerDef> rowExpander) { rowExpander.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); rowExpander.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); ColumnConfig<LayerDef, String> nameColumn = new ColumnConfig<LayerDef, String>( props.name(), 200, SafeHtmlUtils.fromTrustedString("<b>" + UIMessages.INSTANCE.layerManagerToolText() + "</b>")); nameColumn.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); ColumnConfig<LayerDef, String> typeColumn = new ColumnConfig<LayerDef, String>( props.type(), 75, UICatalogMessages.INSTANCE.type()); typeColumn.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); typeColumn.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); ColumnConfig<LayerDef, ImageResource> iconColumn = new ColumnConfig<LayerDef, ImageResource>( props.icon(), 32, ""); iconColumn.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); iconColumn.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); iconColumn.setCell(new ImageResourceCell() { @Override public void render(Context context, ImageResource value, SafeHtmlBuilder sb) { super.render(context, value, sb); } }); List<ColumnConfig<LayerDef, ?>> columns = new ArrayList<ColumnConfig<LayerDef, ?>>(); columns.add(rowExpander); columns.add(iconColumn); columns.add(nameColumn); columns.add(typeColumn); return new ColumnModel<LayerDef>(columns); }
Example 2
Source File: CirSim.java From circuitjs1 with GNU General Public License v2.0 | 4 votes |
MenuItem menuItemWithShortcut(String text, String shortcut, MyCommand cmd) { final String edithtml="<div style=\"display:inline-block;width:80px;\">"; String sn=edithtml + text + "</div>" + shortcut; return new MenuItem(SafeHtmlUtils.fromTrustedString(sn), cmd); }
Example 3
Source File: CirSim.java From circuitjs1 with GNU General Public License v2.0 | votes |
static SafeHtml LSHTML(String s) { return SafeHtmlUtils.fromTrustedString(LS(s)); }