com.vaadin.Application类的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(128)

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

Application介绍

暂无

代码示例

代码示例来源:origin: org.aperteworkflow/gui-commons

public void show(Application application) {
  application.getMainWindow().addWindow(this);
}

代码示例来源:origin: de.mhus.lib/mhu-lib-vaadin6

@Override
public void close() {
  super.close();
}

代码示例来源:origin: org.aperteworkflow/base-widgets

@Override
public void saveData(BpmTask task) {
  ProcessInstance pi = task.getProcessInstance();
  setSimpleAttribute(localeKey, nvl(lbl.getApplication().getLocale(), Locale.getDefault()).toString(), pi);
}

代码示例来源:origin: nz.co.senanque/madura-vaadinsupport

+ "DTD/xhtml1-transitional.dtd\">\n";
String appUri = getApplication().getURL().toString()
    + getWindow().getName() + "/";
    + "      method='post'>";
String theme = getApplication().getTheme();
InputStream is = null;
StringBuilder sb = new StringBuilder();

代码示例来源:origin: org.activiti/activiti-explorer

public void setLocale(Locale locale) {
 super.setLocale(locale);
 if(i18nManager != null) {
  i18nManager.setLocale(locale);
 }
}

代码示例来源:origin: apache/ace

private void addCrossPlatformShortcut(Button button, int key, String description) {
  // ACE-427 - NPE when using getMainWindow() if no authentication is used...
  WebApplicationContext context = (WebApplicationContext) getApplication().getContext();
  ShortcutHelper.addCrossPlatformShortcut(context.getBrowser(), button, description, key);
}

代码示例来源:origin: org.activiti/activiti-explorer

protected byte[] getLoginHTML() {
 String appUri = getApplication().getURL().toString()
     + getWindow().getName() + "/";

代码示例来源:origin: org.aperteworkflow/gui-commons

@Override
public void setLocale(Locale locale) {
  super.setLocale(locale);
  this.locale = locale;
  this.i18NSource = I18NSourceFactory.createI18NSource(locale);
}

代码示例来源:origin: nz.co.senanque/madura-vaadinsupport

public void logout() {
  HttpSession httpSession = ((WebApplicationContext)getApplication().getContext()).getHttpSession();
  httpSession.invalidate();
  if (getMaduraSessionManager() != null)
  {
    getMaduraSessionManager().close();
  }
}
/* (non-Javadoc)

代码示例来源:origin: net.sf.itcb.common/itcb-common-web-vaadin

@Override
public void handleAfterChangePage(String pageRef, ItcbComponent itcbComponent, ReloadOrder reloadOrder,
    ExecutedAction executedAction, Object requestContextVar) {
        if(itcbComponent instanceof ItcbPage && executedAction.equals(ExecutedAction.FULL_LOAD)) {
       ItcbPage page = (ItcbPage) itcbComponent;
          // Google Analytics
       // Track the page view
       StringBuffer sb = new StringBuffer(50);
       sb.append("_gaq.push(['_setAccount', '")
         .append(accountId)
         .append("'],")
         .append("['_trackPageview', '")
         .append(prefix)
         .append(pageRef)
         .append(".html']);");
       sb.append("_gaq.push(['_trackPageLoadTime']);");
       page.getApplication().getMainWindow().executeJavaScript(sb.toString());
     }
  
}

代码示例来源:origin: org.apache.ace/org.apache.ace.webui.vaadin

@Override
public void close() {
  super.close();
  // when the session times out
  // TODO: clean up the ace client session?
}

代码示例来源:origin: apache/ace

@Override
  protected String formatPropertyValue(Object rowId, Object colId, Property property) {
    DateFormat formatter = SimpleDateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, getApplication().getLocale());
    if (COL_TIME.equals(colId)) {
      return formatter.format(property.getValue());
    }
    return super.formatPropertyValue(rowId, colId, property);
  }
};

代码示例来源:origin: org.aperteworkflow/gui-commons

protected void closeWindow() {
    getApplication().getMainWindow().removeWindow(this);
  }
}

代码示例来源:origin: apache/ace

@Override
public void close() {
  if (isRunning()) {
    m_admin.deleteLocal();
    cleanupListeners();
    m_manager.remove(m_component);
    super.close();
  }
}

代码示例来源:origin: org.aperteworkflow/gui-commons

private void initForm() {
  layout = new GridLayout(2, 3);
  layout.setMargin(false);
  layout.setSpacing(true);
  layout.setWidth("100%");
  setLayout(layout);
  setLocale(application.getLocale());
  setFormFieldFactory(createItemFormFieldFactory(application, source,
      FIELDS_VISIBLE, FIELDS_EDITABLE, FIELDS_REQUIRED));
  setItemDataSource(item);
  setVisibleItemProperties(FIELDS_VISIBLE);
  setValidationVisible(false);
  setValidationVisibleOnCommit(false);
  setImmediate(true);
  setWriteThrough(false);
  setFooter(horizontalLayout(Alignment.MIDDLE_RIGHT, cancelButton, saveButton));
}

代码示例来源:origin: org.aperteworkflow/base-widgets

protected void closeWindow() {
  getApplication().getMainWindow().removeWindow(this);
}

代码示例来源:origin: org.activiti/activiti-explorer

/**
  *  Required to support multiple browser windows/tabs, 
  *  see http://vaadin.com/web/joonas/wiki/-/wiki/Main/Supporting%20Multible%20Tabs
  */
//  public Window getWindow(String name) {
//    Window window = super.getWindow(name);
//    if (window == null) {
//      window = new Window("Activiti Explorer");
//      window.setName(name);
//      addWindow(window);
//      window.open(new ExternalResource(window.getURL()));
//    }
//
//    return window;
//  }
 
 @Override
 public void close() {
  final LoggedInUser theUser = getLoggedInUser();
  
  // Clear the logged in user
  setUser(null);
  
  // Call loginhandler
  getLoginHandler().logout(theUser);
  
  invalidatedSession = false;
  super.close();
 }

代码示例来源:origin: org.aperteworkflow/editor

@Override
  public void run() {
    Window window = new NewLanguageWindow();
    MessageEditor.this.getApplication().getMainWindow().addWindow(window);
  }
}

代码示例来源:origin: org.aperteworkflow/base-widgets

protected <DialogType extends DialogWindow> DialogType showDialog(DialogType dialog) {
  dialog.setI18NSource(messageSource);
  dialog.buildLayout();
  application.getMainWindow().addWindow(dialog);
  return dialog;
}

代码示例来源:origin: org.aperteworkflow/base-widgets

private void showInfoNotification(String message) {
  getApplication().getMainWindow().showNotification(getLocalizedMessage(message),
      Window.Notification.TYPE_HUMANIZED_MESSAGE);
}

相关文章