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

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


    }

    private boolean fieldContainsReference(final ObjectAdapter parent, final ObjectAssociation field) {
        final OneToOneAssociation association = (OneToOneAssociation) field;
        final OneToOneFieldImpl fieldContent = new OneToOneFieldImpl(parent, field.get(parent), association);
        if (openViewSpecification.canDisplay(new ViewRequirement(fieldContent, ViewRequirement.OPEN))) {
            return true;
        }
        return false;
    }
View Full Code Here


            }
        });

        replaceOptions(
            Toolkit.getViewFactory().availableViews(
                new ViewRequirement(getContent(), ViewRequirement.OPEN | ViewRequirement.CLOSED
                    | ViewRequirement.SUBVIEW)), menuOptions); // openSubviews(content, this), options);

    }
View Full Code Here

            }
        }
    }

    public void addView(final Content content, final Position position) {
        final ViewRequirement requirement =
            new ViewRequirement(content, ViewRequirement.OPEN | ViewRequirement.SUBVIEW);
        final ViewSpecification viewSpecification = Toolkit.getViewFactory().availableViews(requirement).nextElement();
        addView(content, viewSpecification, position);
    }
View Full Code Here

        @Override
        public View createView(final Content content, final Axes axes, final int fieldNumber) {
            if (content instanceof TextParseableParameter) {
                final GlobalViewFactory factory = Toolkit.getViewFactory();
                return factory
                    .createView(new ViewRequirement(content, ViewRequirement.CLOSED | ViewRequirement.SUBVIEW));
            } else if (content instanceof ObjectParameter) {
                final GlobalViewFactory factory = Toolkit.getViewFactory();
                return factory
                    .createView(new ViewRequirement(content, ViewRequirement.CLOSED | ViewRequirement.SUBVIEW));
            }

            return null;
        }
View Full Code Here

            final ViewSpecification elementSpecification =
                axes.getAxis(ConfigurationAxis.class).getElementSpecification();
            if (elementSpecification == null) {
                final int defaultRequirement = ViewRequirement.CLOSED | ViewRequirement.SUBVIEW;
                final ViewRequirement viewRequirement = new ViewRequirement(content, defaultRequirement);
                return factory.createView(viewRequirement);
            } else {
                return elementSpecification.createView(content, axes, sequence);
            }
        }
View Full Code Here

    }

    @Override
    public void showInOverlay(final Content content, final Location location) {
        View view;
        view = Toolkit.getViewFactory().createView(new ViewRequirement(content, ViewRequirement.OPEN));
        view =
            new LineBorder(2, Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2), new BackgroundBorder(
                Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3), view));
        final Size size = view.getRequiredSize(Size.createMax());
        location.subtract(size.getWidth() / 2, size.getHeight() / 2);
View Full Code Here

        refreshStatus = true;
        scheduleRepaint();
    }

    public void showDialog(final MessageContent content) {
        final ViewRequirement requirement = new ViewRequirement(content, ViewRequirement.OPEN);
        final View view = Toolkit.getViewFactory().createView(requirement);
        rootView.getWorkspace().addDialog(view, new Placement(Placement.CENTER));
        scheduleRepaint();
    }
View Full Code Here

    }

    @Override
    public View addWindowFor(final ObjectAdapter object, final Placement placement) {
        final Content content = Toolkit.getContentFactory().createRootContent(object);
        final View view = Toolkit.getViewFactory().createView(new ViewRequirement(content, ViewRequirement.OPEN));
        addWindow(view, placement);
        getViewManager().setKeyboardFocus(view);
        return view;
    }
View Full Code Here

    @Override
    public View addIconFor(final ObjectAdapter object, final Placement placement) {
        final Content content = Toolkit.getContentFactory().createRootContent(object);
        final View icon =
            Toolkit.getViewFactory().createView(
                new ViewRequirement(content, ViewRequirement.CLOSED | ViewRequirement.ROOT));
        add(iconViews, icon);
        placement.position(this, icon);
        return icon;
    }
View Full Code Here

    public void addServiceIconFor(final ObjectAdapter service) {
        final Content content = new ServiceObject(service);
        final View serviceIcon =
            Toolkit.getViewFactory().createView(
                new ViewRequirement(content, ViewRequirement.CLOSED | ViewRequirement.SUBVIEW));
        add(serviceViews, serviceIcon);
    }
View Full Code Here

TOP

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

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.