org.opengis.display.canvas
Interface Canvas

Show UML class diagram

public interface Canvas

Defines a common abstraction for implementations that manage the display. Canvas can be extended for cartesian display or any kind. A Canvas with an XY (Cartesian) display field should support the following properties:

Since:
GeoAPI 2.2

Method Summary
 void addCanvasListener(CanvasListener listener)
          Adds the given listener that will be notified when the state of this Canvas has changed.
 CanvasController getController()
          Returns the controller that allows the programmer to modify the Canvas's properties.
 Object getRenderingHint(RenderingHints.Key hintKey)
          Returns the rendering hint associated with the hint name.
 CanvasState getState()
          Returns a copy of the current state of this Canvas.
 boolean isVisible(DirectPosition coordinate)
          Returns true if the given coordinate is visible on this Canvas.
 void removeCanvasListener(CanvasListener listener)
          Removes the given listener.
 void setRenderingHint(RenderingHints.Key hintKey, Object hint)
          Sets a rendering hint for implementation or platform specific rendering information.
 

Method Detail

getState

CanvasState 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.

Returns:
A snapshot of current canvas state.

isVisible

boolean isVisible(DirectPosition coordinate)
Returns true if the given coordinate is visible on this Canvas.

Parameters:
coordinate - The coordinate to test for visibility.
Returns:
true if the given coordinate is visible on this canvas.

getController

CanvasController getController()
Returns the controller that allows the programmer to modify the Canvas's properties.

Returns:
The controller for this canvas.

setRenderingHint

void setRenderingHint(RenderingHints.Key hintKey,
                      Object hint)
Sets a rendering hint for implementation or platform specific rendering information.

Parameters:
hintKey - The key of the hint.
hint - The rendering hint.

getRenderingHint

Object getRenderingHint(RenderingHints.Key hintKey)
Returns the rendering hint associated with the hint name.

Parameters:
hintKey - The key of the hint.
Returns:
The rendering hint.

addCanvasListener

void addCanvasListener(CanvasListener listener)
Adds the given listener that will be notified when the state of this Canvas has changed.

Parameters:
listener - The listener to add.

removeCanvasListener

void removeCanvasListener(CanvasListener listener)
Removes the given listener.

Parameters:
listener - The listener to remove.


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