Package org.apache.isis.viewer.dnd.drawing

Examples of org.apache.isis.viewer.dnd.drawing.Location


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

        View view = new TextFieldResizeBorder(new TestObjectViewWithDragging(content, specification, axis, 400, 400, "resizing"));
        view.setLocation(new Location(50, 60));
        view.setSize(new Size(100, 24));
        workspace.addView(view);

        view = new TreeBrowserResizeBorder(new TestObjectViewWithDragging(content, specification, axis, 400, 400, "resizing"));
        view.setLocation(new Location(50, 120));
        view.setSize(new Size(200, 200));
        workspace.addView(view);
    }
View Full Code Here


        ViewAxis axis = new TreeBrowserFrame(null, null);

        Content content = new RootObject(object);

        View view = new TreeBrowserSpecification().createView(content, axis);
        view.setLocation(new Location(100, 50));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);

        view = new WindowFormSpecification().createView(content, axis);
        view.setLocation(new Location(100, 200));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);

    }
View Full Code Here

        }
        ViewAxis axis = new TreeBrowserFrame(null, null);

        Content content = new RootObject(object);
        view = new TreeNodeBorder(new TestObjectView(content, specification, axis, 200, 90, "Tree node"), null);
        view.setLocation(new Location(60, 60));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);
    }
View Full Code Here

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

        Content content = new RootObject(object);
        View view = new ObjectBorder(1, new TestObjectView(content, specification, axis, 200, 90, "Normal"));
        view.setLocation(new Location(100, 20));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);

        view = new ObjectBorder(4, new TestObjectView(content, specification, axis, 100, 50, "wide border"));
        view.setLocation(new Location(100, 160));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);
        view.getState().setContentIdentified();

        view = new ObjectBorder(1, new TestObjectView(content, specification, axis, 100, 50, "identified"));
        view.setLocation(new Location(100, 350));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);
        view.getState().setContentIdentified();

        view = new ObjectBorder(1, new TestObjectView(content, specification, axis, 100, 50, "active"));
        view.setLocation(new Location(100, 230));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);
        view.getState().setActive();

        view = new ObjectBorder(1, new TestObjectView(content, specification, axis, 100, 50, "can drop"));
        view.setLocation(new Location(100, 290));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);
        view.getState().setCanDrop();

        view = new ObjectBorder(1, new TestObjectView(content, specification, axis, 100, 50, "can't drop"));
        view.setLocation(new Location(100, 410));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);
        view.getState().setCantDrop();
    }
View Full Code Here

        ViewAxis axis = null;

        SingleLineTextField textField = new SingleLineTextField(content, specification, axis, true);
        textField.setParent(parent);
        textField.setWidth(200);
        textField.setLocation(new Location(50, 20));
        textField.setSize(textField.getRequiredSize(new Size()));
        workspace.addView(textField);

        textField = new SingleLineTextField(content, specification, axis, false);
        textField.setParent(parent);
        textField.setWidth(80);
        textField.setLocation(new Location(50, 80));
        textField.setSize(textField.getRequiredSize(new Size()));
        workspace.addView(textField);

        content = new DummyTextParseableField(LONG_TEXT);
        WrappedTextField view = new WrappedTextField(content, specification, axis, false);
        view.setParent(parent);
        view.setNoLines(5);
        view.setWidth(200);
        view.setWrapping(false);
        view.setLocation(new Location(50, 140));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);

        view = new WrappedTextField(content, specification, axis, true);
        view.setParent(parent);
        view.setNoLines(8);
        view.setWidth(500);
        view.setWrapping(false);
        view.setLocation(new Location(50, 250));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);
    }
View Full Code Here

        Object object = new ObjectAdapterRuntimeException("The test exception message");
        Content content = new ExceptionMessageContent((Throwable) object);
        ViewAxis axis = null;

        View view = new MessageDialogSpecification().createView(content, axis);
        view.setLocation(new Location(100, 30));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);

        View view2 = new DetailedMessageViewSpecification().createView(content, axis);
        view2.setLocation(new Location(100, 260));
        view2.setSize(view2.getMaximumSize());
        workspace.addView(view2);
    }
View Full Code Here

        ViewAxis axis = new TreeBrowserFrame(null, null);

        Content content = new RootObject(object);

        View view = new ClosedCollectionNodeSpecification().createView(content, axis);
        view.setLocation(new Location(100, 20));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);

        view = new ClosedCollectionNodeSpecification().createView(content, axis);
        view.setLocation(new Location(100, 60));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);
        view.getState().setContentIdentified();

        view = new ClosedCollectionNodeSpecification().createView(content, axis);
        view.setLocation(new Location(100, 100));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);
        view.getState().setCanDrop();
    }
View Full Code Here

    public void secondClick(final Click click) {
        final int left = axis.getHeaderOffset();
        ;
        final int x = click.getLocation().getX();
        if (x <= left) {
            final Location location = getAbsoluteLocation();
            location.translate(click.getLocation());
            getWorkspace().objectActionResult(getContent().getAdapter(), new Placement(this));
        } else {
            super.secondClick(click);
        }
    }
View Full Code Here

        this.spy = spy;
        this.keyboardManager = keyboardManager;
    }

    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

        final View target = viewer.identifyView(new Location(location), false);
        drag.drag(target, location, me.getModifiers());
    }

    private Location createLocation(final Point point) {
        return new Location(point.x, point.y);
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.dnd.drawing.Location

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.