/**************************************************************************************************
**
** $Id: DisplayFactory.java 831 2006-05-01 00:27:23Z Desruisseaux $
**
** $URL: http://svn.code.sf.net/p/geoapi/code/branches/2.0.x/geoapi/src/main/java/org/opengis/go/display/DisplayFactory.java $
**
** Copyright (C) 2003-2005 Open GIS Consortium, Inc.
** All Rights Reserved. http://www.opengis.org/legal/
**
*************************************************************************************************/
package org.opengis.go.display;
import java.awt.Container;
import java.util.Properties;
import org.opengis.go.display.canvas.Canvas;
import org.opengis.go.display.primitive.Graphic;
import org.opengis.go.display.style.GraphicStyle;
/**
* DisplayFactory defines a common abstraction for creating
* the different kinds of display objects.
*
* @author Open GIS Consortium, Inc.
* @version $Revision: 658 $, $Date: 2006-02-23 12:09:34 +1100 (jeu., 23 févr. 2006) $
*/
public interface DisplayFactory {
/**
* Creates a new Graphic.
* @param implementsGraphic The Class of a Graphic
* primitive interface (such as GraphicArc.class).
* Throws an IllegalArgumentException if the
* implementsGraphic does not match any Graphic
* primitive interface that this factory supports.
* @return the newly created Graphic.
*/
public Graphic createGraphic(Class implementsGraphic);
/**
* Creates a new GraphicStyle. Implementations of
* DisplayFactory are expected to support all four subclasses of GraphicStyle.
* @param implementsGraphicStyle The Class of a GraphicStyle
* interface (such as TextSymbolizer.class).
* Throws an IllegalArgumentException if the
* implementsGraphicStyle does not match any GraphicStyle
* interface.
* @return the newly created GraphicStyle.
*/
public GraphicStyle createGraphicStyle(Class implementsGraphicStyle);
/**
* Returns an object that represents the capabilities of this
* Display factory and its associated canvas.
*/
public DisplayCapabilities getCapabilities();
/**
* Creates a new Canvas object that is embedded in the given
* Container.
*
* If the GO-1 implementation has multiple types of Canvas implementations,
* then the Canvas object that best fits the given Properties
* is the object returned. The criteria for "best fit" are left up to the particular GO-1
* implementation.
*
* The Canvas rendering takes up the full extent of the Container
* display space. It is assumed that the Container will be embedded by a user
* program in another user interface.
*
* @param canvasProperties Properties that can be used to determine
* which Canvas implementation to use.
* @param container the java.awt.Container to place the
* Canvas in.
* @return the newly-created Canvas.
*/
public Canvas createCanvas(Properties canvasProperties, Container container);
/**
* Creates a new Canvas object that is returned embedded in a window, as
* determined by the GO-1 implementation. For example, it could create a new top level
* frame window. The implementor may include all of its standard user interface components.
*
* If the GO-1 implementation has multiple types of Canvas implementations,
* then the Canvas object that best fits the given Properties
* is the object returned. The criteria for "best fit" are left up to the particular GO-1
* implementation.
*
* @param canvasProperties Properties that can be used to determine
* which Canvas implementation to use.
*/
public Canvas createCanvas(Properties canvasProperties);
/**
* Gets an existing Canvas object by UID, or null if no
* Canvas exists for the given UID.
*/
public Canvas getCanvas(String uid);
}
Ads help maintain this website.