Package org.flexdock.util

Examples of org.flexdock.util.RootWindow


            return;

        // root-ports are tracked by window.  if we can't find a parent window, then we
        // can track the dockingport.
        Container changedParent = evt.getChangedParent();
        RootWindow window = RootWindow.getRootContainer(changedParent);
        if(window==null)
            return;

        boolean removal = isRemoval(evt);
        if(removal)
View Full Code Here


        Class c = DockingManager.class;
    }


    public static ActiveDockableTracker getTracker(Component component) {
        RootWindow window = RootWindow.getRootContainer(component);
        return getTracker(window);
    }
View Full Code Here

    }



    static void windowActivated(Component c) {
        RootWindow window = RootWindow.getRootContainer(c);
        ActiveDockableTracker tracker = getTracker(window);
        synchronized(LOCK) {
            currentTracker = tracker;
        }
    }
View Full Code Here

            port.setDragInProgress(operation!=null);
        }
    }

    private void preprocessHeavyweightDockables() {
        RootWindow targetWindow = getTargetWindow();

        if(newGlassPane==null && targetWindow!=null) {
            Component gp = targetWindow.getGlassPane();
            if(gp instanceof DragGlasspane) {
                setCurrentGlassPane((DragGlasspane)gp);
            }
        }
    }
View Full Code Here

    private FloatingDockingPort dockingPort;

    private String groupName;

    public static DockingFrame create(Component c, String groupName) {
        RootWindow rootWin = RootWindow.getRootContainer(c);
        Component window = rootWin.getRootContainer();
        if (window instanceof DockingFrame) {
            window = ((DockingFrame) window).getOwner();
        }

        //Applets are actually contained in a frame
View Full Code Here

        if (dockable == null)
            return false;

        Component dragSrc = dockable.getComponent();
        Container parent = dragSrc.getParent();
        RootWindow rootWin = RootWindow.getRootContainer(parent);

        // if there's no parent container, then we really don't have anything
        // from which to to
        // undock this component, now do we?
        if (parent == null)
            return false;

        boolean success = false;
        DockingPort dockingPort = DockingUtility.getParentDockingPort(dragSrc);

        // notify that we are about to undock
        Map dragContext = DragManager.getDragContext(dockable);
        DockingEvent dockingEvent = new DockingEvent(dockable, dockingPort,
                dockingPort, DockingEvent.UNDOCKING_STARTED, dragContext);
        EventManager.dispatch(dockingEvent);
        // if(dockingEvent.isConsumed())
        // return false;

        if (dockingPort != null) {
            // if 'dragSrc' is currently docked, then undock it instead of using
            // a
            // simple remove(). this will allow the DockingPort to do any of its
            // own
            // cleanup operations associated with component removal.
            success = dockingPort.undock(dragSrc);
        } else {
            // otherwise, just remove the component
            parent.remove(dragSrc);
            success = true;
        }

        if (rootWin != null) {
            SwingUtility.revalidate(rootWin.getContentPane());
            SwingUtility.repaint(rootWin.getContentPane());
        }

        if (success) {
            dockingEvent = new DockingEvent(dockable, dockingPort, dockingPort,
                                            DockingEvent.UNDOCKING_COMPLETE, dragContext);
View Full Code Here

    public static HierarchyListener getInstance() {
        return SINGLETON;
    }

    public static void remove(Component c) {
        RootWindow window = RootWindow.getRootContainer(c);
        if (window != null) {
            synchronized(TRACKERS_BY_WINDOW) {
                TRACKERS_BY_WINDOW.remove(window);
            }
        }
View Full Code Here

            }
        }
    }

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

        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

        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

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.