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

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


                // TODO remove the open view from the container and place on
                // workspace; replace the internal view with an icon
            } else if (sourceView.getContent() instanceof FieldContent) {
                final ViewRequirement requirement = new ViewRequirement(sourceView.getContent(), ViewRequirement.OPEN);
                final View view = Toolkit.getViewFactory().createView(requirement);
                addWindow(view, new Placement(newLocation));
                sourceView.getState().clearViewIdentified();
            } else {
                addWindowFor(sourceView.getContent().getAdapter(), new Placement(newLocation));
                sourceView.getState().clearViewIdentified();
            }
        } else {
            sourceView.markDamaged();
            sourceView.setLocation(newLocation);
View Full Code Here


                    final AdapterManager adapterManager = IsisContext.getPersistenceSession().getAdapterManager();
                    serviceObjects[i++] = adapterManager.adapterFor(object);
                }
                final ObjectSpecification spec = getSpecificationLoader().loadSpecification(Object.class);
                final ObjectList collection = new ObjectList(spec, serviceObjects);
                addWindowFor(getAdapterManager().adapterFor(collection), new Placement(at));
            }
        });

        menuForChangingLook(options);
View Full Code Here

                resolveContent();
                markDamaged();
            }
            final Location location = getAbsoluteLocation();
            location.translate(click.getLocation());
            getWorkspace().addWindowFor(getContent().getAdapter(), new Placement(this));
        } else {
            super.secondClick(click);
        }
    }
View Full Code Here

    @Override
    public void secondClick(final Click click) {
        final int y = click.getLocation().getY();
        if (y < top) {
            getWorkspace().addWindowFor(getContent().getAdapter(), new Placement(this));
        } else {
            super.secondClick(click);
        }
    }
View Full Code Here

        @Override
        public void execute(final Workspace workspace, final View view, final Location at) {
            final ObjectAdapter object = view.getContent().getAdapter();
            final ObjectSpecification spec = object.getSpecification();
            final ObjectAdapter instances = IsisContext.getPersistenceSession().findInstances(new QueryFindAllInstances(spec.getFullIdentifier()), QueryCardinality.MULTIPLE);
            workspace.objectActionResult(instances, new Placement(view));
        }
View Full Code Here

                    // clone.setValue((OneToOneAssociation) fields[i],
                    // fld.getObject());
                }
            }

            workspace.objectActionResult(clone, new Placement(view));
        }
View Full Code Here

                resolveContent();
                markDamaged();
            }
            final Location location = getAbsoluteLocation();
            location.translate(click.getLocation());
            getWorkspace().addWindowFor(getContent().getAdapter(), new Placement(this));
        } else {
            super.secondClick(click);
        }
    }
View Full Code Here

        ;
        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

            }
        });
    }

    private void openIcon() {
        getWorkspace().addWindowFor(getContent().getAdapter(), new Placement(getLocation()));
    }
View Full Code Here

                public void execute() {
                    final ActionContent actionContent = ((ActionContent) view.getContent());
                    final ObjectAdapter result = actionContent.execute();
                    LOG.debug("action invoked with result " + result);
                    if (result != null) {
                        view.objectActionResult(result, new Placement(view.getAbsoluteLocation()));
                    }
                    view.getViewManager().disposeUnneededViews();
                    view.getFeedbackManager().showMessagesAndWarnings();
                }
View Full Code Here

TOP

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

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.