Package com.vaadin

Examples of com.vaadin.Application


        }
    }

    public void firePortletActionRequest(Portlet portlet,
            ActionRequest request, ActionResponse response) {
        Application app = getPortletApplication(portlet);
        Set<PortletListener> listeners = portletListeners.get(app);
        if (listeners != null) {
            for (PortletListener l : listeners) {
                l.handleActionRequest(request, response);
            }
View Full Code Here


                out.print("<div>" + e + "</div>");
                ctx.setPortletApplication(this, null);
                return;
            }

            Application app = (Application) request
                    .getAttribute(Application.class.getName());
            ctx.setPortletApplication(this, app);
            ctx.firePortletRenderRequest(this, request, response);

        }
View Full Code Here

        // Gets file properties
        final String filename = upload.getContentName();
        final String type = upload.getContentType();

        final Application application = getApplication();

        synchronized (application) {
            fireStarted(filename, type);
        }
View Full Code Here

            return locale;
        }
        if (parent != null) {
            return parent.getLocale();
        }
        final Application app = getApplication();
        if (app != null) {
            return app.getLocale();
        }
        return null;
    }
View Full Code Here

    /**
     * Sets the focus for this component if the component is {@link Focusable}.
     */
    protected void focus() {
        if (this instanceof Focusable) {
            final Application app = getApplication();
            if (app != null) {
                getWindow().setFocusedComponent((Focusable) this);
                delayedFocus = false;
            } else {
                delayedFocus = true;
View Full Code Here

     * (non-Javadoc)
     *
     * @see com.vaadin.ui.Component.Focusable#focus()
     */
    public void focus() {
        final Application app = getApplication();
        if (app != null) {
            // TODO once in the core, this will work
            // getWindow().setFocusedComponent(this);
            delayedFocus = false;
        } else {
View Full Code Here

    // Popup test
    grid.addComponent(new Button("Open a map in a popup",
        new Button.ClickListener() {
          public void buttonClick(ClickEvent event) {
            Application app = event.getButton().getApplication();

            GoogleMap map2 = new GoogleMap(event.getButton()
                .getApplication(), new Point2D.Double(22.3,
                60.4522), 8);

            map2.setHeight("240px");
            map2.setWidth("240px");

            Window w = new Window("popup");
            w.addComponent(map2);
            w.setHeight("300px");
            w.setWidth("300px");

            app.getMainWindow().addWindow(w);
          }
        }));

    grid.addComponent(new Button("Resize map", new Button.ClickListener() {
      public void buttonClick(ClickEvent event) {
View Full Code Here

    protected Application getNewApplication(HttpServletRequest request)
            throws ServletException {

        // Creates a new application instance
        try {
            final Application application = getApplicationClass().newInstance();

            return application;
        } catch (final IllegalAccessException e) {
            throw new ServletException("getNewApplication failed", e);
        } catch (final InstantiationException e) {
View Full Code Here

     *
     * @see #getWin()
     * @return application instance or null if not found.
     */
    public McApplication getApp() {
        Application a = cc.getApplication();
        if (a instanceof McApplication) {
            return (McApplication) a;
        }
        return McApplication.current();
    }
View Full Code Here

        if (value instanceof ExternalResource) {
            addAttribute(name, ((ExternalResource) value).getURL());

        } else if (value instanceof ApplicationResource) {
            final ApplicationResource r = (ApplicationResource) value;
            final Application a = r.getApplication();
            if (a == null) {
                throw new PaintException(
                        "Application not specified for resorce "
                                + value.getClass().getName());
            }
            String uri;
            if (a.getURL() != null) {
                uri = a.getURL().getPath();
            } else {
                uri = "";
            }
            if (uri.length() > 0 && uri.charAt(uri.length() - 1) != '/') {
                uri += "/";
            }
            uri += a.getRelativeLocation(r);
            addAttribute(name, uri);

        } else if (value instanceof ThemeResource) {
            final String uri = "theme://"
                    + ((ThemeResource) value).getResourceId();
View Full Code Here

TOP

Related Classes of com.vaadin.Application

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.