本文整理汇总了Java中com.google.gwt.user.client.ui.HTML.setTitle方法的典型用法代码示例。如果您正苦于以下问题:Java HTML.setTitle方法的具体用法?Java HTML.setTitle怎么用?Java HTML.setTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.HTML
的用法示例。
在下文中一共展示了HTML.setTitle方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: turnOffRow
import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
private void turnOffRow(int row) {
CellFormatter formatter = datatable.getCellFormatter();
int dataRow = row - headerRows;
String[] oldnew = dirtyrows.get(row);
HTML html = new HTML(oldnew[0]);
html.setTitle(oldnew[0]);
int width = headertable.getWidget(0, 1).getOffsetWidth();
html.setWidth(width+"px");
// Put the old value back in the data structure used to make the JSON payload.
List<String[]> affectedrow = allrows.get(ids.getValue());
String[] parts = affectedrow.get(dataRow);
for (int i = 0; i < parts.length; i++) {
if ( headers[i].contains("WOCE") ) {
parts[i] = oldnew[0];
}
}
formatter.removeStyleName(row, 1, "dirty");
datatable.setWidget(row, 1, html);
}
示例2: render
import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
public Widget render(Row row, Column column, Object value) {
if(value == null) {
return null;
} else {
String text = value.toString();
if(_asHTML) {
HTML html = new HTML(text, _wordWrap);
if(_title != null) html.setTitle(_title);
return html;
} else {
Label label = new Label(text, _wordWrap);
if(_title != null) label.setTitle(_title);
return label;
}
}
}
示例3: FooterScreen
import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
public FooterScreen() {
HorizontalPanel panel = new HorizontalPanel();
HTML label = new HTML("OneCMDB 1.4.0 Beta © Lokomo Systems <<a href='javascript:;'>about</a>>");
label.setTitle("Show about screen");
label.setStyleName("onecmdb-footer-label");
panel.add(label);
panel.setCellHorizontalAlignment(label, HorizontalPanel.ALIGN_RIGHT);
panel.setStyleName("onecmdb-footer");
label.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
getBaseEntryScreen().showScreen(OneCMDBApplication.SHOW_STATIC_CONTENT,
"about.html",
new Long(0));
}
});
initWidget(panel);
}
示例4: load
import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
public void load() {
if (this.currentTemplate == null) {
setErrorText("No Template to show!");
return;
}
setErrorText("");
setTitleText("Attributes for ");
setTitleWidget(new CIIconDisplayNameWidget(this.currentTemplate));
vPanel.clear();
HTML add = new HTML("[<a href='javascript:;'>new</a>]");
add.setTitle("Add a new attribute to this template");
add.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
OneCMDBModelCreator.get().showScreen(OneCMDBModelCreator.ADD_ATTRIBUTE_SCREEN, currentTemplate.getAlias(), new Long(0));
}
});
HorizontalPanel hPanel = new HorizontalPanel();
hPanel.add(add);
hPanel.setCellHorizontalAlignment(add, HorizontalPanel.ALIGN_RIGHT);
hPanel.setWidth("100%");
vPanel.add(hPanel);
vPanel.add(getAttributeTable());
}
示例5: CmdButton
import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
public CmdButton(String name, Widget icon, Command cmd, String label, String desc) {
this.name = name;
this.command = cmd;
this.name = name;
String htmlstr = label == null ? name : label;
html = new HTML(htmlstr);
if (desc != null) {
html.setTitle(desc);
}
this.command = cmd;
html.setWordWrap(false);
if (command instanceof GeneralCommand) {
addListeners();
setButtonEnabled(((GeneralCommand)command).isEnabled());
}
GwtUtil.setStyles(iconHolderLeft, "padding", "none", "marginRight", "3px");
GwtUtil.setStyle(html, "padding", "6px 0");
container = GwtUtil.makeHoriPanel(null, null, iconHolderLeft, html, iconHolderRight);
container.setCellVerticalAlignment(iconHolderLeft, VerticalPanel.ALIGN_MIDDLE);
container.setCellVerticalAlignment(iconHolderRight, VerticalPanel.ALIGN_MIDDLE);
setIconLeft(icon);
setIconRight(null);
GwtUtil.setStyle(container, "margin", "0px auto");
initWidget(new SimplePanel(container));
}
示例6: makeLabel
import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
protected Widget makeLabel() {
label = new HTML(getName(), false);
if (tooltips != null) {
label.setTitle(tooltips);
}
if (isRemovable) {
HorizontalPanel hp = new HorizontalPanel();
IconCreator ic= IconCreator.Creator.getInstance();
Image img= new Image(ic.getBlueDelete10x10());
DOM.setStyleAttribute(img.getElement(), "cursor", "pointer");
img.addClickHandler(new ClickHandler(){
public void onClick(ClickEvent event) {
tabPane.removeTab(getName());
tabPane.tabPanel.adjustTabWidth();
}
});
hp.add(label);
hp.add(GwtUtil.getFiller(5,1));
hp.add(img);
hp.addStyleName("removable");
return hp;
} else {
return label;
}
}
示例7: newDatePanel
import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
private FlowPanel newDatePanel() {
FlowPanel flowPanel=new FlowPanel();
yearMonthHtml = new HTML();
yearMonthHtml.setTitle(i18n.year());
flowPanel.add(yearMonthHtml);
return flowPanel;
}
示例8: NewURIFieldWidget
import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
public NewURIFieldWidget(AttributeValue v) {
super(v.getLabel());
this.value = v;
if (value.getCtrl().isReadonly()) {
HTML html = new HTML();
if (!this.value.isNullValue()) {
html.setHTML("<a href='javascript:;'>" + this.value.getStringValue() +"</a>");
}
html.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
Window.open(value.getStringValue(), "_blank", "");
}
});
html.setWordWrap(true);
html.setTitle(this.value.getStringValue());
addField(html);
html.setStyleName("mdv-form-input-readonly");
setRequired(false);
} else {
box = new TextBox();
box.setText(value.getStringValue());
box.addKeyboardListener(this);
setRequired(value.getCtrl().isRequiered());
addField(box);
}
}
示例9: updateHeaderTable
import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
protected void updateHeaderTable(List<ColumnDefinition<TableData.Row, ?>> colDefs, boolean force) {
if (!colDefs.equals(lastColDefs) || force) {
lastColDefs = colDefs;
int numColumns = colDefs.size();
// clear the headers
clearTable(headers, numColumns);
// Add the column and group headers
for (int i = 0; i < numColumns; i++) {
// Add the name
ColDef colDef = (ColDef) colDefs.get(i);
if (colDef == null) continue; // skip if colDef is null
String title = colDef.isImmutable() ? "" : "<b>" + colDef.getTitle() + "</b>";
HTML label = new HTML(title, false);
label.setTitle(colDef.getShortDesc());
label.setWidth("10px");
DOM.setStyleAttribute(label.getElement(), "display", "inline");
headers.setWidget(LABEL_IDX, i, label);
setColumnWidth(i, colDef.getPreferredColumnWidth());
headers.getFlexCellFormatter().setHorizontalAlignment(LABEL_IDX, i, HorizontalPanel.ALIGN_CENTER);
if (isShowUnits()) {
String u = colDef.getColumn() == null || StringUtils.isEmpty(colDef.getColumn().getUnits()) ? " " : "(" + colDef.getColumn().getUnits() + ")";
label.setHTML(label.getHTML() + "<br>" + u);
}
GwtUtil.setStyle(label, "display", "inline-table");
}
filterSupport.onUpdateHeaders(colDefs);
}
filterSupport.ensureFilterShow();
}
示例10: getHelpWidget
import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
private Widget getHelpWidget() {
HTML html = new HTML("<a href='http://www.onecmdb.org/wiki/index.php/Documentation'><img src='images/help16.gif'</a>");
html.setTitle("Help - On onecmdb.org");
return(html);
}
示例11: getHomeWidegt
import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
private Widget getHomeWidegt() {
HTML html = new HTML("<a href='../../index.html'><img src='images/home16.gif'</a>");
html.setTitle("Goto first page!");
return(html);
}
示例12: setupTable
import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
protected void setupTable() {
if (this.template == null) {
return;
}
setTitleText("Instances of ");
setTitleWidget(new CIIconDisplayNameWidget(this.template));
vPanel.clear();
table = null;
if (isNewSupport()) {
HorizontalPanel actionPanel = new HorizontalPanel();
HTML add = new HTML("[<a href='javascript:;'>new</a>]");
add.setTitle("Create a new instance");
actionPanel.add(add);
add.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
getBaseEntryScreen().showScreen(OneCMDBApplication.NEW_CI_SCREEN, template.getAlias(), new Long(0));
}
});
actionPanel.add(add);
actionPanel.setCellHorizontalAlignment(add, HorizontalPanel.ALIGN_RIGHT);
actionPanel.setWidth("100%");
vPanel.add(actionPanel);
}
VerticalPanel tablePanel = new VerticalPanel();
tablePanel.setStyleName("onecmdb-table-panel");
if (table == null) {
table = new CITablePanel();
table.addTableListener(ListCIScreen.this);
table.addLoadListener(ListCIScreen.this);
CITablePageControlPanel tablePageControl = new CITablePageControlPanel(table);
tablePanel.add(tablePageControl);
tablePanel.add(table);
tablePanel.setCellVerticalAlignment(tablePageControl, VerticalPanel.ALIGN_TOP);
tablePanel.setCellVerticalAlignment(table, VerticalPanel.ALIGN_TOP);
}
vPanel.add(tablePanel);
table.setAttributeRender(getAttributeRender());
table.setTabelControl(getTableControl(this.template));
table.load();
}