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

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


        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


    protected void views(final Workspace workspace) {
        // AbstractView.debug = true;

        View view = new HelpView("Name", "Description summerising the named feature", "A very log help text");
        view.setLocation(new Location(50, 60));
        view.setSize(view.getMaximumSize());
        workspace.addView(view);
        /*
         * view = new TestCanvasView(); view.setLocation(new Location(300, 60)); view.setSize(new Size(216,
         * 300)); workspace.addView(view);
View Full Code Here

                return null;
            }
        };

        View view = new Button(action, workspace);
        view.setLocation(new Location(100, 100));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);

        ButtonAction action2 = new ButtonAction() {

            public Consent disabled(final View view) {
                return Veto.DEFAULT;
            }

            public void execute(final Workspace workspace, final View view, final Location at) {
                view.getFeedbackManager().setViewDetail("Button 1 pressed");
            }

            public String getDescription(final View view) {
                return "Button that can't be pressed";
            }

            public ObjectActionType getType() {
                return USER;
            }

            public String getName(final View view) {
                return "Press Me Now!";
            }

            public boolean isDefault() {
                return false;
            }

            public String getHelp(final View view) {
                return null;
            }

        };

        View view2 = new Button(action2, workspace);
        view2.setLocation(new Location(200, 100));
        view2.setSize(view2.getRequiredSize(new Size()));
        workspace.addView(view2);
    }
View Full Code Here

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

        View view = new ButtonBorder(actions, new TestObjectView(content, specification, axis, 200, 80, "VIEW in border"));

        view.setLocation(new Location(100, 100));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);

    }
View Full Code Here

        ViewAxis axis = null;

        PasswordField textField = new PasswordField(content, specification, axis);
        textField.setParent(parent);
        // textField.setMaxWidth(200);
        textField.setLocation(new Location(50, 20));
        textField.setSize(textField.getRequiredSize(new Size()));
        workspace.addView(textField);

        textField = new PasswordField(content, specification, axis);
        textField.setParent(parent);
        // textField.setMaxWidth(80);
        textField.setLocation(new Location(50, 80));
        textField.setSize(textField.getRequiredSize(new Size()));
        workspace.addView(textField);

        content = new DummyTextParseableField("pa");
        PasswordField view = new PasswordField(content, specification, axis);
        view.setParent(parent);
        // view.setMaxWidth(200);
        view.setLocation(new Location(50, 140));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);

        view = new PasswordField(content, specification, axis);
        view.setParent(parent);
        // view.setMaxWidth(80);
        view.setLocation(new Location(50, 250));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);
    }
View Full Code Here

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

        View view = new WindowBorder(new TestObjectView(content, specification, axis, 300, 120, "normal"), false);
        view.setLocation(new Location(50, 60));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);

        view = new WindowBorder(new TestObjectView(content, specification, axis, 100, 30, "active"), false);
        view.setLocation(new Location(200, 300));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);

        view.getState().setActive();

        view = new WindowBorder(new TestObjectView(content, specification, axis, 100, 30, "view identified"), false);
        view.setLocation(new Location(200, 400));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);

        view.getState().setInactive();
        view.getState().setRootViewIdentified();
View Full Code Here

    protected void views(final Workspace workspace) {
        Content content = null;
        ViewSpecification specification = null;
        ViewAxis axis = null;
        TestObjectView view = new TestObjectView(content, specification, axis, 100, 200, "object");
        view.setLocation(new Location(100, 60));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);
    }
View Full Code Here

        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 = new WindowBorder(new TestObjectView(content, specification, axis, 100, 30, "active"), false);
        view.setLocation(new Location(200, 300));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);

        view.getState().setActive();

        view = new WindowBorder(new TestObjectView(content, specification, axis, 100, 30, "view identified"), false);
        view.setLocation(new Location(200, 400));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);

        view.getState().setInactive();
        view.getState().setRootViewIdentified();
View Full Code Here

        for (int i = 0; i < views.size(); i++) {
            View view = (View) views.elementAt(i);

            if (showOutline()) {
                final Size requiredSize = view.getSize();
                final Location location = view.getLocation();

                final int width = requiredSize.getWidth();
                final int height = requiredSize.getHeight();
                final int baseline = location.getY() + view.getBaseline();
                final int left = location.getX() - 10;
                final int top = location.getY() - 10;
                final int right = left + 10 + width - 1 + 10;
                final int bottom = top + 10 + height - 1 + 10;

                // horizontal lines
                canvas.drawLine(left, top + 10, right, top + 10, markerDark);
View Full Code Here

    protected void views(final Workspace workspace) {
        // AbstractView.debug = true;

        View view = new TestCanvasView();
        view.setLocation(new Location(50, 60));
        view.setSize(new Size(216, 300));
        workspace.addView(view);

        view = new TestCanvasView();
        view.setLocation(new Location(300, 60));
        view.setSize(new Size(216, 300));
        workspace.addView(view);

        view = new TestCanvasView2();
        view.setLocation(new Location(570, 60));
        view.setSize(new Size(50, 70));
        workspace.addView(view);

        view = new TestCanvasView2();
        view.setLocation(new Location(570, 160));
        view.setSize(new Size(8, 5));
        workspace.addView(view);
    }
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.