Package org.apache.jetspeed.layout.impl

Examples of org.apache.jetspeed.layout.impl.PortletPlacementContextImpl$FragmentLinkedListInfo


    {
        RequestContext requestContext = FragmentUtil.buildFullRequestContext();

        try
        {
            PortletPlacementContext ppc = new PortletPlacementContextImpl(requestContext.getPage(),portletRegistry);

            ContentFragment a_oFrag = ppc
                    .getFragmentAtNewCoordinate(new CoordinateImpl(0, 0, 0, 0));

            Coordinate a_oCoordinate = ppc.remove(a_oFrag);

            assertEquals(a_oCoordinate.getOldCol(), 0);
            assertEquals(a_oCoordinate.getOldRow(), 0);

            // Should be the second fragment now that the first has been deleted
            a_oFrag = ppc.getFragmentAtNewCoordinate(new CoordinateImpl(0, 0,
                    0, 0));
            assertEquals(a_oFrag.getId(), "2");
            assertEquals(a_oFrag.getName(), "frag2");
        } catch (PortletPlacementException e)
        {
View Full Code Here


    {
        RequestContext requestContext = FragmentUtil.buildFullRequestContext();

        try
        {
            PortletPlacementContext ppc = new PortletPlacementContextImpl(requestContext.getPage(),portletRegistry);

            ContentFragment a_oFrag = ppc
                    .getFragmentAtNewCoordinate(new CoordinateImpl(0, 0, 0, 0));

            Coordinate a_oCoordinate = ppc.moveAbsolute(a_oFrag, new CoordinateImpl(
                    0, 0, 0, 1));

            assertEquals(a_oCoordinate.getOldCol(), 0);
            assertEquals(a_oCoordinate.getOldRow(), 0);
            assertEquals(a_oCoordinate.getNewCol(), 0);
            assertEquals(a_oCoordinate.getNewRow(), 1);

            // Should be the second fragment now that the first has been moved
            a_oFrag = ppc.getFragmentAtNewCoordinate(new CoordinateImpl(0, 0,
                    0, 0));
            assertEquals(a_oFrag.getId(), "2");
            assertEquals(a_oFrag.getName(), "frag2");

            a_oFrag = ppc.getFragmentAtNewCoordinate(new CoordinateImpl(0, 0,
                    0, 1));
            assertEquals(a_oFrag.getId(), "1");
            assertEquals(a_oFrag.getName(), "frag1");
        } catch (PortletPlacementException e)
        {
View Full Code Here

    {
        RequestContext requestContext = FragmentUtil.buildFullRequestContext();

        try
        {
            PortletPlacementContext ppc = new PortletPlacementContextImpl(requestContext.getPage(),portletRegistry);

            ContentFragment a_oFrag = ppc
                    .getFragmentAtNewCoordinate(new CoordinateImpl(0, 0, 0, 1));

            Coordinate a_oCoordinate = ppc.moveUp(a_oFrag);

            assertEquals(a_oCoordinate.getOldCol(), 0);
            assertEquals(a_oCoordinate.getOldRow(), 1);
            assertEquals(a_oCoordinate.getNewCol(), 0);
            assertEquals(a_oCoordinate.getNewRow(), 0);

            // Should be the second fragment since it was moved up
            a_oFrag = ppc.getFragmentAtNewCoordinate(new CoordinateImpl(0, 0,
                    0, 0));
            assertEquals(a_oFrag.getId(), "2");
            assertEquals(a_oFrag.getName(), "frag2");

            a_oFrag = ppc.getFragmentAtNewCoordinate(new CoordinateImpl(0, 0,
                    0, 1));
            assertEquals(a_oFrag.getId(), "1");
            assertEquals(a_oFrag.getName(), "frag1");
        } catch (PortletPlacementException e)
        {
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.layout.impl.PortletPlacementContextImpl$FragmentLinkedListInfo

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.