bibliothek.gui.dock.util.UIScheme Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of docking-frames-core Show documentation
Show all versions of docking-frames-core Show documentation
${project.name} is base or core library
/*
* 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.util;
import bibliothek.util.Path;
/**
* An algorithm that can create missing entries for an {@link UIProperties}s.
* @author Benjamin Sigg
* @param The kind of values this map contains
* @param The kind of observers used to read values from this map
* @param The kind of bridges used to transfer values V
to observers U
*/
public interface UIScheme, B extends UIBridge> {
/**
* Informs this scheme that it is now used by properties
.
* @param properties the owner of this scheme
*/
public void install( UIProperties properties );
/**
* Informs this scheme that it is no longer used by properties
.
* @param properties an old client of this scheme
*/
public void uninstall( UIProperties properties );
/**
* Creates the resource with name name
. This method may be called often
* and should complete quickly.
* @param name the name of some resource
* @param properties the map that will use the resource
* @return the resource or null
if this scheme does not know name
*/
public V getResource( String name, UIProperties properties );
/**
* Creates the {@link UIBridge} that handles resources of type name
.
* @param name the name of the bridge
* @param properties the map that will use the resource
* @return the new bridge or null
if this scheme does not know name
*/
public B getBridge( Path name, UIProperties properties );
/**
* Adds a listener to this scheme.
* @param listener the new listener, not null
*/
public void addListener( UISchemeListener listener );
/**
* Removes a listener from this scheme.
* @param listener the listener to remove
*/
public void removeListener( UISchemeListener listener );
}