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

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


        return specification.isSubView();
    }

    @Override
    public View createView(final Content content, final Axes axes, final int sequence) {
        final View createView = specification.createView(content, axes, sequence);

        final Options viewOptions = Properties.getViewConfigurationOptions(this);
        createView.loadOptions(viewOptions);
        return createView;
    }
View Full Code Here


    @Override
    protected ViewFactory createElementFactory() {
        return new ViewFactory() {
            @Override
            public View createView(final Content content, final Axes axes, final int sequence) {
                final View icon = new ImageViewSpecification().createView(content, axes, sequence);
                /*
                 * Icon icon = new Icon(content,
                 * IconGridViewSpecification.this); Text textStyle =
                 * Toolkit.getText(ColorsAndFonts.TEXT_NORMAL);
                 * icon.setTitle(new ObjectTitleText(icon, textStyle));
View Full Code Here

        final ObjectAdapter[] options = content.getOptions();

        // TODO sort list
        for (int i = 0; i < options.length; i++) {
            final Content subContent = new OptionContent(options[i]);
            final View subview = subviewSpecification.createView(subContent, axes, i);
            view.addView(subview);
        }
    }
View Full Code Here

    @Override
    public Size getRequiredSize(final View view) {
        int height = 0;
        int width = 0;
        final View views[] = view.getSubviews();

        for (final View v : views) {
            final Size s = v.getRequiredSize(new Size(Integer.MAX_VALUE, Integer.MAX_VALUE));
            width = Math.max(width, s.getWidth());
            height += s.getHeight();
View Full Code Here

        this.axis = axis;
    }

    @Override
    public Workspace getWorkspace() {
        final View forView = axis.getOriginalView();
        return forView.getWorkspace();
    }
View Full Code Here

    @Override
    public void layout(final View view, final Size maximumSize) {
        final int x = 0;
        int y = 0;
        final View subviews[] = view.getSubviews();

        int maxWidth = 0;
        for (final View v : subviews) {
            final Size s = v.getRequiredSize(new Size(maximumSize));
            maxWidth = Math.max(maxWidth, s.getWidth());
View Full Code Here

        if (currentFocusManager != null && currentFocusManager.getFocus() != null && currentFocusManager.getFocus().getParent() != null) {
            currentFocusManager.getFocus().getParent().markDamaged();
        }

        if (currentFocusManager != null) {
            final View currentFocus = currentFocusManager.getFocus();
            if (currentFocus != null && currentFocus != view) {
                currentFocus.focusLost();
            }
        }

        final FocusManager focusManager = view.getFocusManager();
        if (focusManager != null) {
View Full Code Here

    @Override
    public void saveCurrentFieldEntry() {
        final FocusManager focusManager = getFocusManager();
        if (focusManager != null) {
            final View focus = focusManager.getFocus();
            if (focus != null) {
                focus.editComplete(false, false);
                // change should be marked by the field being completed
                // focus.markDamaged();
            }
        }
    }
View Full Code Here

        return rootView.getSize();
    }

    @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.setLocation(location);
        setOverlayView(view);
    }
View Full Code Here

        }

        if (!canChangeValue().isAllowed() || click.isShift() || click.button2()) {
            final ObjectAdapter valueAdapter = getContent().getAdapter();
            if (valueAdapter != null && valueAdapter.titleString().length() > 0) {
                final View textView = new BackgroundBorder(Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY3), new LineBorder(1, Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY1), new TextView(getContent(), null)));
                getViewManager().setOverlayView(textView);

                final int offset = getView().getPadding().getLeft();
                final Location location = getAbsoluteLocation();
                location.add(offset, 0);
                textView.setLocation(location);
                textView.markDamaged();
            }
        }
    }
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.