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

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


    public void dragOut(final ContentDrag drag) {
    }

    @Override
    public DragEvent dragStart(final DragStart drag) {
        final View subview = subviewFor(drag.getLocation());
        if (subview != null) {
            drag.subtract(subview.getLocation());
            return subview.dragStart(drag);
        } else {
            return null;
        }
    }
View Full Code Here


        }
    }

    private View decorateView(final View view, final Axes axes) {
        view.setFocusManager(new SubviewFocusManager(view));
        View decorated = view;
        for (final CompositeViewDecorator decorator : viewDecorators) {
            decorated = decorator.decorate(decorated, axes);
        }
        return decorated;
    }
View Full Code Here

    public void exited() {
    }

    @Override
    public void firstClick(final Click click) {
        final View subview = subviewFor(click.getLocation());
        if (subview != null) {
            click.subtract(subview.getLocation());
            subview.firstClick(click);
        }
    }
View Full Code Here

    public void focusReceived() {
    }

    @Override
    public Location getAbsoluteLocation() {
        final View parent = getParent();
        if (parent == null) {
            return getLocation();
        } else {
            final Location location = parent.getAbsoluteLocation();
            getViewManager().getSpy().addTrace(this, "parent location", location);
            location.add(x, y);
            getViewManager().getSpy().addTrace(this, "plus view's location", location);
            final Padding pad = parent.getPadding();
            location.add(pad.getLeft(), pad.getTop());
            getViewManager().getSpy().addTrace(this, "plus view's padding", location);
            return location;
        }
    }
View Full Code Here

        return "Replace this " + view.getSpecification().getName() + " view with a " + specification.getName() + " view";
    }

    @Override
    public void execute(final Workspace workspace, final View view, final Location at) {
        final View replacement = specification.createView(view.getContent(), new Axes(), -1);
        LOG.debug("replacement view " + replacement);
        replace(view, replacement);
    }
View Full Code Here

        return getViewManager().hasFocus(getView());
    }

    @Override
    public View identify(final Location location) {
        final View subview = subviewFor(location);
        if (subview == null) {
            getViewManager().getSpy().addTrace(this, "mouse location within node view", location);
            getViewManager().getSpy().addTrace("----");
            return getView();
        } else {
            location.subtract(subview.getLocation());
            return subview.identify(location);
        }
    }
View Full Code Here

        LOG.debug("replacement view " + replacement);
        replace(view, replacement);
    }

    protected void replace(final View view, final View withReplacement) {
        final View existingView = view.getView();
        view.getParent().replaceView(existingView, withReplacement);
    }
View Full Code Here

    public void invalidateContent() {
    }

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

        markDamaged(getView().getBounds());
    }

    @Override
    public void markDamaged(final Bounds bounds) {
        final View parent = getParent();
        if (parent == null) {
            getViewManager().markDamaged(bounds);
        } else {
            final Location pos = parent.getLocation();
            bounds.translate(pos.getX(), pos.getY());
            final Padding pad = parent.getPadding();
            bounds.translate(pad.getLeft(), pad.getTop());
            parent.markDamaged(bounds);
        }
    }
View Full Code Here

            }
        });
    }

    private View createView(final int width, final int height) {
        final View subview = context.mock(View.class, "view" + viewIndex++);
        context.checking(new Expectations() {
            {
                allowing(subview).getRequiredSize(new Size(Integer.MAX_VALUE, Integer.MAX_VALUE));
                will(returnValue(new Size(width, height)));
            }
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.