Package org.flexdock.docking

Examples of org.flexdock.docking.Dockable


            return false;

        if (!DockingManager.isValidDockingRegion(region))
            return false;

        Dockable docked = DockingManager.getDockable(port.getDockedComponent());
        if (docked == null)
            return true;

        // don't allow them to dock into this region if the territory there is
        // blocked.
        if (docked.getDockingProperties().isTerritoryBlocked(region)
                .booleanValue())
            return false;

        // check to see if we're already docked into this region.
        // get the parent dockingPort.
        Container container = docked.getComponent().getParent();
        // now get the grandparent dockingport
        DockingPort grandparent = DockingManager.getDockingPort(container);

        // if we don't share the grandparent dockingport, then we're definitely
        // not split in the same dockingport
View Full Code Here


        if (elder instanceof DockingSplitPane) {
            elder = ((DockingSplitPane) elder).getElderComponent();
        }

        Dockable dockable = DockingManager.getDockable(elder);
        if (dockable != null) {
            // DockingSplitPane splitter = (DockingSplitPane)splitPane;
            RegionChecker rc = port.getDockingProperties().getRegionChecker();
            float prefSize = rc.getSiblingSize(dockable.getComponent(),
                                               getCreationRegion(splitPane));
            return isElderTopLeft(splitPane) ? 1f - prefSize : prefSize;
            // return prefSize;
        }
View Full Code Here

        // now, assign the currentCover to the new one and repaint
        currentDropTargets = dropTargets;
        DockingPort port = dropTargets==null? null: (DockingPort)dropTargets.parent;
        // this is the dockable we're currently hovered over, not the one
        // being dragged
        Dockable hover = getHoverDockable(dropTargets);

        Point mousePoint = token.getCurrentMouse((Component)port);
        region = findRegion(port, hover, mousePoint);
        // set the target dockable
        token.setTarget(port, region);
View Full Code Here

        postPainter = null;
    }

    protected DragPreview getPreviewDelegate(Component dockable, DockingPort port) {
        if(!previewInit) {
            Dockable d = DockingManager.getDockable(dockable);
            previewDelegate = EffectsManager.getPreview(d, port);
            previewInit = true;
        }
        return previewDelegate;
    }
View Full Code Here

        postPainter = painter;
    }

    protected void paintComponentImpl(Graphics g) {
        if(currentDragToken!=null && previewDelegate!=null && previewPoly!=null) {
            Dockable dockable = currentDragToken.getDockableReference();
            Map dragInfo = getDragContext(currentDragToken);
            previewDelegate.drawPreview((Graphics2D)g, previewPoly, dockable, dragInfo);
        }
    }
View Full Code Here

    private Map getDragContext(DragOperation token) {
        if(token==null)
            return null;

        Dockable dockable = token.getDockableReference();
        return DragManager.getDragContext(dockable);
    }
View Full Code Here

        public void sync() {
            String viewId = (String)getDockableList().getSelectedItem();
            String region = (String)getRegionList().getSelectedItem();

            Dockable dockable = DockingManager.getDockable(viewId);
            Dockable sibling = DefaultDockingStrategy.getSibling(dockable, region);
            getSiblingLabel().setText(sibling==null? "null": sibling.toString());
        }
View Full Code Here

    private void updateIcon() {
        Object obj = getIcon();
        if(!(obj instanceof TextIcon))
            return;

        Dockable d = getDockable();
        DockablePropertySet p = d==null? null: d.getDockingProperties();
        if(p==null)
            return;

        int orientation = getOrientation();
        int rotation = ROTATIONS[orientation];
View Full Code Here

        PerspectiveManager.clear(port);
        int len = sequence.size();
        Dockable[] dockables = new Dockable[len];
        for(int i=0; i<len; i++) {
            DockingState info = (DockingState)sequence.get(i);
            Dockable dockable = info.getDockable();
            dockables[i] = dockable;
            String region = info.getRegion();
            if(i==0) {
                DockingManager.dock(info.getDockable(), port, info.getRegion());
                continue;
            }

            Dockable parent = info.getRelativeParent();
            float ratio = info.getSplitRatio();
            DockingUtility.dockRelative(dockable, parent, region, ratio);
        }

        PerspectiveManager.setDockingStateListening(listen);
View Full Code Here

    private LayoutNode[] createLayout(JTabbedPane tabs) {
        int len = tabs.getComponentCount();
        LayoutNode[] nodes = new LayoutNode[len];
        for(int i=0; i<len; i++) {
            Component comp = tabs.getComponent(i);
            Dockable dockable = DockingManager.getDockable(comp);
            nodes[i] = createLayout(dockable);
        }
        return nodes;
    }
View Full Code Here

TOP

Related Classes of org.flexdock.docking.Dockable

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.