Package javax.portlet

Examples of javax.portlet.WindowState


     * Ensure custom window states are supported by the portal.
     */
    public void testIsCustomWindowStateSupportedByPortal()
    {
        assertTrue(underTest.isWindowStateSupportedByPortal("a-custom-state"));
        assertTrue(underTest.isWindowStateSupportedByPortal(new WindowState("a-custom-state").toString()));
    }
View Full Code Here


     * Ensure non-existant window states are not supported by the portal.
     */
    public void testNonExistantWindowStateSupportedByPortal()
    {
        assertFalse(underTest.isWindowStateSupportedByPortal("a-nonexistant-state"));
        assertFalse(underTest.isWindowStateSupportedByPortal(new WindowState("a-nonexistant-state").toString()));
    }
View Full Code Here

     * Ensure custom window states are supported in the portlet.
     */
    public void testIsCustomWindowStateSupportedByPortlet()
    {
        assertTrue(underTest.isWindowStateSupportedByPortlet("some.id", "a-custom-state"));
        assertTrue(underTest.isWindowStateSupportedByPortlet("some.id", new WindowState("a-custom-state").toString()));
    }
View Full Code Here

     * Ensure non-existant window states are not supported by the portlet.
     */
    public void testIsNonExistantWindowStateSupportedByPortlet()
    {
        assertFalse(underTest.isWindowStateSupportedByPortlet("some.id", "a-nonexistant-state"));
        assertFalse(underTest.isWindowStateSupportedByPortlet("some.id", new WindowState("a-nonexistant-state").toString()));
    }
View Full Code Here

            throw new IllegalArgumentException(msg);
        }
       
        // We can short-circut the registry lookup if the window state is
        // one from PLT.9
        if ( JSR168_WINDOW_STATES.contains(new WindowState(state)) )
        {
            return true;
        }
       
        // If the supplied window state isn't a JSR 168 window state,
View Full Code Here

            portalURL.setActionWindow(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

     * Returns the window state of the specified window.
     * @param windowId  the window ID.
     * @return the window state. Default to NORMAL.
     */
    public WindowState getWindowState(String windowId) {
        WindowState state = (WindowState) windowStates.get(windowId);
        if (state == null) {
            state = WindowState.NORMAL;
        }
        return state;
    }
View Full Code Here

     * Returns the window state of the specified window.
     * @param windowId  the window ID.
     * @return the window state. Default to NORMAL.
     */
    public WindowState getWindowState(String windowId) {
        WindowState state = (WindowState) windowStates.get(windowId);
        if (state == null) {
            state = WindowState.NORMAL;
        }
        return state;
    }
View Full Code Here

    }

    public void testGetWindowStates()
    {
        final String win = "window";
        final WindowState state = WindowState.MAXIMIZED;
       
        underTest.setWindowState( win, state );
        final Map states = underTest.getWindowStates();
        assertNotNull( states );
        assertEquals( 1, states.size() );
View Full Code Here

    }

    public void testGetWindowState()
    {
        final String win = "window";
        final WindowState expected = WindowState.MAXIMIZED;
       
        underTest.setWindowState( win, expected );
        final WindowState state = underTest.getWindowState( win );
        assertNotNull( state );
        assertEquals( expected, state );
    }
View Full Code Here

TOP

Related Classes of javax.portlet.WindowState

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.