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

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

本文整理了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

  1. @Override
  2. public void buttonClick(ClickEvent event) {
  3. // try if alarm is there, otherwise show information dialog
  4. OnmsAlarm alarm = alarmDao.get(alarmId);
  5. if (alarm == null) {
  6. new DialogWindow(source.getUI(),
  7. "Alarm does not exist!",
  8. "The alarm information cannot be shown. \nThe alarm does not exist anymore. \n\nPlease refresh the Alarm Table.");
  9. return;
  10. }
  11. // alarm still exists, show alarm details
  12. final URI currentLocation = Page.getCurrent().getLocation();
  13. final String contextRoot = VaadinServlet.getCurrent().getServletContext().getContextPath();
  14. final String redirectFragment = contextRoot + "/alarm/detail.htm?quiet=true&id=" + alarmId;
  15. LOG.debug("alarm {} clicked, current location = {}, uri = {}", alarmId, currentLocation, redirectFragment);
  16. try {
  17. source.getUI().addWindow(
  18. new InfoWindow(new URL(currentLocation.toURL(), redirectFragment), new LabelCreator() {
  19. @Override
  20. public String getLabel() {
  21. return "Alarm Info " + alarmId;
  22. }
  23. }));
  24. } catch (MalformedURLException e) {
  25. LOG.error(e.getMessage(), e);
  26. }
  27. }
  28. });

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

  1. @Override
  2. public Object generateCell(Table source, Object itemId, Object columnId) {
  3. final ZoneId userTimeZoneId = UserTimeZoneExtractor.extractUserTimeZoneIdOrNull(source.getUI());
  4. final Property property = source.getContainerProperty(itemId, columnId);
  5. if (property == null || property.getValue() == null) {
  6. return null;
  7. }
  8. String formattedValue;
  9. if(property.getType().equals(Instant.class)){
  10. formattedValue = timeformatService.format((Instant) property.getValue(), userTimeZoneId);
  11. } else if(property.getType().equals(Date.class)){
  12. formattedValue = timeformatService.format((Date) property.getValue(), userTimeZoneId);
  13. } else {
  14. formattedValue = property.toString();
  15. }
  16. return formattedValue;
  17. }
  18. }

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

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

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

  1. T tableImpl = WebAbstractTable.this.component;
  2. CubaUI ui = (CubaUI) tableImpl.getUI();
  3. if (!ui.isAccessibleForUser(tableImpl)) {
  4. LoggerFactory.getLogger(WebAbstractTable.class)
  5. T tableImpl = WebAbstractTable.this.component;
  6. CubaUI ui = (CubaUI) tableImpl.getUI();
  7. if (!ui.isAccessibleForUser(tableImpl)) {
  8. LoggerFactory.getLogger(WebAbstractTable.class)

相关文章

Table类方法