Package org.flexdock.docking.state.tree

Examples of org.flexdock.docking.state.tree.SplitNode


            return dockFullPath(dockable, rootPort, region);
        }

        DockingPort port = rootPort;
        for(Iterator it=nodes.iterator(); it.hasNext();) {
            SplitNode node = (SplitNode)it.next();
            Component comp = port.getDockedComponent();
            region = getRegion(node, comp);

            JSplitPane splitPane = comp instanceof JSplitPane? (JSplitPane)comp: null;
            // path was broken.  we have no SplitPane, or the SplitPane doesn't
            // match the orientation of the current node, meaning the path was
            // altered at this point.
            if(splitPane==null || splitPane.getOrientation()!=node.getOrientation()) {
                return dockBrokenPath(dockable, port, region, node);
            }

            // assume there is a transient sub-dockingPort in the split pane
            comp = node.getRegion()==LEFT || node.getRegion()==TOP? splitPane.getLeftComponent(): splitPane.getRightComponent();
            port = (DockingPort)comp;

            // move on to the next node
        }
View Full Code Here


        if(embedded==null || tabbed) {
            return dock(dockable, port, CENTER_REGION, null);
        }

        String embedId = embedded.getPersistentId();
        SplitNode lastNode = getLastNode();
        if(embedId.equals(lastNode.getSiblingId())) {
            region = getRegion(lastNode, current);
            ctrlNode = lastNode;
        }

        return dock(dockable, port, region, ctrlNode);
View Full Code Here

            return false;
        }

        //begin code that matters.

        SplitNode lastNode = getLastNode();
        String lastSibling = lastNode==null? null: lastNode.getSiblingId();

        Set dockables = port.getDockables();
        for(Iterator it=dockables.iterator(); lastSibling!=null && it.hasNext();) {
            Dockable d = (Dockable)it.next();
            if(d.getPersistentId().equals(lastSibling)) {
View Full Code Here

    public Object clone() {
        ArrayList nodeList = null;
        if(nodes!=null) {
            nodeList = new ArrayList(nodes.size());
            for(Iterator it=nodes.iterator(); it.hasNext();) {
                SplitNode node = (SplitNode)it.next();
                nodeList.add(node.clone());
            }
        }

        DockingPath path = new DockingPath(siblingId, tabbed, nodeList);
        path.rootPortId = rootPortId;
View Full Code Here

            percent = (float) ((DockingSplitPane) split).getPercent();
        } else {
            percent = SwingUtility.getDividerProportion(split);
        }

        SplitNode node = new SplitNode(split.getOrientation(), 0, percent, null);
        node.setDockingRegion(region);

        link(node, left);
        link(node, right);

        return node;
View Full Code Here

    }

    private float getSplitPaneRatio(Dockable dockable, String region) {
        // check to see if the dockable was in a split layout.  if so, get the deepest split
        // node we can find so we can grab the split proportion percentage.
        SplitNode lastSplitNode = DockingPath.createNode(dockable);
        if (lastSplitNode != null) {
            return lastSplitNode.getPercentage();
        }

        // if we couldn't determine the splitPane ratio using the DockingPath above, then
        // try the regionInsets
        Float ratioObject = dockable.getDockingProperties().getRegionInset(region);
View Full Code Here

TOP

Related Classes of org.flexdock.docking.state.tree.SplitNode

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.