Package org.flexdock.docking

Examples of org.flexdock.docking.DockingPort


        TreeNode grandParent = parent.getParent();
        if(!(grandParent instanceof DockingPortNode))
            return null;

        DockingPort superPort = (DockingPort)((DockingPortNode)grandParent).getUserObject();
        DockingStrategy strategy = superPort.getDockingStrategy();
        return strategy.createDockingPort(superPort);
    }
View Full Code Here


            return;

        if (evt.getPropertyName().equals(DockablePropertySet.TAB_ICON)
                || evt.getPropertyName().equals(DockablePropertySet.DESCRIPTION)) {
            if (evt.getSource() instanceof Dockable) {
                DockingPort dockingPort = dockable.getDockingPort();
                if (dockingPort instanceof DefaultDockingPort) {
                    ((DefaultDockingPort) dockingPort).updateTab(dockable);
                }
            }
        } else if (DockablePropertySet.ACTIVE.equals(evt.getPropertyName())) {
View Full Code Here

     * @see DockingEvent#getOldDockingPort()
     * @see FloatingDockingPort#getDockableCount()
     * @see DockingEvent#consume()
     */
    public boolean isFloatDropAllowed(DockingEvent evt) {
        DockingPort oldPort = evt.getOldDockingPort();
        // if we're already floating, and we're the only dockable
        // in a floating dockingport, then we don't want to undock
        // from the port and re-float (dispose and create a new DockingFrame).
        if (oldPort instanceof FloatingDockingPort) {
            FloatingDockingPort dockingPort = (FloatingDockingPort) oldPort;
View Full Code Here

        Component docked = getDockedComponent();
        remove(docked);

        // add the components to their new parents.
        DockingStrategy strategy = getDockingStrategy();
        DockingPort oldContent = strategy.createDockingPort(this);
        DockingPort newContent = strategy.createDockingPort(this);
        addCmp(oldContent, docked);
        dockCmp(newContent, comp);

        JSplitPane newDockedContent = strategy.createSplitPane(this, region);
View Full Code Here

    split.setDividerLocation(percent);
   
    // make sure to invoke the installed BorderManager how that we have
    // a hierarchy of DockingPorts. otherwise, we may end up with some
    // ugly nested borders.
    DockingPort port = DockingUtility.getParentDockingPort(split);
    if (port instanceof DefaultDockingPort) {
        ((DefaultDockingPort) port).evaluateDockingBorderStatus();
    }

    split.validate();
View Full Code Here

        DockingPortNode superNode = (DockingPortNode)getParent();
        Object userObj = superNode.getUserObject();
        if(!(userObj instanceof DockingPort))
            return null;

        DockingPort superPort = (DockingPort)userObj;
        DockingStrategy strategy = superPort.getDockingStrategy();
        return strategy.createSplitPane(superPort, dockingRegion);
    }
View Full Code Here

        String key = port.getPersistentId();
        if(!contains(key)) {
            key = null;
            for(Iterator it=portsById.keySet().iterator(); it.hasNext();) {
                String tmpKey = (String)it.next();
                DockingPort tmp = (DockingPort)portsById.get(tmpKey);
                if(tmp==port) {
                    key = tmpKey;
                    break;
                }
            }
View Full Code Here

    public void setMainPort(String portId) {
        mainPortId = portId;
    }

    public DockingPort getMainPort() {
        DockingPort port = mainPortId==null? null: getPort(mainPortId);
        if(port==null) {
            port = getPortCount()>0? getPort(0): null;
        }
        return port;
View Full Code Here

    public boolean restore(String dockable) {
        return restore(DockingManager.getDockable(dockable));
    }

    private DockingPort getRootDockingPort() {
        DockingPort port = DockingManager.getDockingPort(rootPortId);
        if(port!=null)
            return port;

        Window activeWindow = SwingUtility.getActiveWindow();
        return DockingManager.getRootDockingPort(activeWindow);
View Full Code Here

    public boolean restore(Dockable dockable) {
        if(dockable==null || isDocked(dockable))
            return false;

        DockingPort rootPort = getRootDockingPort();
        String region = CENTER_REGION;
        if(nodes.size()==0) {
            return dockFullPath(dockable, rootPort, region);
        }

        DockingPort port = rootPort;
        for(Iterator it=nodes.iterator(); it.hasNext();) {
            SplitNode node = (SplitNode)it.next();
            Component comp = port.getDockedComponent();
            region = getRegion(node, comp);

            JSplitPane splitPane = comp instanceof JSplitPane? (JSplitPane)comp: null;
            // path was broken.  we have no SplitPane, or the SplitPane doesn't
            // match the orientation of the current node, meaning the path was
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.