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

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


public class MinimizedView extends AbstractView {
    private class CloseWindowControl extends WindowControl {

        public CloseWindowControl(final View target) {
            super(new UserAction() {
                @Override
                public Consent disabled(final View view) {
                    return Allow.DEFAULT;
                }
View Full Code Here


        }
    }

    private class RestoreWindowControl extends WindowControl {
        public RestoreWindowControl(final View target) {
            super(new UserAction() {

                @Override
                public Consent disabled(final View view) {
                    return Allow.DEFAULT;
                }
View Full Code Here

            final UserActionSet suboptions = options.addNewActionSet("Replace with");
            while (possibleViews.hasMoreElements()) {
                final ViewSpecification specification = (ViewSpecification) possibleViews.nextElement();

                if (specification != getSpecification()) {
                    final UserAction viewAs = new ReplaceViewOption(specification) {
                        @Override
                        protected void replace(final View view, final View withReplacement) {
                            final View parent = wrappedView.getParent();
                            wrappedView = LabelBorder.createFieldLabelBorder(view.getParent().getViewAxes().getAxis(LabelAxis.class), withReplacement);
                            wrappedView.setParent(parent);
View Full Code Here

        // TODO fix and remove following line
        if (true) {
            return;
        }

        final UserAction option = new UserAction() {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                showCollectionsOnly = !showCollectionsOnly;
            }
View Full Code Here

    public static void setRender(final ResizeWindowRender render) {
        ResizeWindowControl.render = render;
    }

    public ResizeWindowControl(final View target) {
        super(new UserAction() {

            @Override
            public Consent disabled(final View view) {
                return Veto.DEFAULT;
            }
View Full Code Here

        options.add(new DisposeObjectOption());
    }

    private static void menuOptions(final List<ObjectAction> actions, final ObjectAdapter target, final UserActionSet menuOptionSet) {
        for (int i = 0; i < actions.size(); i++) {
            final UserAction option;
            final int noOfParameters = actions.get(i).getParameterCount();
            if (noOfParameters == 0) {
                option = ImmediateObjectOption.createOption(actions.get(i), target);
            } else if (false /*actions.get(i).isContributed() && noOfParameters == 1 && target != null && target.getSpecification().isOfType(actions.get(i).getParameters().get(0).getSpecification())*/) {
                option = ImmediateObjectOption.createServiceOption(actions.get(i), target);
View Full Code Here

        options.add(new DisposeObjectOption());
    }

    private static void menuOptions(final List<ObjectAction> actions, final ObjectAdapter target, final UserActionSet menuOptionSet) {
        for (int i = 0; i < actions.size(); i++) {
            UserAction option = null;
            if (actions.get(i).getActions().size() > 0) {
                option = menuOptionSet.addNewActionSet(actions.get(i).getName());
                menuOptions(actions.get(i).getActions(), target, (UserActionSet) option);

            } else {
View Full Code Here

        // TODO fix and remove following line
        if (true) {
            return;
        }

        final UserAction option = new UserAction() {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                showCollectionsOnly = !showCollectionsOnly;
            }
View Full Code Here

public class MinimizedView extends AbstractView {
    private class CloseWindowControl extends WindowControl {

        public CloseWindowControl(final View target) {
            super(new UserAction() {
                @Override
                public Consent disabled(final View view) {
                    return Allow.DEFAULT;
                }
View Full Code Here

        }
    }

    private class RestoreWindowControl extends WindowControl {
        public RestoreWindowControl(final View target) {
            super(new UserAction() {

                @Override
                public Consent disabled(final View view) {
                    return Allow.DEFAULT;
                }
View Full Code Here

TOP

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

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.