Package org.flexdock.util

Examples of org.flexdock.util.RootWindow


        return rect;
    }

    public JComponent getEdgeGuide(DockbarManager mgr, int edge) {
        // default behavior is to return the contentPane for all edges
        RootWindow window = mgr==null? null: mgr.getWindow();
        Component comp = window==null? null: window.getContentPane();
        return comp instanceof JComponent? (JComponent)comp: null;
    }
View Full Code Here


    public void loadPerspective(String perspectiveId) {
        loadPerspective(perspectiveId, false);
    }

    public void loadPerspective(String perspectiveId, boolean reset) {
        RootWindow window = getMainApplicationWindow();
        if(window!=null) {
            loadPerspective(perspectiveId, window.getRootContainer(), reset);
            return;
        }

        DockingPort rootPort = findMainDockingPort();
        if(rootPort!=null)
View Full Code Here

        // standard mechanism, we can try our own custom search
        if(windows.length==0)
            windows = resolveDockingWindows();

        // TODO: fix this code to keep track of the proper dialog owner
        RootWindow window = null;
        for(int i=0; i<windows.length; i++) {
            window = windows[i];
            if(window.getOwner()==null)
                break;
        }
        return window;
    }
View Full Code Here

        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

        }
        return (RootWindow[])windows.toArray(new RootWindow[0]);
    }

    public static DockingPort getMainDockingPort() {
        RootWindow window = getMainApplicationWindow();
        return window==null? null: DockingManager.getRootDockingPort(window.getRootContainer());
    }
View Full Code Here

        // update behavior of active Dockable changes
        EventManager.addListener(new ActiveDockableHandler());
    }

    public static DockbarManager getInstance(Component c) {
        RootWindow window = RootWindow.getRootContainer(c);
        return getInstance(window);
    }
View Full Code Here

        return (RootWindow)windowRef.get();
    }


    protected void install() {
        RootWindow window = getWindow();
        if(window==null)
            return;

        JLayeredPane layerPane = window.getLayeredPane();
        boolean changed = install(leftBar, layerPane);
        changed = install(rightBar, layerPane) || changed;
        changed = install(bottomBar, layerPane) || changed;
        changed = install(viewPane, layerPane) || changed;
View Full Code Here




    private int findDockbarEdge(Dockable dockable) {
        RootWindow window = RootWindow.getRootContainer(dockable.getComponent());
        if(window==null)
            return DEFAULT_EDGE;

        // get the dockable component and it's containing content pane
        Component cmp = dockable.getComponent();
        Container contentPane = window.getContentPane();

        // get the bounds of the content pane and dockable, translating the dockable into the
        // content pane's axes
        Rectangle contentRect = new Rectangle(0, 0, contentPane.getWidth(), contentPane.getHeight());
        Rectangle dockRect = SwingUtilities.convertRectangle(cmp.getParent(), cmp.getBounds(), contentPane);
View Full Code Here

    public void minimize(Dockable dockable) {
        if(dockable==null)
            return;

        int edge = DEFAULT_EDGE;
        RootWindow window = getWindow();
        if(window!=null && DockingManager.isDocked(dockable)) {
            edge = findDockbarEdge(dockable);
        }

        minimize(dockable, edge);
View Full Code Here

        Component owner = RestorationManager.getRestoreContainer(dockable);
        return restoreDockable(dockable, owner, dockingState);
    }

    private boolean restoreDockable(Dockable dockable, Component win, DockingState dockingState) {
        RootWindow window = RootWindow.getRootContainer(win);
        Container contentPane = window.getContentPane();

        Point dropPoint = getDropPoint(dockable, contentPane, dockingState);
        if(dropPoint==null)
            return false;
View Full Code Here

TOP

Related Classes of org.flexdock.util.RootWindow

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.