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

bibliothek.gui.dock.accept.DockAcceptance 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) 2007 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.accept;

import bibliothek.gui.DockController;
import bibliothek.gui.DockStation;
import bibliothek.gui.Dockable;

/**
 * Used by a {@link DockController} to decide globally which 
 * {@link Dockable} can become child of which {@link DockStation}.
* The acceptance can be set through the method * {@link DockController#addAcceptance(DockAcceptance)} * @author Benjamin Sigg */ public interface DockAcceptance { /** * Tells whether or not child is allowed to become a * real child of parent. * @param parent the future parent * @param child the future child * @return whether or not child and parent * are allowed to be combined */ public boolean accept( DockStation parent, Dockable child ); /** * Tells whether child, which may be already a child of * parent, and next are allowed to be combined. * The result of this combination would replace child * on parent. * @param parent the future parent of the combination * @param child a Dockable which may be a child of parent * @param next a new Dockable * @return whether the combination is allowed or not */ public boolean accept( DockStation parent, Dockable child, Dockable next ); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy