Package org.flexdock.docking

Examples of org.flexdock.docking.DockingPort


            return false;

        // set the sibling preference
        setSiblingPreference(parent, relativeRegion, ratio);

        DockingPort port = parent.getDockingPort();
        if (port != null)
            return DockingManager.dock(dockable, port, relativeRegion);

        return false;
    }
View Full Code Here


    public Dockable getSibling(String region) {
        return DefaultDockingStrategy.getSibling(this, region);
    }

    public Viewport getViewport() {
        DockingPort port = getDockingPort();
        return port instanceof Viewport ? (Viewport) port : null;
    }
View Full Code Here

    public void reset(Component window) {
        if(window==null) {
            reset();
        } else {
            DockingPort port = DockingManager.getRootDockingPort(window);
            reset(port);
        }
    }
View Full Code Here

        // null-out the current perspective name to force a reload
        // otherwise, the loadPerspective() call will short-circuit since
        // it'll detect that the requested perspective is already loaded.
        setCurrentPerspectiveName(null);

        DockingPort port = DockingManager.getRootDockingPort(w);
        Perspective[] perspectives = getPerspectives();
        for (int i = 0; i < perspectives.length; i++) {
            String id = perspectives[i].getPersistentId();
            if (!id.equals(EMPTY_PERSPECTIVE)) {
                //TODO reset layout, maybe there is a better way
View Full Code Here

        if(window!=null) {
            loadPerspective(perspectiveId, window.getRootContainer(), reset);
            return;
        }

        DockingPort rootPort = findMainDockingPort();
        if(rootPort!=null)
            loadPerspective(perspectiveId, rootPort, reset);
    }
View Full Code Here

        if(window==null) {
            loadPerspective(perspectiveId, reset);
            return;
        }

        DockingPort port = DockingManager.getRootDockingPort(window);
        loadPerspective(perspectiveId, port, reset);
    }
View Full Code Here

    public synchronized boolean store(String persistenceKey) throws IOException, PersistenceException {
        if(m_persistHandler==null)
            return false;

        DockingPort rootPort = findMainDockingPort();
        cacheLayoutState(getCurrentPerspective(), rootPort);

        Perspective[] items = getPerspectives();
        for(int i=0; i<items.length; i++) {
            items[i] = (Perspective)items[i].clone();
View Full Code Here

        // locate all the root dockingports
        Set rootPorts = DockingPortTracker.getRootDockingPorts();
        ArrayList windows = new ArrayList(rootPorts.size());
        // for each dockingPort, resolve its root window
        for(Iterator it=rootPorts.iterator(); it.hasNext();) {
            DockingPort port = (DockingPort)it.next();
            RootWindow window = RootWindow.getRootContainer((Component)port);
            if(window!=null)
                windows.add(window);
        }
        return (RootWindow[])windows.toArray(new RootWindow[0]);
View Full Code Here

        m_defaultPersistenceKey = key;
    }

    private DockingPort findMainDockingPort() {
        Set rootPorts = DockingPortTracker.getRootDockingPorts();
        DockingPort rootPort = null;
        for(Iterator it=rootPorts.iterator(); it.hasNext();) {
            DockingPort port = (DockingPort)it.next();
            Window win = SwingUtilities.getWindowAncestor((Component)port);
            if(win instanceof Dialog)
                continue;

            rootPort = port;
View Full Code Here

        Component docked = parent.getDockedComponent();
        if(!(docked instanceof JSplitPane))
            return new DockingPort[0];

        JSplitPane split = (JSplitPane)docked;
        DockingPort left = null;
        DockingPort right = null;
        if(split.getLeftComponent() instanceof DockingPort)
            left = (DockingPort)split.getLeftComponent();
        if(split.getRightComponent() instanceof DockingPort)
            right = (DockingPort)split.getRightComponent();
View Full Code Here

TOP

Related Classes of org.flexdock.docking.DockingPort

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.