Examples of WindowState


Examples of com.dotcms.repackage.javax.portlet.WindowState

    PortletPreferences portletPrefs = null;
   
    PortletConfig portletConfig = PortalUtil.getPortletConfig(portlet, ctx);
    PortletContext portletCtx = portletConfig.getPortletContext();

    WindowState windowState = new WindowState(
      ParamUtil.getString(req, "p_p_state"));

    PortletMode portletMode = new PortletMode(
      ParamUtil.getString(req, "p_p_mode"));
View Full Code Here

Examples of com.vaadin.shared.ui.window.WindowState

    @Override
    public void onStateChanged(StateChangeEvent stateChangeEvent) {
        super.onStateChanged(stateChangeEvent);

        VWindow window = getWidget();
        WindowState state = getState();

        if (state.modal != window.vaadinModality) {
            window.setVaadinModality(!window.vaadinModality);
        }
        if (!window.isAttached()) {
View Full Code Here

Examples of com.vaadin.shared.ui.window.WindowState

        }
    }

    protected void updateWindowPosition() {
        VWindow window = getWidget();
        WindowState state = getState();
        if (state.windowMode == WindowMode.NORMAL) {
            // if centered, position handled in postLayout()
            if (!state.centered
                    && (state.positionX >= 0 || state.positionY >= 0)) {
                // If both positions are negative, then
View Full Code Here

Examples of com.vaadin.shared.ui.window.WindowState

        }
    }

    protected void updateWindowMode() {
        VWindow window = getWidget();
        WindowState state = getState();

        // update draggable on widget
        window.setDraggable(state.draggable
                && state.windowMode == WindowMode.NORMAL);
        // update resizable on widget
View Full Code Here

Examples of com.vaadin.shared.ui.window.WindowState

        window.updateMaximizeRestoreClassName(state.resizable, state.windowMode);
        window.updateContentsSize();
    }

    protected void onMaximizeRestore() {
        WindowState state = getState();
        if (state.resizable) {
            if (state.windowMode == WindowMode.MAXIMIZED) {
                state.windowMode = WindowMode.NORMAL;
            } else {
                state.windowMode = WindowMode.MAXIMIZED;
View Full Code Here

Examples of javax.portlet.WindowState

                portalURL.setResourceID(decodeControlParameter(token)[0]);
            }
          // Window state definition: portalURL.setWindowState().
          else if (token.startsWith(PREFIX + WINDOW_STATE)) {
            String[] decoded = decodeControlParameter(token);
            portalURL.setWindowState(decoded[0], new WindowState(decoded[1]));
          }
          // Portlet mode definition: portalURL.setPortletMode().
          else if (token.startsWith(PREFIX + PORTLET_MODE)) {
            String[] decoded = decodeControlParameter(token);
            portalURL.setPortletMode(decoded[0], new PortletMode(decoded[1]));
View Full Code Here

Examples of javax.portlet.WindowState

      {
         return WindowState.MAXIMIZED;
      }
      else
      {
         return new WindowState(windowStateName);
      }
   }
View Full Code Here

Examples of javax.portlet.WindowState

      {
         return WindowState.MAXIMIZED;
      }
      else
      {
         return new WindowState(windowStateName);
      }
   }
View Full Code Here

Examples of javax.portlet.WindowState

        try {
            // The PortletMode and WindowState can change during a portlet invocation, so we need
            // to be able to compare the results before and after invoking the portlet to know if
            // we need to broadcast a change event or not.
            PortletMode currentPortletMode = uicomponent.getCurrentPortletMode();
            WindowState currentWindowState = uicomponent.getCurrentWindowState();

            String action = context.getRequestParameter(PortalRequestContext.UI_COMPONENT_ACTION);
            if (action != null) {
                Event<UIComponent> event = uicomponent.createEvent(action, Event.Phase.PROCESS, context);
                if (event != null)
                    event.broadcast();
                return;
            }

            String portletMode = context.getRequestParameter(org.exoplatform.portal.Constants.PORTAL_PORTLET_MODE);
            if (portletMode != null) {
                Event<UIComponent> event = uicomponent.createEvent("ChangePortletMode", Event.Phase.PROCESS, context);
                if (event != null)
                    event.broadcast();
            }

            String windowState = context.getRequestParameter(org.exoplatform.portal.Constants.PORTAL_WINDOW_STATE);
            if (windowState != null) {
                Event<UIComponent> event = uicomponent.createEvent("ChangeWindowState", Event.Phase.PROCESS, context);
                if (event != null)
                    event.broadcast();
            }

            /*
             * Check the type of the incoming request, can be either an ActionURL or a RenderURL one
             *
             * In case of a RenderURL, the parameter state map must be invalidated and this is done in the associated
             * ActionListener
             *
             * If no action type is specified we assume the default, which is to render
             */
            String portletActionType = context.getRequestParameter(Constants.TYPE_PARAMETER);
            if (portletActionType != null) {
                if (portletActionType.equals(Constants.PORTAL_PROCESS_ACTION)) {
                    Event<UIComponent> event = uicomponent.createEvent("ProcessAction", Event.Phase.PROCESS, context);
                    if (event != null)
                        event.broadcast();
                } else if (portletActionType.equals(Constants.PORTAL_SERVE_RESOURCE)) {
                    Event<UIComponent> event = uicomponent.createEvent("ServeResource", Event.Phase.PROCESS, context);
                    if (event != null)
                        event.broadcast();
                }
            } else {
                Event<UIComponent> event = uicomponent.createEvent("Render", Event.Phase.PROCESS, context);
                if (event != null)
                    event.broadcast();
            }

            // These two checks needs to go after the ProcessAction, ServeResource or Render broadcast events.
            // The mode or state can change during the invocation and we need to be able to broadcast the change
            // event if this occurs.
            if (currentPortletMode != null && !currentPortletMode.equals(uicomponent.getCurrentPortletMode())) {
                context.setAttribute(UIPortletActionListener.CHANGE_PORTLET_MODE_EVENT, uicomponent.getCurrentPortletMode()
                        .toString());
                Event<UIComponent> event = uicomponent.createEvent("ChangePortletMode", Event.Phase.PROCESS, context);
                if (event != null)
                    event.broadcast();
                context.setAttribute(UIPortletActionListener.CHANGE_PORTLET_MODE_EVENT, null);
            }
            if (currentWindowState != null && !currentWindowState.equals(uicomponent.getCurrentWindowState())) {
                context.setAttribute(UIPortletActionListener.CHANGE_WINDOW_STATE_EVENT, uicomponent.getCurrentWindowState()
                        .toString());
                Event<UIComponent> event = uicomponent.createEvent("ChangeWindowState", Event.Phase.PROCESS, context);
                if (event != null)
                    event.broadcast();
View Full Code Here

Examples of javax.portlet.WindowState

             * Update the portlet window state according to the action output information
             *
             * If the current node is displaying a usual layout page, also tells the page which portlet to render or not when
             * the state is maximized
             */
            WindowState state = new WindowState(getWindowStateOrDefault(navResponse));
            setNextState(uiPortlet, state);

            // update the portlet with the next mode to display
            PortletMode mode = new PortletMode(getPortletModeOrDefault(navResponse));
            setNextMode(uiPortlet, mode);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.