Examples of LayoutODOMEditorContext


Examples of com.volantis.mcs.eclipse.ab.editors.layout.LayoutODOMEditorContext

     */
    private void supportOutlineDND() {

        TreeViewer treeViewer = getTreeViewer();

        final LayoutODOMEditorContext odomEditorContext =
            (LayoutODOMEditorContext) getODOMEditorContext();
        Transfer transfer [] = new Transfer[]{
            new ODOMElementTransfer(odomEditorContext.getODOMFactory(),
                    "layoutElements")
        };

        final ODOMSelectionFilter filter =
                new ODOMSelectionFilter(null,
                        new String[]{
                            LayoutSchemaType.LAYOUT.getName(),
                            LayoutSchemaType.CANVAS_LAYOUT.getName(),
                            LayoutSchemaType.MONTAGE_LAYOUT.getName()
                        });

        final ArrayBasedActionDetails actionDetails =
                new ArrayBasedActionDetails();

        // Set up a listener that will update the action's enablement
        // status, using the {@link ODOMActionCommand#enable} method return
        // value, storing the selection in the actionDetails
        ODOMElementSelectionListener dndListener =
                new ODOMElementSelectionListener() {
                    public void selectionChanged(ODOMElementSelectionEvent event) {
                        actionDetails.setElements(event.getSelection().
                                toODOMElementArray());
                    }
                };

        odomEditorContext.getODOMSelectionManager().
                addSelectionListener(dndListener, filter);

        int operations = DND.DROP_COPY | DND.DROP_MOVE;

        treeViewer.addDragSupport(operations, transfer,
                new LayoutDragSourceListener(transfer[0], actionDetails));
        treeViewer.addDropSupport(operations, transfer,
                new LayoutDropTargetListener(actionDetails,
                        odomEditorContext.getODOMSelectionManager(),
                        odomEditorContext.getLayoutEditorContext()));
    }
View Full Code Here

Examples of com.volantis.mcs.eclipse.ab.editors.layout.LayoutODOMEditorContext

         * Updates the enablement of the section details composites based on
         * the read onlyness of the currently selected variant
         */
        private void updateEnablement() {
            if (getSectionDetailsComposites() != null) {
                final LayoutODOMEditorContext layoutODOMEditorContext =
                    ((LayoutODOMEditorContext) odomEditorContext);
                final LayoutEditorContext layoutEditorContext =
                    layoutODOMEditorContext.getLayoutEditorContext();
                final boolean enablement =
                    !layoutEditorContext.isSelectedVariantReadOnly();
                final Iterator iterator =
                    getSectionDetailsComposites().iterator();
                while (iterator.hasNext()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.