org.opengis.go.display.canvas
Interface Canvas

All Known Subinterfaces:
Map2D, WebCanvas, WebMap2D

Deprecated. Splitted to org.opengis.display.canvas and to org.opengis.display.renderer.

@Deprecated
public interface Canvas

Canvas defines a common abstraction for implementations that manage the display and user manipulation of Graphic instances. A Canvas with an XY (Cartesian) display field should support the following properties:


Method Summary
 Graphic add(Graphic graphic)
          Deprecated. Replaced by org.opengis.display.renderer.Renderer#graphics.
 Graphic addAsEditable(Graphic graphic)
          Deprecated. No direct repacement.
 void addCanvasListener(CanvasListener listener)
          Deprecated. Moved to org.opengis.display.canvas.canvas#addCanvasListener.
 void addEventManager(EventManager eventManager)
          Deprecated. Adds the EventManager subinterface if it not currently in the Canvas's collection of EventManagers.
 void dispose()
          Deprecated. Replaced by org.opengis.display.renderer.Renderer#dispose.
 void disposeEventManagers()
          Deprecated. Method that may be called when the EventManagers of a Canvas are no longer needed.
 void enableCanvasHandler(CanvasHandler handler)
          Deprecated. Replaced by org.opengis.display.canvas.canvas#getController.
 EventManager findEventManager(Class eventManagerClass)
          Deprecated. Returns the EventManager subinterface, based on the class type.
 CanvasHandler getActiveCanvasHandler()
          Deprecated. Replaced by getController. A side effect is to suppress one level of indirection.
 CoordinateReferenceSystem getDisplayCoordinateReferenceSystem()
          Deprecated. Moved to CanvasState.getDisplayCRS().
 MathTransform getDisplayToObjectiveTransform()
          Deprecated. Moved to CanvasState.getDisplayToObjectiveTransform().
 DisplayFactory getFactory()
          Deprecated. Returns the DisplayFactory associated with this Canvas.
 Graphic[] getGraphicsAt(DirectPosition directPosition)
          Deprecated. Returns the Graphics that occupy the given DirectPosition.
 Graphic[] getGraphicsIn(Envelope bounds)
          Deprecated. Returns the Graphics that occupy the given Envelope.
 Object getImplHint(String hintName)
          Deprecated. Moved to Canvas.getRenderingHint(java.awt.RenderingHints.Key).
 CoordinateReferenceSystem getObjectiveCoordinateReferenceSystem()
          Deprecated. Moved to CanvasState.getObjectiveCRS().
 MathTransform getObjectiveToDisplayTransform()
          Deprecated. Moved to CanvasState.getObjectiveToDisplayTransform().
 CanvasState getState()
          Deprecated. Moved to Canvas.getState().
 String getTitle()
          Deprecated. Moved to CanvasState.getTitle().
 Graphic getTopGraphicAt(DirectPosition directPosition)
          Deprecated. Returns the top-most Graphic that occupies given DirectPosition.
 String getUID()
          Deprecated. No replacement.
 boolean isVisible(DirectPosition coordinate)
          Deprecated. Moved to Canvas.isVisible(org.opengis.geometry.DirectPosition).
 void remove(Graphic graphic)
          Deprecated. Replaced by org.opengis.display.renderer.Renderer#graphics.
 void removeCanvasHandler(CanvasHandler handler)
          Deprecated. Replaced by org.opengis.display.canvas.canvas#getController.
 void removeCanvasListener(CanvasListener listener)
          Deprecated. Moved to org.opengis.display.canvas.canvas#removeCanvasListener.
 void setImplHint(String hintName, Object hint)
          Deprecated. Moved to Canvas.setRenderingHint(java.awt.RenderingHints.Key, java.lang.Object).
 void setObjectiveCoordinateReferenceSystem(CoordinateReferenceSystem crs)
          Deprecated. Moved to org.opengis.display.canvas.CanvasSController#setObjectiveCRS.
 void setObjectiveCoordinateReferenceSystem(CoordinateReferenceSystem crs, MathTransform objectiveToDisplay, MathTransform displayToObjective)
          Deprecated. No replacement.
 void setTitle(String title)
          Deprecated. Moved to CanvasController.setTitle(org.opengis.util.InternationalString).
 

Method Detail

dispose

@Deprecated
void dispose()
Deprecated. Replaced by org.opengis.display.renderer.Renderer#dispose.

Method that may be called when a Canvas is no longer needed. Implementations may use this method to release resources or to return the object to an object pool. It is an error to reference a Canvas after its dispose method has been called.


disposeEventManagers

void disposeEventManagers()
Deprecated. 
Method that may be called when the EventManagers of a Canvas are no longer needed. Implementations may use this method to release resources or to return the object to an object pool. It is an error to reference any EventManager s of a Canvas after this method has been called.


getUID

@Deprecated
String getUID()
Deprecated. No replacement.

Returns the unique identifier of this Canvas, which is assigned by the implementation. The UID is immutable and may be used to retrieve a particular Canvas from the GraphicFactory.

Returns:
the UID of this Canvas.

setTitle

@Deprecated
void setTitle(String title)
Deprecated. Moved to CanvasController.setTitle(org.opengis.util.InternationalString).

Sets the title of this Canvas. The title of a Canvas may or may not be displayed on the titlebar of an application's window.

Parameters:
title - the new title for this Canvas.

getTitle

@Deprecated
String getTitle()
Deprecated. Moved to CanvasState.getTitle().

Returns the title assigned to this Canvas.

Returns:
the title of this Canvas.

getFactory

DisplayFactory getFactory()
Deprecated. 
Returns the DisplayFactory associated with this Canvas.

Returns:
the DisplayFactory.

getState

@Deprecated
CanvasState getState()
Deprecated. Moved to Canvas.getState().

Returns a copy of the current state of this Canvas. The object returned will implement CanvasState or one of its subinterfaces, depending on the type of Canvas.


isVisible

@Deprecated
boolean isVisible(DirectPosition coordinate)
Deprecated. Moved to Canvas.isVisible(org.opengis.geometry.DirectPosition).

Returns true if the given coordinate is visible on this Canvas.


add

@Deprecated
Graphic add(Graphic graphic)
Deprecated. Replaced by org.opengis.display.renderer.Renderer#graphics.

Adds the given Graphic to this Canvas. Implementations should respect the zOrder retrieved by calling Graphic.getGraphicStyle().getZOrderHint(). When two added Graphics have the same zOrder, the most recently added one should be on top.

Parameters:
graphic - the Graphic to add.

addAsEditable

@Deprecated
Graphic addAsEditable(Graphic graphic)
Deprecated. No direct repacement.

Adds the given Graphic to this Canvas, immediately placing the Graphic in an editing/drawing mode, as defined by the Canvas implementation. A Graphic added as editable may or may not be visible when it is added, as it may wait for user input to define the Graphic's values through mouse gestures or key input.

Parameters:
graphic - the Graphic to add as editable.

remove

@Deprecated
void remove(Graphic graphic)
Deprecated. Replaced by org.opengis.display.renderer.Renderer#graphics.

Removes the given Graphic from this Canvas.

Parameters:
graphic - the Graphic to remove.

findEventManager

EventManager findEventManager(Class eventManagerClass)
Deprecated. 
Returns the EventManager subinterface, based on the class type.

Note: While the class implementing Canvas may additionally implement EventManager subinterface(s). While this design is simple, it limits the Canvas object to the input mechanisms supported by to those particular EventManager subinterface(s), and thus is discouraged.

If the class implementing Canvas does not implement the particular EventManager subinterface, then this method can look up the EventManager via an implementation-specific mechanism. Otherwise, if the class implementing Canvas does implement the particular EventManager subinterface, this method can return the this reference.

Parameters:
eventManagerClass - the class type of the EventManager subinterface.
Returns:
a class that implements the requested EventManager subinterface, or null if there is no implementing class.

addEventManager

void addEventManager(EventManager eventManager)
Deprecated. 
Adds the EventManager subinterface if it not currently in the Canvas's collection of EventManagers.

Parameters:
eventManager - the EventManager type to be added to the Canvas's collection.

getTopGraphicAt

Graphic getTopGraphicAt(DirectPosition directPosition)
Deprecated. 
Returns the top-most Graphic that occupies given DirectPosition. The top-most Graphic will have the highest zOrder.

Parameters:
directPosition - the DirectPosition at which to look for Graphics.
Returns:
the top-most Graphic at the given DirectPosition.

getGraphicsAt

Graphic[] getGraphicsAt(DirectPosition directPosition)
Deprecated. 
Returns the Graphics that occupy the given DirectPosition. The order is implementation-specific.

Parameters:
directPosition - the DirectPosition at which to look for Graphics.
Returns:
the array of Graphics at the given DirectPosition.

getGraphicsIn

Graphic[] getGraphicsIn(Envelope bounds)
Deprecated. 
Returns the Graphics that occupy the given Envelope. The order is implementation-specific.

Parameters:
bounds - the Envelope in which to look for Graphics.
Returns:
the array of Graphics in the given Envelope.

addCanvasListener

@Deprecated
void addCanvasListener(CanvasListener listener)
Deprecated. Moved to org.opengis.display.canvas.canvas#addCanvasListener.

Adds the given listener that will be notified when the state of this Canvas has changed.


removeCanvasListener

@Deprecated
void removeCanvasListener(CanvasListener listener)
Deprecated. Moved to org.opengis.display.canvas.canvas#removeCanvasListener.

Removes the given listener.


enableCanvasHandler

@Deprecated
void enableCanvasHandler(CanvasHandler handler)
Deprecated. Replaced by org.opengis.display.canvas.canvas#getController.

Enables the given CanvasHandler, removing the current handler (if any). The new handler's handlerEnabled(CanvasController) method is called, passing in a new, active CanvasController that will allow the programmer to modify the Canvas's properties.

Implementation suggestion:



 public void enableCanvasHandler(CanvasHandler handler) {
      if (handler != activeHandler) {
          if (activeHandler != null) {
              removeCanvasHandler(activeHandler);
          }
          activeHandler = handler;
          activeController = new CanvasController(this);
          activeHandler.handlerEnabled(activeController);
      }
  }
 


removeCanvasHandler

@Deprecated
void removeCanvasHandler(CanvasHandler handler)
Deprecated. Replaced by org.opengis.display.canvas.canvas#getController.

Removes the given CanvasHandler from this Canvas.


getActiveCanvasHandler

@Deprecated
CanvasHandler getActiveCanvasHandler()
Deprecated. Replaced by getController. A side effect is to suppress one level of indirection.

Returns the currently active CanvasHandler or null if no handler is active.


setImplHint

@Deprecated
void setImplHint(String hintName,
                            Object hint)
Deprecated. Moved to Canvas.setRenderingHint(java.awt.RenderingHints.Key, java.lang.Object).

Sets a rendering hint for implementation or platform specific rendering information.

Parameters:
hintName - the name of the hint.
hint - the rendering hint.

getImplHint

@Deprecated
Object getImplHint(String hintName)
Deprecated. Moved to Canvas.getRenderingHint(java.awt.RenderingHints.Key).

Returns the rendering hint associated with the hint name.

Parameters:
hintName - the name of the hint.
Returns:
the rendering hint.

getDisplayCoordinateReferenceSystem

@Deprecated
CoordinateReferenceSystem getDisplayCoordinateReferenceSystem()
Deprecated. Moved to CanvasState.getDisplayCRS().

Returns the Coordinate Reference System associated with the display of this Canvas. The display Coordinate Reference System corresponds to the geometry of the display device (e.g. video monitor = Cartesian, planetarium = Spherical).

Returns:
the display Coordinate Reference System

getObjectiveCoordinateReferenceSystem

@Deprecated
CoordinateReferenceSystem getObjectiveCoordinateReferenceSystem()
Deprecated. Moved to CanvasState.getObjectiveCRS().

Returns the objective Coordinate Reference System (e.g. the projection of a georeferenced Coordinate Reference System) for this Canvas. This is the default objective Coordinate Reference System for this Canvas.

Returns:
the objective Coordinate Reference System

setObjectiveCoordinateReferenceSystem

@Deprecated
void setObjectiveCoordinateReferenceSystem(CoordinateReferenceSystem crs)
Deprecated. Moved to org.opengis.display.canvas.CanvasSController#setObjectiveCRS.

Sets the objective Coordinate Reference System (e.g. the projection of a georeferenced Coordinate Reference System) for this Canvas. This is the default objective Coordinate Reference System for this Canvas.

Parameters:
crs - the objective Coordinate Reference System
Throws:
IncompatibleOperationException - when the specified transformation does not apply to either the objective or the display Coordinate Reference Systems.

setObjectiveCoordinateReferenceSystem

@Deprecated
void setObjectiveCoordinateReferenceSystem(CoordinateReferenceSystem crs,
                                                      MathTransform objectiveToDisplay,
                                                      MathTransform displayToObjective)
                                           throws IncompatibleOperationException
Deprecated. No replacement.

Sets the objective Coordinate Reference System (e.g. the projection of a georeferenced Coordinate Reference System) for this Canvas. This is the default objective Coordinate Reference System for this Canvas.

Parameters:
crs - the objective Coordinate Reference System
objectiveToDisplay - the trasformation that converts between this objective Coordinate Reference System and the Canvas display Coordinate Reference System.
displayToObjective - the trasformation that converts between the Canvas display Coordinate Reference System and this objective Coordinate Reference System.
Throws:
IncompatibleOperationException - when the specified transformation does not apply to either the objective or the display Coordinate Reference Systems.

getObjectiveToDisplayTransform

@Deprecated
MathTransform getObjectiveToDisplayTransform()
Deprecated. Moved to CanvasState.getObjectiveToDisplayTransform().

Returns the coordinate transformation object for this Canvas. This allows the Canvas to resolve conversions of coordinates between the objective and display Coordinate Reference Systems.

Returns:
the coordinate transformation object

getDisplayToObjectiveTransform

@Deprecated
MathTransform getDisplayToObjectiveTransform()
Deprecated. Moved to CanvasState.getDisplayToObjectiveTransform().

Returns the coordinate transformation object for this Canvas. This allows the Canvas to resolve conversions of coordinates between the display and objective Coordinate Reference Systems.

Returns:
the coordinate transformation object


Copyright © 1994-2009 Open Geospatial Consortium. All Rights Reserved.