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

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


    }

    private void drag(final MouseEvent me) {
        final Location location = createLocation(me.getPoint());
        spy.addAction("Mouse dragged " + location);
        final View target = viewer.identifyView(new Location(location), false);
        drag.drag(target, location, me.getModifiers());
    }
View Full Code Here


        if (drag == null) {
            spy.addAction("drag start  ignored");
            canDrag = false;
        } else {
            spy.addAction("drag start " + drag);
            final View overlay = drag.getOverlay();
            if (overlay != null) {
                viewer.setOverlayView(overlay);
            }
            final View target = viewer.identifyView(createLocation(me.getPoint()), false);
            drag.drag(target, createLocation(me.getPoint()), me.getModifiers());
        }
        identifiedView = null;
    }
View Full Code Here

            interactionException("mouseClicked", e);
        }
    }

    private void overlayClick(final Click click) {
        final View overlayView = viewer.getOverlayView();
        if (overlayView == identifiedView || (identifiedView != null && identifiedView.getParent() != null && overlayView == identifiedView.getParent())) {
            viewer.firstClick(click);
        } else {
            viewer.clearAction();
        }
View Full Code Here

                spy.reset();
                viewer.translate(me);
                final Location location = createLocation(me.getPoint());
                spy.setLocationInViewer(location);

                final View overView = viewer.identifyView(new Location(location), true);
                spy.setOver(overView);

                spy.addAction("moved " + location);

                if (overView != null) {
                    if (overView != identifiedView) {
                        if (identifiedView != null) {
                            spy.addAction("exited " + identifiedView);
                            identifiedView.exited();
                        }

                        if (overView != null) {
                            spy.addAction("entered " + overView);
                            overView.entered();
                        }

                        redraw();
                        feedbackManager.showBusyState(overView);
                    }
                    identifiedView = overView;

                    spy.addTrace("--> mouse moved");
                    viewer.mouseMoved(location);
                    spy.addTrace(overView, " mouse location", location);
                    if ((me.getModifiers() & InputEvent.ALT_MASK) > 0 && overView.getContent() != null) {
                        final ObjectAdapter object = overView.getContent().getAdapter();
                        final ViewAreaType area = overView.viewAreaType(location);
                        feedbackManager.setViewDetail("Over " + location + " [" + area + "] " + object);
                    }

                    redraw();
                }
View Full Code Here

            spy.setDownAt(downAt);

            final Location location = createLocation(me.getPoint());
            spy.setLocationInViewer(location);

            final View overView = viewer.identifyView(new Location(location), true);
            spy.setOver(overView);
            spy.addAction("Mouse pressed " + location);
            drag = null;

            final Click click = new ClickImpl(downAt, me.getModifiers());
View Full Code Here

        try {
            if (drag != null) {
                mouseDragged(me);

                final Location location = createLocation(me.getPoint());
                final View target = viewer.identifyView(new Location(location), false);
                drag.drag(target, location, me.getModifiers());
                // viewer.clearStatus();
                drag.end(viewer);
                redraw();
View Full Code Here

        // resolveApplicationContextCollection(rootObject, "objects");
        final RootWorkspaceSpecification spec = new RootWorkspaceSpecification();
        final PerspectiveContent content = new PerspectiveContent(userProfiler.getPerspective());
        if (spec.canDisplay(new ViewRequirement(content, ViewRequirement.CLOSED))) {
            // View view = spec.createView(new RootObject(rootObject), null);
            final View view = spec.createView(content, new Axes(), -1);
            viewer.setRootView(view);
        } else {
            throw new IsisException();
        }
View Full Code Here

    private void addCellsToView(final CalendarCellContent[] cellContents) {
        final View[] cells = new View[rows * columns];
        for (int row = 0; row < rows; row++) {
            for (int column = 0; column < columns; column++) {
                final int cellNo = acrossThenDown ? row * columns + column : column * rows + row;
                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);
View Full Code Here

        CalendarConstants.style.getLineSpacing();
        final Location location = new Location(leftInset, topInset + top);
        final Size size = new Size(columnWidth, rowHeight - top);
        for (int row = 0; row < rows; row++) {
            for (int column = 0; column < columns; column++) {
                final View cell = cells[i++];
                cell.setSize(size);
                cell.setLocation(location);
                location.add(columnWidth, 0);
            }
            location.setX(leftInset);
            location.add(0, rowHeight);
        }
View Full Code Here

    @Override
    public void open(final Location location, final String name, final String description, final String help) {
        viewer.clearAction();

        final View helpView = new HelpView(name, description, help);
        location.add(20, 20);
        helpView.setLocation(location);

        viewer.setOverlayView(helpView);
    }
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.