本文整理了Java中com.smartgwt.client.widgets.Label.setValign()
方法的一些代码示例,展示了Label.setValign()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.setValign()
方法的具体详情如下:
包路径:com.smartgwt.client.widgets.Label
类名称:Label
方法名:setValign
[英]Vertical alignment of label text. See VerticalAlignment type for details.
[中]标签文本的垂直对齐。有关详细信息,请参见垂直对齐类型。
代码示例来源:origin: org.geomajas.widget/geomajas-widget-advancedviews-gwt
desc.setHeight100();
desc.setBackgroundColor("transparent");
desc.setValign(VerticalAlignment.CENTER);
addMember(desc);
代码示例来源:origin: org.geomajas.widget/geomajas-widget-featureinfo-gwt
public Window createFeatureDetailWindow(Feature feature, boolean editingAllowed) {
String url = buildUrl(feature);
if (url == null) {
if (showDefaultIfNull) {
return FeatureDetailWidgetFactory.createDefaultFeatureDetailWindow(feature, feature.getLayer(),
editingAllowed);
} else {
Label l = new Label(MESSAGES.urlFeatureDetailWidgetBuilderNoValue());
l.setWidth100();
l.setHeight100();
l.setValign(VerticalAlignment.CENTER);
l.setAlign(Alignment.CENTER);
Window w = createWindow(feature.getLabel());
w.addItem(l);
return w;
}
} else {
HTMLPane htmlPane = new HTMLPane();
htmlPane.setWidth100();
htmlPane.setHeight100();
htmlPane.setContentsURL(url);
htmlPane.setContentsType(ContentsType.PAGE);
Window w = createWindow(feature.getLabel());
w.addItem(htmlPane);
return w;
}
}
内容来源于网络,如有侵权,请联系作者删除!