com.vaadin.v7.ui.Table.getUI()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(131)

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

Table.getUI介绍

暂无

代码示例

代码示例来源:origin: OpenNMS/opennms

@Override
  public void buttonClick(ClickEvent event) {
    // try if alarm is there, otherwise show information dialog
    OnmsAlarm alarm = alarmDao.get(alarmId);
    if (alarm == null) {
      new DialogWindow(source.getUI(), 
             "Alarm does not exist!", 
             "The alarm information cannot be shown. \nThe alarm does not exist anymore. \n\nPlease refresh the Alarm Table.");
      return;
    }
    
    // alarm still exists, show alarm details
        final URI currentLocation = Page.getCurrent().getLocation();
        final String contextRoot = VaadinServlet.getCurrent().getServletContext().getContextPath();
        final String redirectFragment = contextRoot + "/alarm/detail.htm?quiet=true&id=" + alarmId;
        LOG.debug("alarm {} clicked, current location = {}, uri = {}", alarmId, currentLocation, redirectFragment);
        try {
      source.getUI().addWindow(
        new InfoWindow(new URL(currentLocation.toURL(), redirectFragment), new LabelCreator() {
            
          @Override
          public String getLabel() {
            return "Alarm Info " + alarmId;
          }
        }));
    } catch (MalformedURLException e) {
      LOG.error(e.getMessage(), e);
    }
  }
});

代码示例来源:origin: OpenNMS/opennms

@Override
  public Object generateCell(Table source, Object itemId, Object columnId) {
    final ZoneId userTimeZoneId =  UserTimeZoneExtractor.extractUserTimeZoneIdOrNull(source.getUI());
    final Property property = source.getContainerProperty(itemId, columnId);
    if (property == null || property.getValue() == null) {
      return null;
    }
    String formattedValue;
    if(property.getType().equals(Instant.class)){
      formattedValue = timeformatService.format((Instant) property.getValue(), userTimeZoneId);
    } else if(property.getType().equals(Date.class)){
      formattedValue = timeformatService.format((Date) property.getValue(), userTimeZoneId);
    } else {
      formattedValue = property.toString();
    }
    return formattedValue;
  }
}

代码示例来源:origin: com.haulmont.cuba/cuba-web

UI ui = component.getUI();
VaadinSession session = ui != null ? ui.getSession() : null;
Converter converter = ConverterUtil.getConverter(String.class, property.getType(), session);

代码示例来源:origin: com.haulmont.cuba/cuba-web

T tableImpl = WebAbstractTable.this.component;
      CubaUI ui = (CubaUI) tableImpl.getUI();
      if (!ui.isAccessibleForUser(tableImpl)) {
        LoggerFactory.getLogger(WebAbstractTable.class)
T tableImpl = WebAbstractTable.this.component;
CubaUI ui = (CubaUI) tableImpl.getUI();
if (!ui.isAccessibleForUser(tableImpl)) {
  LoggerFactory.getLogger(WebAbstractTable.class)

相关文章

微信公众号

最新文章

更多

Table类方法