Examples of Dockable

@author Lilian Chamontin, vlsolutions. @version 1.0
  • org.flexdock.docking.Dockable
    This interface is designed to specify the API's required by {@code DockingManager} and {@code DockingPort} for dealing with dockablecomponents in a drag-n-drop fashion. A {@code Dockable} is the childcomponent that is docked into a {@code DockingPort}. @author Christopher Butler
  • org.noos.xing.mydoggy.Dockable
    This interface represents the super interface for of all dockable object, i.e. ToolWindow, ToolWindowTab and Content. @author Angelo De Caro (angelo.decaro@gmail.com) @see ToolWindow @see ToolWindowTab @see Content @since 1.4.0

  • Examples of org.noos.xing.mydoggy.Dockable

                    // remove the component related to dockable
                    multiSplitPane.remove(multiSplitPane.getMultiSplitLayout().getChildMap().get(getLeafName(dockable)));

                    // retrieve the component related to sole entry in entries
                    Dockable soleDockable = entries.keySet().iterator().next();
                    DockableLeaf soleLeaf = getLeaf(soleDockable);
                    Component soleLeafCmp = getWrappedComponent((Container) multiSplitPane.getMultiSplitLayout().getChildMap().get(soleLeaf.getName()));
                    soleLeaf.setName("1");
                    multiSplitPaneModelRoot = soleLeaf;
                    multiSplitPaneModelRoot.setParent(null);
    View Full Code Here

    Examples of org.noos.xing.mydoggy.Dockable

                        // update the components in the container
                        Component wrapper;
                        if (rootLeaf.getDockables().size() > 1) {
                            wrapper = multiSplitPane.getComponent(0);
                        } else {
                            Dockable delegator = entries.values().iterator().next().dockable;
                            wrapper = getWrapperForComponent(delegator, getComponentFromWrapper(multiSplitPane.getComponent(0)), Action.ADD_DOCK);
                        }
                        multiSplitPane.removeAll();

                        multiSplitPane.add(wrapper, firstLeaf.getName());
    View Full Code Here

    Examples of org.noos.xing.mydoggy.Dockable

                else {
                    if (dockableConstraint.getNode() instanceof DockableLeaf) {
                        DockableLeaf leaf = (DockableLeaf) dockableConstraint.getNode();

                        for (String leafDockableId : leaf.getDockables()) {
                            Dockable leafDockable = toolWindowManager.lookupDockable(leafDockableId);
                            if (leafDockable != null && !leafDockable.isDetached()) {
                                addDockable(dockable, component, leafDockable, dockableConstraint.getIndex(), dockableConstraint.getAggregationPosition());
                                return;
                            }
                        }
    View Full Code Here

    Examples of org.noos.xing.mydoggy.Dockable

                    if (isWrapper(component))
                        removeFromWrapper(component, dockable);
                    multiSplitPane.remove(component);

                    // retrieve the component related to sole entry in entries
                    Dockable leftDockable = entries.keySet().iterator().next();
                    DockableLeaf leftLeaf = getLeaf(leftDockable);

                    Component masterLeftLeafCmp = multiSplitPane.getMultiSplitLayout().getChildMap().get(leftLeaf.getName());
                    Component leftLeafCmp = getComponentFromWrapper(masterLeftLeafCmp);
                    leftLeaf.setName("1");
    View Full Code Here

    Examples of org.noos.xing.mydoggy.Dockable

                    if (leaf.getDockables().size() == 1)
                        break;

                    Component component = currentChildMap.get(leaf.getName());

                    Dockable dockable = toolWindowManager.lookupDockable(dockId);
                    setConstraints(dockable,
                            getComponentFromWrapper(component, dockable),
                            null,
                            -1,
                            AggregationPosition.DEFAULT
                    );
                }
            } else {
                Stack<Split> stack = new Stack<Split>();
                stack.push((Split) multiSplitPaneModelRoot);
                while (!stack.isEmpty()) {
                    Split split = stack.pop();

                    for (Node child : split.getChildren()) {
                        if (child instanceof DockableLeaf) {
                            DockableLeaf leaf = (DockableLeaf) child;

                            String[] dockIds = leaf.getDockables().toArray(new String[leaf.getDockables().size()]);
                            for (String dockId : dockIds) {

                                if (leaf.getDockables().size() == 1)
                                    break;

                                Component component = currentChildMap.get(leaf.getName());

                                Dockable dockable = toolWindowManager.lookupDockable(dockId);
                                setConstraints(dockable,
                                        getComponentFromWrapper(component, dockable),
                                        null,
                                        -1,
                                        AggregationPosition.DEFAULT
                                );
                            }
                        } else if (child instanceof Split) {
                            stack.push((Split) child);
                        }
                    }
                }
            }


            if (root instanceof Split) {
                // Step Two: apply model 1...Aggregate
                Stack<Split> stack = new Stack<Split>();
                stack.push((Split) root);
                while (!stack.isEmpty()) {
                    Split split = stack.pop();

                    for (Node child : split.getChildren()) {
                        if (child instanceof DockableLeaf) {
                            DockableLeaf leaf = (DockableLeaf) child;

                            List<String> ids = leaf.getDockables();
                            Dockable master = toolWindowManager.lookupDockable(leaf.getDockable());

                            for (int i = 1; i < ids.size(); i++) {
                                Dockable dockable = toolWindowManager.lookupDockable(ids.get(i));
                                setConstraints(dockable,
                                        getComponentFromWrapper(currentChildMap.get(getLeaf(dockable).getName()), dockable),
                                        master,
                                        -1,
                                        AggregationPosition.DEFAULT
                                );
                            }
                        } else if (child instanceof Split) {
                            stack.push((Split) child);
                        }
                    }
                }

                // Step Two: apply model 2...Isomorphing
                Map<String, Component> newChildMap = new LinkedHashMap<String, Component>();
                stack = new Stack<Split>();
                stack.push((Split) root);
                while (!stack.isEmpty()) {
                    Split split = stack.pop();

                    for (Node child : split.getChildren()) {
                        if (child instanceof DockableLeaf) {
                            DockableLeaf leaf = (DockableLeaf) child;

                            DockableLeaf currentLeaf = getLeaf(multiSplitPaneModelRoot, leaf.getDockable());

                            newChildMap.put(
                                    leaf.getName(),
                                    currentChildMap.get(currentLeaf.getName())
                            );
                        } else if (child instanceof Split) {
                            stack.push((Split) child);
                        }
                    }
                }

                multiSplitPane.getMultiSplitLayout().setChildMap(newChildMap);
            } else {
                DockableLeaf leaf = (DockableLeaf) root;

                List<String> dockIds = leaf.getDockables();
                Dockable masterDockable = toolWindowManager.lookupDockable(leaf.getDockable());
                for (int i = 1; i < dockIds.size(); i++) {
                    String dockId = dockIds.get(i);

                    Dockable dockable = toolWindowManager.lookupDockable(dockId);
                    setConstraints(dockable,
                            getComponentFromWrapper(currentChildMap.get(getLeaf(dockable).getName()), dockable),
                            masterDockable,
                            -1,
                            AggregationPosition.DEFAULT
    View Full Code Here

    Examples of org.noos.xing.mydoggy.Dockable

        public void applyToolWindow(ToolWindow toolWindow, PersistenceDelegateCallback.PersistenceNode toolNode, SharedWindows sharedWindows) {
            if (toolWindow.isVisible()) {

                if (sharedWindows.isInSharedWindow(toolWindow)) {
                    Dockable refDockable = sharedWindows.getRefDockable(toolWindow);

                    if (refDockable != null)
                        toolWindow.aggregateByReference((ToolWindow) refDockable, AggregationPosition.DEFAULT);
                }
    View Full Code Here

    Examples of org.noos.xing.mydoggy.Dockable

                        Component wrapper;
                        if (rootLeaf.getDockables().size() > 1) {
                            wrapper = multiSplitPane.getComponent(0);
                        } else {
                            Dockable delegator = entries.values().iterator().next().dockable;
                            wrapper = getWrapperForComponent(delegator, getComponentFromWrapper(multiSplitPane.getComponent(0)));
                        }
                        multiSplitPane.removeAll();

                        multiSplitPane.add(wrapper, firstLeaf.getName());
    View Full Code Here

    Examples of org.noos.xing.mydoggy.Dockable

                    // remove the component related to dockable
                    multiSplitPane.remove(multiSplitPane.getMultiSplitLayout().getChildMap().get(getLeafName(dockable)));

                    // retrieve the component related to sole entry in entries
                    Dockable soleDockable = entries.keySet().iterator().next();
                    DockableLeaf soleLeaf = getLeaf(soleDockable);
                    Component soleLeafCmp = getComponentFromWrapper(multiSplitPane.getMultiSplitLayout().getChildMap().get(soleLeaf.getName()));
                    soleLeaf.setName("1");
                    multiSplitPaneModelRoot = soleLeaf;
                    multiSplitPaneModelRoot.setParent(null);
    View Full Code Here

    Examples of org.noos.xing.mydoggy.Dockable

                        Component wrapper;
                        if (rootLeaf.getDockables().size() > 1) {
                            wrapper = multiSplitPane.getComponent(0);
                        } else {
                            Dockable delegator = entries.values().iterator().next().dockable;
                            wrapper = getWrapperForComponent(delegator, getComponentFromWrapper(multiSplitPane.getComponent(0)), Action.ADD_DOCK);
                        }
                        multiSplitPane.removeAll();

                        multiSplitPane.add(wrapper, firstLeaf.getName());
    View Full Code Here

    Examples of org.noos.xing.mydoggy.Dockable

                else {
                    if (constraint.getNode() instanceof DockableLeaf) {
                        DockableLeaf leaf = (DockableLeaf) constraint.getNode();

                        for (String leafDockableId : leaf.getDockables()) {
                            Dockable leafDockable = toolWindowManager.getDockable(leafDockableId);
                            if (leafDockable != null && !leafDockable.isDetached()) {
                                addDockable(dockable, component, leafDockable, constraint.getIndex(), constraint.getAggregationPosition());
                                return;
                            }
                        }
    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.