All Downloads are FREE. Search and download functionalities are using the official Maven repository.

bibliothek.gui.dock.layout.LocationEstimationMap Maven / Gradle / Ivy

The newest version!
/*
 * Bibliothek - DockingFrames
 * Library built on Java/Swing, allows the user to "drag and drop"
 * panels containing any Swing-Component the developer likes to add.
 * 
 * Copyright (C) 2010 Benjamin Sigg
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 * 
 * Benjamin Sigg
 * [email protected]
 * CH - Switzerland
 */
package bibliothek.gui.dock.layout;

import bibliothek.gui.Dockable;
import bibliothek.gui.dock.DockElement;
import bibliothek.gui.dock.DockFactory;

/**
 * A map used for {@link DockFactory}, telling what children a {@link DockElement} has.
* This map is also a list of {@link DockLayoutInfo}s. The element at index * in this list matches the {@link Dockable} that was stored with key * index in the map of {@link DockConverter#getLayout(DockElement, java.util.Map)}. * @author Benjamin Sigg */ public interface LocationEstimationMap{ /** * Gets the number of children of this map * @return the total number of keys */ public int getChildCount(); /** * Gets the {@link DockLayoutInfo} that is associated with key childIndex. * @param childIndex some key between 0 and {@link #getChildCount()} * @return the info, not null */ public DockLayoutInfo getChild( int childIndex ); /** * Gets the number of children the item childIndex has. This includes direct * children and grand-children. * @param childIndex the key of some element * @return the number of children of childIndex */ public int getSubChildCount( int childIndex ); /** * Gets the subChildIndex'th child of childIndex. This includes direct * children and grand-children. * @param childIndex the key to some child * @param subChildIndex the index of some child of childIndex * @return the info, not null */ public DockLayoutInfo getSubChild( int childIndex, int subChildIndex ); /** * Informs this map that the jump from this station to childIndex can be described * by location. * @param childIndex the key of some child * @param location the location of childIndex, null will be ignored */ public void setLocation( int childIndex, DockableProperty location ); /** * Informs this map that the path to child childIndex, subChildIndex contains * location. The part location describes the jump from this * station to the child childIndex. * @param childIndex the key of some child * @param subChildIndex the index of some grand-child * @param location the location, null will be ignored */ public void setLocation( int childIndex, int subChildIndex, DockableProperty location ); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy