Package org.flexdock.docking

Examples of org.flexdock.docking.Dockable


        }
    }

    public Dockable getActiveDockable() {
        String dockingId = getActiveDockableId();
        Dockable dockable = DockingManager.getDockable(dockingId);
        return dockable;
    }
View Full Code Here


    public boolean isActive() {
        return getActiveDockable()!=null;
    }

    public void setActiveDockable(String dockableId) {
        Dockable dockable = DockingManager.getDockable(dockableId);
        setActiveDockable(dockable);
    }
View Full Code Here

        final int newEdge = getEdge(dockable);
        if(newEdge==MinimizationManager.UNSPECIFIED_LAYOUT_CONSTRAINT)
            dockable = null;

        // check for dockable changes
        Dockable oldDockable = getActiveDockable();
        final String newDockableId = dockable==null? null: dockable.getPersistentId();
        String currentlyActiveId = getActiveDockableId();
        boolean changed = Utilities.isChanged(currentlyActiveId, newDockableId);
        // check for edge changes
        changed = changed || newEdge!=getActiveEdge();
View Full Code Here

    private static JComponent createContentPane(boolean loaded) {

        MyDockingPort dockingPort = new MyDockingPort();

        Dockable topComp = createFramePanel("Top");
        DockingManager.registerDockable(topComp);
        DockingManager.dock(topComp, (DockingPort) dockingPort, DockingConstants.CENTER_REGION);

        Dockable south = createFramePanel("South");
        DockingManager.registerDockable(south);
        DockingManager.dock(south, topComp, DockingConstants.SOUTH_REGION, 0.3f);

        Dockable west = createFramePanel("West");
        DockingManager.registerDockable(west);
        DockingManager.dock(west, topComp, DockingConstants.WEST_REGION, 0.5f);

        Dockable l2South = createFramePanel("South of West");
        DockingManager.registerDockable(l2South);
        DockingManager.dock(l2South, west, DockingConstants.SOUTH_REGION, 0.33f);

        Dockable east = createFramePanel("East");
        DockingManager.registerDockable(east);
        DockingManager.dock(east, topComp, DockingConstants.EAST_REGION, 0.2f);

        return dockingPort;
    }
View Full Code Here

    private static Dockable createFramePanel(String title) {
        JLabel label = new JLabel("Content of " + title);
        JButton maxButton = createButton(createIcon("maximize.gif"));
        JToolBar toolbar = createPortletToolbar(maxButton);
        SimpleInternalFrame sif = new SimpleInternalFrame(title, toolbar, label);
        final Dockable dockable = new DockableSimpleInternalFrame(sif);

        maxButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                //System.out.println("Calling DockingManager to maximize: " + dockable);
                DockingManager.toggleMaximized(dockable);
View Full Code Here

    }

    private DockingInfo getDeepestWest(DockingPort port) {
        Component comp = port.getDockedComponent();
        if(comp instanceof JTabbedPane) {
            Dockable d = port.getDockable(CENTER_REGION);
            return new DockingInfo(d, port);
        }

        if(comp instanceof JSplitPane) {
            comp = ((JSplitPane)comp).getLeftComponent();
View Full Code Here

* @version $Id: RelativeHandler.java,v 1.4 2005-10-04 22:03:14 winnetou25 Exp $
*/
public class RelativeHandler implements RestorationHandler {

    public boolean restore(Dockable dockable, DockingState dockingState, Map context) {
        final Dockable parent = dockingState==null? null: dockingState.getRelativeParent();

        // in order to do a relative docking, the parent dockable
        // must already be docked.
        if(!DockingManager.isDocked(parent)) {
            return false;
View Full Code Here

    public Dockable[] getDockables() {
        ArrayList list = new ArrayList(dockingInfo.size());
        for(Iterator it=dockingInfo.keySet().iterator(); it.hasNext();) {
            String dockingId = (String)it.next();
            Dockable d = DockingManager.getDockable(dockingId);
            if(d!=null)
                list.add(d);
        }
        return (Dockable[])list.toArray(new Dockable[0]);
    }
View Full Code Here

    public DockingState getDockingState(String dockableId, boolean load) {
        if(dockableId==null)
            return null;

        if(load) {
            Dockable dockable = DockingManager.getDockable(dockableId);
            if(dockable!=null) {
                isMaintained(dockable);
            }
        }
        Object obj = dockingInfo.get(dockableId);
View Full Code Here

        ArrayList deferredMinimizedDockables = new ArrayList();
        boolean deferMinimized = SwingUtility.getActiveWindow()==null;

        boolean restoreFloatOnLoad = PerspectiveManager.isRestoreFloatingOnLoad();
        for(int i=0; i<dockables.length; i++) {
            Dockable dockable = dockables[i];
            if(DockingUtility.isMinimized(dockable)) {
                if(deferMinimized) {
                    deferredMinimizedDockables.add(dockable);
                } else {
                    RestorationManager.getInstance().restore(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.