Package org.apache.isis.viewer.dnd.view

Examples of org.apache.isis.viewer.dnd.view.View


    protected abstract View createNodeView(final Content content, Axes axes);

    @Override
    public final View createView(final Content content, final Axes axes, final int sequence) {
        final View view = createNodeView(content, axes);
        final TreeNodeBorder newView = new TreeNodeBorder(view, replacementNodeSpecification);
        newView.setFocusManager(new NullFocusManager());

        return newView;
    }
View Full Code Here


                } else if (target.getSpecification().isParentedOrFreeCollection()) {
                    content = new CollectionActionContent(helper);
                } else {
                    throw new UnknownTypeException(target);
                }
                final View dialog = Toolkit.getViewFactory().createDialog(content);
                workspace.addDialog(dialog, new Placement(view));
            }

            @Override
            public String getDescription() {
View Full Code Here

    }

    @Override
    public void execute(final Workspace workspace, final View view, final Location at) {
        final ObjectAdapter object = view.getContent().getAdapter();
        final View views[] = workspace.getSubviews();
        for (final View v : views) {
            if (v.getContent().getAdapter() == object) {
                v.dispose();
            }
        }
View Full Code Here

    }

    public void testBoundsSetSizeAndLocation() throws Exception {
        final Location l = new Location();
        final Size z = new Size();
        final View view = new AbstractView(new NullContent()) {
            @Override
            public void setLocation(final Location location) {
                l.translate(location);
            }

            @Override
            public void setSize(final Size size) {
                z.extend(size);
            }
        };

        view.setBounds(new Bounds(20, 30, 40, 50));
        assertEquals(new Location(20, 30), l);
        assertEquals(new Size(40, 50), z);
    }
View Full Code Here

    }

    @Test
    public void testUpdateBuild() {
        final MockControl control = MockControl.createControl(View.class);
        final View view = (View) control.getMock();

        control.expectAndDefaultReturn(view.getView(), view);
        control.expectAndDefaultReturn(view.getContent(), null);

        /*
         * DummyView[] views = new DummyView[2]; views[1] = new DummyView();
         * views[1].setupContent(new ObjectParameter("name", null, null, false,
         * 1, actionContent)); view.setupSubviews(views);
View Full Code Here

        debug.appendln("Axes", getViewAxes());
        appendDebug(debug);

        debug.appendln("Workspace", getWorkspace());

        View p = getParent();
        debug.appendln("Parent hierarchy:" + (p == null ? "none" : ""));
        debug.indent();
        while (p != null) {
            debug.appendln(p.toString());
            p = p.getParent();
        }
        debug.unindent();

        debug.appendln();
        debug.appendln();
View Full Code Here

        b.appendln("Content", getContent() == null ? "none" : getContent());
        b.appendln("Required size ", getRequiredSize(Size.createMax()));
        b.appendln("Bounds", getBounds());
        b.appendln("Baseline", getBaseline());
        b.appendln("Location", getAbsoluteLocation());
        final View views[] = getSubviews();
        b.indent();
        for (final View subview : views) {
            b.appendln();
            final ViewSpecification spec = subview.getSpecification();
            b.appendln(spec == null ? "none" : spec.getName().toUpperCase());
View Full Code Here

        b.unindent();
    }

    @Override
    public void dispose() {
        final View parent = getParent();
        if (parent != null) {
            parent.removeView(getView());
        }
    }
View Full Code Here

        getFeedbackManager().showDefaultCursor();
    }

    @Override
    public View dragFrom(final Location location) {
        final View subview = subviewFor(location);
        if (subview != null) {
            location.subtract(subview.getLocation());
            return subview.dragFrom(location);
        } else {
            return null;
        }
    }
View Full Code Here

            axes.add((ViewAxis) layout);
        }

        final CompositeViewUsingBuilder view = new CompositeViewUsingBuilder(content, this, axes, layout, builder);
        view.setCanDragView(builder.canDragView());
        final View decoratedView = decorateView(view, view.getViewAxes());
        final Options options = Properties.getViewConfigurationOptions(this);
        decoratedView.loadOptions(options);
        return decoratedView;
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.dnd.view.View

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.