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

bibliothek.gui.dock.station.stack.CombinedHandler Maven / Gradle / Ivy

/*
 * 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) 2009 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.station.stack;

/**
 * A handler to change and read the visibility state and the z order of some item.
 * This handler is attached to some other component, the visibility state and the
 * z order depend not only on the item put also on internal states of the other items.
 * @author Benjamin Sigg
 *
 * @param  the kind of item whose visibility is changed
 */
public interface CombinedHandler {
	/**
	 * Sets the visibility of item.
	 * @param item some item
	 * @param visible its new visibility state
	 * @throws IllegalArgumentException if item does not belong
	 * to the component this handler is attached to
	 */
	public void setVisible( T item, boolean visible );
	
	/**
	 * Tells whether item is visible or not.
	 * @param item some item
	 * @return true if visible, false otherwise
	 * @throws IllegalArgumentException if item does not belong
	 * to the component this handler is attached to
	 */
	public boolean isVisible( T item );
	
	/**
	 * Sets the z order of item, items with lower z order
	 * are painted first.
	 * @param item some item
	 * @param order its z order
	 */
	public void setZOrder( T item, int order );
	
	/**
	 * Gets the z order of item.
	 * @param item the item
	 * @return the z order
	 * @throws IllegalArgumentException if item does not
	 * belong to the component this handler is attached to
	 */
	public int getZOrder( T item );
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy