List of usage examples for com.google.gwt.safehtml.shared SafeHtmlUtils fromSafeConstant
public static SafeHtml fromSafeConstant(String s)
From source file:com.ephesoft.gxt.core.client.ui.widget.CustomMenuBar.java
License:Open Source License
/** * Adds a menu item to the bar, that will fire the given command when it is selected. * /*from w ww . j av a 2 s . c om*/ * @param text the item's text * @param cmd the command to be fired * @return the {@link MenuItem} object created */ public MenuItem addItem(String text, ScheduledCommand cmd) { return this.addItem(SafeHtmlUtils.fromSafeConstant(text), cmd); }
From source file:com.ephesoft.gxt.core.client.ui.widget.CustomMenuItem.java
License:Open Source License
/** * Constructs a new menu item that fires a command when it is selected. * /*w w w .jav a2 s .co m*/ * @param html the item's html text */ public CustomMenuItem(SafeHtml html) { super(SafeHtmlUtils.fromSafeConstant(addTextInsideDiv(html.asString()))); }
From source file:com.ephesoft.gxt.core.client.ui.widget.CustomMenuItem.java
License:Open Source License
/** * Constructs a new menu item that fires a command when it is selected. * /* w w w .j a v a 2 s . c om*/ * @param html the item's text * @param cmd the command to be fired when it is selected */ public CustomMenuItem(SafeHtml html, ScheduledCommand cmd) { super(SafeHtmlUtils.fromSafeConstant(addTextInsideDiv(html.asString())), cmd); }
From source file:com.ephesoft.gxt.core.client.ui.widget.CustomMenuItem.java
License:Open Source License
/** * Constructs a new menu item that cascades to a sub-menu when it is selected. * /*from w w w .j a va2 s . c o m*/ * @param html the item's text * @param subMenu the sub-menu to be displayed when it is selected */ public CustomMenuItem(SafeHtml html, MenuBar subMenu) { super(SafeHtmlUtils.fromSafeConstant(addTextInsideDiv(html.asString())), subMenu); this.addStyleName("gwt-MenuItem-dropdown"); }
From source file:com.ephesoft.gxt.core.client.ui.widget.CustomMenuItem.java
License:Open Source License
/** * Constructs a new menu item that fires a command when it is selected. * //from ww w . j a v a 2 s . c om * @param text the item's text * @param cmd the command to be fired when it is selected */ public CustomMenuItem(String text, ScheduledCommand cmd) { this(SafeHtmlUtils.fromSafeConstant(addTextInsideDiv(text)), cmd); }
From source file:com.ephesoft.gxt.core.client.ui.widget.CustomMenuItem.java
License:Open Source License
/** * Constructs a new menu item that cascades to a sub-menu when it is selected. * /*from w ww .j av a 2 s . c o m*/ * @param text the item's text * @param subMenu the sub-menu to be displayed when it is selected */ public CustomMenuItem(String text, MenuBar subMenu) { this(SafeHtmlUtils.fromSafeConstant(addTextInsideDiv(text)), subMenu); this.addStyleName("gwt-MenuItem-dropdown"); }
From source file:com.ephesoft.gxt.core.client.ui.widget.Grid.java
License:Open Source License
public void addSelectAllFunctionality(final ValueProvider<T, ?> valueProvider) { if (null != valueProvider) { ColumnConfig<T, ?> columnConfig = getColumn(valueProvider); if (null != columnConfig) { columnConfig.setSortable(false); columnConfig.setMenuDisabled(true); columnConfig.setHideable(false); columnConfig.setWidget(getAllModelsSelector(), SafeHtmlUtils.fromSafeConstant(".")); }//from ww w . j a v a2 s. c om } }
From source file:com.ephesoft.gxt.rv.client.widget.DataTableGrid.java
License:Open Source License
private static ColumnModel<Row> getColumnModel(final DataTable dataTable) { final List<ColumnConfig<Row, ?>> columnConfigList = new LinkedList<ColumnConfig<Row, ?>>(); if (null != dataTable) { final List<Column> headerColumnList = BatchSchemaUtil.getHeaderColumn(dataTable); if (!CollectionUtil.isEmpty(headerColumnList)) { final ColumnConfig<Row, Boolean> selectionColumn = new ColumnConfig<Row, Boolean>( selectedRowValueProvider); columnConfigList.add(selectionColumn); selectionColumn.setWidth(SELECTION_COLUMN_WIDTH); selectionColumn.setCell(getSelectionCell()); selectionColumn.setWidget(getSelectionCheckBox(), SafeHtmlUtils.fromSafeConstant(".")); selectionColumn.setSortable(false); selectionColumn.setFixed(true); selectionColumn.setMenuDisabled(true); ColumnConfig<Row, String> columnConfig; ColumnValueProvider valueProvider; for (final Column headerColumn : headerColumnList) { valueProvider = new ColumnValueProvider(headerColumn, dataTable.getName()); columnConfig = new ColumnConfig<Row, String>(valueProvider); columnConfig.setFixed(false); columnConfig.setSortable(false); columnConfig.setMenuDisabled(true); columnConfig.setHeader(headerColumn.getName()); columnConfigList.add(columnConfig); }/*from w ww. j a va 2s . c o m*/ } } final ColumnModel<Row> dataTableColumnModel = new ColumnModel<Row>(columnConfigList); return dataTableColumnModel; }
From source file:com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel.java
License:sencha.com license
public CheckBoxSelectionModel() { super();/*from w ww . j a v a 2s . c om*/ config = newColumnConfig(); config.setId("checker"); config.setWidth(20); config.setSortable(false); config.setResizable(false); config.setFixed(true); config.setMenuDisabled(true); config.setDataIndex(""); config.setRenderer(new GridCellRenderer<M>() { public SafeHtml render(M model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<M> store, Grid<M> grid) { config.cellAttr = "rowspan='2'"; return SafeHtmlUtils.fromSafeConstant("<div class='x-grid3-row-checker'> </div>"); } }); }
From source file:com.extjs.gxt.ui.client.widget.Status.java
License:sencha.com license
public void setBusyText(String text) { setBusy(SafeHtmlUtils.fromSafeConstant(text)); }