Package org.flexdock.docking

Examples of org.flexdock.docking.Dockable


        } else if (child instanceof JTabbedPane) {
            LayoutNode[] children = createLayout((JTabbedPane)child);
            for(int i=0; i<children.length; i++)
                link(node, children[i]);
        } else {
            Dockable dockable = DockingManager.getDockable(child);
            LayoutNode childNode = createLayout(dockable);
            link(node, childNode);
        }
    }
View Full Code Here


            if(children[i]!=dragEdge)
                remove(children[i]);
        }

        // add the new component
        Dockable d = manager.getActiveDockable();
        Component c = d==null? null: d.getComponent();
        if(c!=null)
            add(c, BorderLayout.CENTER);
    }
View Full Code Here

        layoutViewpane();
    }


    public int getDesiredViewpaneSize() {
        Dockable dockable = manager.getActiveDockable();
        if(dockable==null)
            return 0;

        Rectangle rect = DockbarLayoutManager.getManager().getViewArea(manager, dockable);
        DockablePropertySet props = dockable.getDockingProperties();

        // determine what percentage of the viewable area we want the viewpane to take up
        float viewSize = props.getPreviewSize().floatValue();
        int edge = manager.getActiveEdge();
        if(edge==MinimizationManager.LEFT || edge==MinimizationManager.RIGHT) {
View Full Code Here

        return (int)(((float)rect.height)*viewSize);
    }

    protected void layoutViewpane() {
        ViewPane viewPane = manager.getViewPane();
        Dockable dockable = manager.getActiveDockable();
        if(dockable==null) {
            viewPane.setBounds(0, 0, 0, 0);
            return;
        }

View Full Code Here

            }
        };
    }

    public static View getInstance(String viewId) {
        Dockable view = DockingManager.getDockable(viewId);
        return view instanceof View ? (View) view : null;
    }
View Full Code Here

* Window - Preferences - Java - Code Style - Code Templates
*/
public class ActiveDockableHandler extends DockbarListener.Stub {

    public void dockableLocked(DockbarEvent evt) {
        Dockable d = (Dockable)evt.getSource();
        if(d!=null)
            ActiveDockableTracker.requestDockableActivation(d.getComponent());
    }
View Full Code Here

        if(d!=null)
            ActiveDockableTracker.requestDockableActivation(d.getComponent());
    }

    public void minimizeStarted(DockbarEvent evt) {
        Dockable d = (Dockable)evt.getSource();
        // block minimization on floating views
        if(d!=null && DockingUtility.isFloating(d))
            evt.consume();
    }
View Full Code Here

        if(!CENTER_REGION.equals(region))
            return true;

        // allow docking in the CENTER if there's nothing already there,
        // or if there's no Dockable associated with the component there
        Dockable dockable = getCenterDockable();
        if(dockable==null)
            return true;

        // otherwise, only allow docking in the CENTER if the dockable
        // doesn't mind
        return !dockable.getDockingProperties().isTerritoryBlocked(region).booleanValue();
    }
View Full Code Here

    public static void addListener(DockbarListener listener) {
        EventManager.addListener(listener);
    }

    public static void activate(String dockableId, boolean locked) {
        Dockable dockable = DockingManager.getDockable(dockableId);
        activate(dockable, locked);
    }
View Full Code Here

        return edge;
    }

    public int getEdge(String dockableId) {
        Dockable dockable = DockingManager.getDockable(dockableId);
        return getEdge(dockable);
    }
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.