Examples of RootWindow


Examples of org.flexdock.util.RootWindow

        RootWindow[] windows = DockingManager.getDockingWindows();
        return windows.length==0? null: windows[0];
    }

    public static Component getRestoreContainer(Dockable dockable) {
        RootWindow window = getRestoreWindow(dockable);
        return window==null? null: window.getRootContainer();
    }
View Full Code Here

Examples of org.flexdock.util.RootWindow

        return new Rectangle(leftBar.x + leftBar.width, leftBar.y, bottomBar.width-leftBar.width-rightBar.width, leftBar.height);
    }

    public Rectangle getLayoutArea(DockbarManager mgr) {
        Rectangle rect = new Rectangle();
        RootWindow window = mgr==null? null: mgr.getWindow();
        if(window==null)
            return rect;

        JLayeredPane layeredPane = window.getLayeredPane();

        Component leftEdge = getEdgeGuide(mgr, MinimizationManager.LEFT);
        Component rightEdge = getEdgeGuide(mgr, MinimizationManager.RIGHT);
        Component bottomEdge = getEdgeGuide(mgr, MinimizationManager.BOTTOM);
        Component topEdge = getEdgeGuide(mgr, MinimizationManager.TOP);
View Full Code Here

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

Examples of org.flexdock.util.RootWindow

    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

Examples of org.flexdock.util.RootWindow

        // 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

Examples of org.flexdock.util.RootWindow

        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

Examples of org.flexdock.util.RootWindow

        }
        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

Examples of org.flexdock.util.RootWindow

        // 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

Examples of org.flexdock.util.RootWindow

        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

Examples of org.flexdock.util.RootWindow




    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
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.