Examples of DummyView


Examples of org.apache.isis.viewer.dnd.DummyView

        });

        final ViewFactory subviewSpec = new ViewFactory() {
            @Override
            public View createView(final Content content, final Axes axes, final int fieldNumber) {
                return new DummyView();
            }
        };

        final IsisSessionFactoryDefault sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, mockSpecificationLoader, mockTemplateImageLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader, mockPersistenceSessionFactory, mockContainer, servicesList, oidMarshaller);
View Full Code Here

Examples of org.apache.isis.viewer.dnd.DummyView

    @Before
    public void setUp() throws Exception {
       
        TestToolkit.createInstance();

        view = new DummyView();
        final Text style = new DummyText();
        titleText = new TitleText(view, style, Toolkit.getColor(ColorsAndFonts.COLOR_BLACK)) {
            @Override
            protected String title() {
                return title;
View Full Code Here

Examples of org.apache.isis.viewer.dnd.DummyView

                return null;
            }
        };
        view.setSize(new Size(100, 200));

        component1 = new DummyView();
        component1.setupRequiredSize(new Size(100, 20));
    }
View Full Code Here

Examples of org.apache.isis.viewer.dnd.DummyView

    }

    @Test
    public void testLayoutGetRedoneAfterNewComponentAdded() throws Exception {
        view.layout();
        view.addView(new DummyView());
        view.layout();
        assertEquals(2, layoutCount);
    }
View Full Code Here

Examples of org.apache.isis.viewer.dnd.DummyView

    @Test
    public void testLayoutGetRedoneAfterComponentReplaced() throws Exception {
        view.addView(component1);
        view.layout();
        view.replaceView(component1, new DummyView());
        view.layout();
        assertEquals(2, layoutCount);
    }
View Full Code Here

Examples of org.apache.isis.viewer.dnd.DummyView

        IsisContext.setConfiguration(mockConfiguration);

        workspace = new DummyWorkspaceView();
        workspace.setSize(new Size(WORKSPACE_WIDTH, WORKSPACE_HEIGHT));

        existingView = new DummyView();
        existingView.setSize(new Size(ROOT_VIEW_WIDTH, ROOT_VIEW_HEIGHT));
        existingView.setLocation(new Location(ORIGINAL_X, ORIGINAL_Y));
        existingView.setParent(workspace);
        workspace.addView(existingView);

        newView = new DummyView();
        newView.setupRequiredSize(new Size(NEW_VIEW_WIDTH, NEW_VIEW_HEIGHT));

        strategy = new PlacementStrategyImpl();
    }
View Full Code Here

Examples of org.apache.isis.viewer.dnd.DummyView

        Assert.assertEquals(new Location(ORIGINAL_X + ROOT_VIEW_WIDTH + PADDING, 70), location);
    }

    @Test
    public void adjustWhenOnTopOfExistingField() throws Exception {
        final DummyView anotherView = new DummyView();
        anotherView.setLocation(new Location(ORIGINAL_X + ROOT_VIEW_WIDTH + PADDING, ORIGINAL_Y));
        anotherView.setSize(new Size(50, 50));
        workspace.addView(anotherView);

        newView.setupRequiredSize(new Size(NEW_VIEW_WIDTH, NEW_VIEW_HEIGHT));

        final Location location = strategy.determinePlacement(workspace, existingView, newView);
View Full Code Here

Examples of org.apache.isis.viewer.dnd.DummyView

    protected void setUp() throws Exception {
        org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.OFF);
    }

    public void testBorder() {
        final DummyView mockView = new DummyView();
        final TextFieldBorder border = new TextFieldBorder(mockView);
        assertEquals(new Padding(2, 2, 2, 2), border.getPadding());
    }
View Full Code Here

Examples of org.apache.isis.viewer.dnd.DummyView

        Assert.assertEquals(new Location(ORIGINAL_X + ROOT_VIEW_WIDTH + PADDING, 0), location);
    }

    @Test
    public void wideComponentsDontCompletelyOverlap() throws Exception {
        final DummyView anotherView = new DummyView();
        anotherView.setLocation(new Location(0, 70 + ROOT_VIEW_HEIGHT + PADDING));
        anotherView.setSize(new Size(WORKSPACE_WIDTH, 100));
        workspace.addView(anotherView);

        newView.setupRequiredSize(new Size(WORKSPACE_WIDTH, NEW_VIEW_HEIGHT));

        final Location location = strategy.determinePlacement(workspace, existingView, newView);
View Full Code Here

Examples of org.apache.isis.viewer.dnd.DummyView

        Assert.assertEquals(new Location(0, 70 + ROOT_VIEW_HEIGHT + PADDING + PADDING * 4), location);
    }

    @Test
    public void tallComponentsDontCompletelyOverlap() throws Exception {
        final DummyView anotherView = new DummyView();
        anotherView.setLocation(new Location(ORIGINAL_X + ROOT_VIEW_WIDTH + PADDING, 0));
        anotherView.setSize(new Size(100, WORKSPACE_HEIGHT));
        workspace.addView(anotherView);

        newView.setupRequiredSize(new Size(NEW_VIEW_WIDTH, WORKSPACE_HEIGHT));

        final Location location = strategy.determinePlacement(workspace, existingView, newView);
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.