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

bibliothek.gui.dock.common.intern.station.CommonDockStation Maven / Gradle / Ivy

Go to download

DockingFrames is an open source Java Swing docking framework, licenced under LGPL 2.1. This is the same distribution as the original distribution (http://www.docking-frames.org/), only reinstalled in maven

There is a newer version: 1.1.2p20b.fix-1
Show 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) 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.common.intern.station;

import bibliothek.gui.DockStation;
import bibliothek.gui.dock.DockFactory;
import bibliothek.gui.dock.common.CStation;
import bibliothek.gui.dock.common.intern.CommonElement;

/**
 * An interface that can be implemented by classes that extend a {@link DockStation} and
 * that represent a {@link CStation}.
 * @author Benjamin Sigg
 * @param  the kind of station this wraps
 * @param  the kind of {@link CommonDockStation} this is
 */
public interface CommonDockStation> extends CommonElement, DockStation{
	/**
	 * Gets this as S.
	 * @return this
	 */
	public S getDockStation();
	
	/**
	 * Returns this as station of type C. This method
	 * is not allowed to return null.
	 * @return this
	 */
	public C asDockStation();
	
	/**
	 * Gets the model of this station.
	 * @return the model, may not be null
	 */
	public CStation getStation();
	
	/**
	 * Gets the unique identifier of the {@link DockFactory} that stores and loads the layout of this
	 * station. For {@link CommonDockStation}s the result should always be {@link CommonDockStationFactory#FACTORY_ID}
	 * @see #getConverterID()
	 */
	public String getFactoryID();
	
	/**
	 * Gets the unique identifier of the {@link DockFactory} that should be used by the {@link CommonDockStationFactory}
	 * to actually write or read the layout. Usually the result of this method is the same result
	 * as {@link DockStation#getFactoryID()} (note: the factory id from the super class).
	 * @return the unique identifier of a {@link DockFactory}. Can be null if 
	 * {@link #getFactoryID()} does not return {@link CommonDockStationFactory#FACTORY_ID}
	 */
	public String getConverterID();
}