本文整理汇总了Java中com.google.gwt.user.client.ui.Label.setTitle方法的典型用法代码示例。如果您正苦于以下问题:Java Label.setTitle方法的具体用法?Java Label.setTitle怎么用?Java Label.setTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.Label
的用法示例。
在下文中一共展示了Label.setTitle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getCell
import com.google.gwt.user.client.ui.Label; //导入方法依赖的package包/类
protected Widget getCell(final AttributeInterface feature, final AttributesColumn column, final int idx) {
switch (column) {
case NAME:
return new Label(feature.getName() == null ? "" : feature.getName(), false);
case CODE:
return new Label(feature.getCode() == null ? "" : feature.getCode(), false);
case TYPE:
if (feature.getType() == null)
return null;
else {
Label type = new Label(feature.getType().getAbbreviation(), false);
type.setTitle(feature.getType().getLabel());
return type;
}
case PARENT:
return new Label(feature.getParentName() == null ? "" : feature.getParentName(), false);
case INSTRUCTORS:
if (feature.hasInstructors())
return new InstructorsCell(feature);
else
return null;
default:
return null;
}
}
示例2: getCell
import com.google.gwt.user.client.ui.Label; //导入方法依赖的package包/类
protected Widget getCell(final FeatureInterface feature, final RoomFeaturesColumn column, final int idx) {
switch (column) {
case NAME:
return new Label(feature.getLabel() == null ? "" : feature.getLabel(), false);
case ABBREVIATION:
return new Label(feature.getAbbreviation() == null ? "" : feature.getAbbreviation(), false);
case TYPE:
if (feature.getType() == null)
return null;
else {
Label type = new Label(feature.getType().getAbbreviation(), false);
type.setTitle(feature.getType().getLabel());
return type;
}
case DEPARTMENT:
return new DepartmentCell(true, feature.getDepartment());
case DESCRIPTION:
if (feature.hasDescription()) {
HTML html = new HTML(feature.getDescription());
html.setStyleName("description");
return html;
} else
return null;
case ROOMS:
if (feature.hasRooms())
return new RoomsCell(feature);
else
return null;
default:
return null;
}
}