com.smartgwt.client.widgets.Label.setValign()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(125)

本文整理了Java中com.smartgwt.client.widgets.Label.setValign()方法的一些代码示例,展示了Label.setValign()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.setValign()方法的具体详情如下:
包路径:com.smartgwt.client.widgets.Label
类名称:Label
方法名:setValign

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;
  }
}

相关文章