Package org.flexdock.docking.state

Examples of org.flexdock.docking.state.DockingState


            group.destroy();
        }
    }

    private String getFloatingGroup(Dockable dockable) {
        DockingState info = getDockingState(dockable, false);
        return info.getFloatingGroup();
    }
View Full Code Here


        DockingState info = getDockingState(dockable, false);
        return info.getFloatingGroup();
    }

    private void setFloatingGroup(Dockable dockable, String group) {
        DockingState info = getDockingState(dockable, false);
        info.setFloatingGroup(group);
    }
View Full Code Here

    void update(LayoutSequence sequence) {
        List states = sequence.getDockingStates();

        synchronized(dockingInfo) {
            for(Iterator it=states.iterator(); it.hasNext();) {
                DockingState info = (DockingState)it.next();
                dockingInfo.put(info.getDockableId(), info);
            }
        }
    }
View Full Code Here

        if(!isEnabled()) {
            return;
        }

        Dockable dockable = dockingEvent.getDockable();
        DockingState info = getDockingState(dockable);
        // if docking has just completed, then we cannot be in a minimized state
        info.setMinimizedConstraint(MinimizationManager.UNSPECIFIED_LAYOUT_CONSTRAINT);

        // update the floating state
        RootWindow window = RootWindow.getRootContainer(dockable.getComponent());
        FloatManager floatManager = DockingManager.getLayoutManager().getFloatManager();
        Component frame = window==null? null: window.getRootContainer();
View Full Code Here

        float y = (float)p.y/(float)contentPane.getHeight() * 100f;
        p.x = Math.round(x);
        p.y = Math.round(y);

        // store the center point
        DockingState info = getDockingState(dockable);
        info.setCenter(p);
    }
View Full Code Here

        DockingState info = getDockingState(dockable);
        info.setCenter(p);
    }

    private void updateDockingPath(Dockable dockable) {
        DockingState info = getDockingState(dockable);
        DockingPath path = DockingPath.create(dockable);
        info.setPath(path);
    }
View Full Code Here

        DockingPath path = DockingPath.create(dockable);
        info.setPath(path);
    }

    private void updateRelative(Dockable dockable) {
        DockingState info = getDockingState(dockable);
        DockingPort port = dockable.getDockingPort();

        // don't update relative info for tabbed layout, since we
        // technically have more than one relative.
        if(port.getDockedComponent()!=dockable.getComponent())
            return;

        Component comp = ((Component)port).getParent();
        // if we're not inside a split pane, then there is no relative
        if(!(comp instanceof JSplitPane)) {
            setNullRelative(info);
            return;
        }

        JSplitPane splitPane = (JSplitPane)comp;
        Component siblingComp = SwingUtility.getOtherComponent(splitPane, (Component)port);
        if(!(siblingComp instanceof DockingPort)) {
            setNullRelative(info);
            return;
        }

        Component otherDocked = ((DockingPort)siblingComp).getDockedComponent();
        Dockable sibling = otherDocked instanceof JSplitPane || otherDocked instanceof JTabbedPane? null: DockingManager.getDockable(otherDocked);
        if(sibling==null) {
            setNullRelative(info);
            return;
        }

        // if we got here, then we are definitely sharing a split layout with another dockable.
        String region = DefaultDockingStrategy.findRegion(dockable.getComponent());
        float ratio = SwingUtility.getDividerProportion(splitPane);

        // set the relative docking info
        info.setRelativeParent(sibling);
        info.setRegion(region);
        info.setSplitRatio(ratio);

        // make the sibling aware of us
        info = getDockingState(sibling);
        info.setRelativeParent(dockable);
        info.setRegion(DockingUtility.flipRegion(region));
        info.setSplitRatio(ratio);
    }
View Full Code Here

TOP

Related Classes of org.flexdock.docking.state.DockingState

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.