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

org.eclipse.gef.EditPartFactory Maven / Gradle / Ivy

The newest version!
/*******************************************************************************
 * Copyright (c) 2000, 2010, 2012 IBM Corporation, Gerhardt Informatics Kft. and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *     Gerhardt Informatics Kft. - GEFGWT port
 *******************************************************************************/
package org.eclipse.gef;

/**
 * A factory for creating new EditParts. {@link EditPartViewer EditPartViewers}
 * can be configured with an EditPartFactory. Whenever an
 * EditPart in that viewer needs to create another EditPart, it can
 * use the Viewer's factory. The factory is also used by the viewer whenever
 * {@link EditPartViewer#setContents(Object)} is called.
 * 
 * @since 2.0
 */
public interface EditPartFactory {

	/**
	 * Creates a new EditPart given the specified context and
	 * model.
	 * 
	 * @param context
	 *            The context in which the EditPart is being created, such as
	 *            its parent.
	 * @param model
	 *            the model of the EditPart being created
	 * @return EditPart the new EditPart
	 */
	EditPart createEditPart(EditPart context, Object model);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy