Examples of ScrollBorder


Examples of org.apache.isis.viewer.dnd.border.ScrollBorder

        ObjectAdapter object = createExampleObjectForView();
        Content content = new RootObject(object);
        ViewSpecification specification = new ExampleViewSpecification();
        ViewAxis axis = null;

        View view = new ScrollBorder(new TestObjectViewWithDragging(content, specification, axis, 800, 800, "both"));
        view.setLocation(new Location(50, 60));
        view.setSize(new Size(216, 216));
        workspace.addView(view);

        view = new ScrollBorder(new TestObjectViewWithDragging(content, specification, axis, 200, 800, "vertical"));
        view.setLocation(new Location(300, 60));
        view.setSize(new Size(216, 216));
        workspace.addView(view);

        view = new ScrollBorder(new TestObjectViewWithDragging(content, specification, axis, 800, 200, "horizontal"));
        view.setLocation(new Location(550, 60));
        view.setSize(new Size(216, 216));
        workspace.addView(view);

    }
View Full Code Here

Examples of org.apache.isis.viewer.dnd.border.ScrollBorder

        View v = new TestObjectView(content, specification, axis, 300, 120, "normal");

        View objectBorder = new ObjectBorder(1, v);

        View scrollBorder = new ScrollBorder(objectBorder);
        scrollBorder.setSize(new Size(200, 200));

        View view = new WindowBorder(scrollBorder, false);
        view.setLocation(new Location(50, 60));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);
View Full Code Here

Examples of org.apache.isis.viewer.dnd.border.ScrollBorder

        ViewSpecification specification = new ExampleViewSpecification();
        ViewAxis axis = null;

        TestHeaderView leftHeader = new TestHeaderView(axis, 40, 800);
        TestHeaderView topHeader = new TestHeaderView(axis, 800, 20);
        View view = new ScrollBorder(new TestObjectViewWithDragging(content, specification, axis, 800, 800, "both"), leftHeader,
                topHeader);
        view.setLocation(new Location(50, 60));
        view.setSize(new Size(216, 216));
        view.setParent(workspace);
        workspace.addView(view);

        view = new ScrollBorder(new TestObjectViewWithDragging(content, specification, axis, 200, 800, "vertical"));
        view.setLocation(new Location(300, 60));
        view.setSize(new Size(216, 216));
        view.setParent(workspace);
        workspace.addView(view);

        view = new ScrollBorder(new TestObjectViewWithDragging(content, specification, axis, 800, 200, "horizontal"));
        view.setLocation(new Location(550, 60));
        view.setSize(new Size(216, 216));
        view.setParent(workspace);
        workspace.addView(view);

    }
View Full Code Here

Examples of org.apache.isis.viewer.dnd.view.border.ScrollBorder

                View cell;
                if (cellContents[cellNo] == null) {
                    cell = new BlankView(new NullContent());
                } else {
                    cell = new CompositeViewUsingBuilder(cellContents[cellNo], null, new Axes(), new StackLayout(), new CollectionElementBuilder(new IconElementFactory()));
                    cell = new ScrollBorder(cell);
                }
                cells[cellNo] = cell;
                addView(cell);
            }
        }
View Full Code Here

Examples of org.apache.isis.viewer.dnd.view.border.ScrollBorder

public class InternalTableSpecification extends AbstractTableSpecification {
    public InternalTableSpecification() {
        addViewDecorator(new CompositeViewDecorator() {
            @Override
            public View decorate(final View view, final Axes axes) {
                final ScrollBorder scrollingView = new ScrollBorder(view);
                // note - the next call needs to be after the creation of the
                // window border
                // so that it exists when the header is set up
                scrollingView.setTopHeader(new TableHeader(view.getContent(), axes.getAxis(TableAxis.class)));
                scrollingView.setFocusManager(new TableFocusManager(scrollingView));
                return scrollingView;

            }
        });
View Full Code Here

Examples of org.apache.isis.viewer.dnd.view.border.ScrollBorder

public class WindowTableSpecification extends AbstractTableSpecification {
    public WindowTableSpecification() {
        addViewDecorator(new CompositeViewDecorator() {
            @Override
            public View decorate(final View view, final Axes axes) {
                final ScrollBorder scrollingView = new ScrollBorder(view);
                final View viewWithWindowBorder = scrollingView;
                // note - the next call needs to be after the creation of the
                // window border so
                // that it exists when the header is set up
                scrollingView.setTopHeader(new TableHeader(view.getContent(), axes.getAxis(TableAxis.class)));
                viewWithWindowBorder.setFocusManager(new TableFocusManager(viewWithWindowBorder));
                return viewWithWindowBorder;
            }
        });
View Full Code Here

Examples of org.apache.isis.viewer.dnd.view.border.ScrollBorder

    private static final UserAction CLOSE_VIEWS_FOR_OBJECT = new CloseAllViewsForObjectOption();
    private static final UserAction CLOSE_OTHER_VIEWS_FOR_OBJECT = new CloseOtherViewsForObjectOption();
    private static final IconizeViewOption iconizeOption = new IconizeViewOption();

    public WindowBorder(final View wrappedView, final boolean scrollable) {
        super(addTransientBorderIfNeccessary(scrollable ? new ScrollBorder(wrappedView) : wrappedView));

        if (isTransient()) {
            setControls(new WindowControl[] { new CloseWindowControl(this) });
        } else {
            setControls(new WindowControl[] { new IconizeWindowControl(this), new ResizeWindowControl(this), new CloseWindowControl(this) });
View Full Code Here

Examples of org.apache.isis.viewer.dnd.view.border.ScrollBorder

        }, new CancelAction(),

        };

        final DetailedMessageView messageView = new DetailedMessageView(content, this);
        return new ButtonBorder(actions, new ScrollBorder(messageView));
    }
View Full Code Here

Examples of org.apache.isis.viewer.dnd.view.border.ScrollBorder

    @Test
    public void testScrollBar() {
        final DummyView innerView = new DummyView();
        innerView.setupRequiredSize(new Size(100, 200));
        final View view = new ScrollBorder(innerView);

        ViewAreaType type = view.viewAreaType(new Location(20, 190));
        Assert.assertEquals(ViewAreaType.INTERNAL, type);

        type = view.viewAreaType(new Location(95, 20));
        Assert.assertEquals(ViewAreaType.INTERNAL, type);
    }
View Full Code Here

Examples of org.apache.isis.viewer.dnd.view.border.ScrollBorder

        topHeader.setupRequiredSize(new Size(0, 20));

        final DummyView leftHeader = new DummyView();
        leftHeader.setupRequiredSize(new Size(30, 0));

        final View scrollBorder = new ScrollBorder(contentView, leftHeader, topHeader);

        scrollBorder.setSize(new Size(100, 200));

        Assert.assertEquals(new Size(300, 400), contentView.getSize());
        Assert.assertEquals(new Size(300, 20), topHeader.getSize());
        Assert.assertEquals(new Size(30, 400), leftHeader.getSize());
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.