decorator

Identifier:
net.refractions.udig.project.decorator

Since:
[Enter the first release in which this extension point appears.]

Description:

A Decorator is a adds meaning to a map or page. The Decorator interface that a decorator extension must extend consists of a draw() method and a setToolkit() method. The toolkit passed in provides context for the decorator. For example, a scalebar requires a viewport model and the ability to calculate the extent of a map; the toolkit provides access to that data. The toolkit the decorator receives is a read only toolkit. A decorator is not permitted to change UDIG model information. It can only display information.

Configuration Markup:

<!ELEMENT extension (decorator+)>

<!ATTLIST extension

point CDATA #REQUIRED>

A Decorator is a renderer that renders a purely fabricated Layer. It is not backed by any "real" data. Examples could include layers of gridlines, a scalebar, a legend, etc...



<!ELEMENT decorator EMPTY>

<!ATTLIST decorator

icon  CDATA #IMPLIED

name  CDATA #REQUIRED

id    CDATA #IMPLIED

class CDATA #REQUIRED>


Examples:

public class ImageDecorator implements Decorator {
  RenderedImage image;
  private Toolkit toolkit;
  public void draw( ViewportGraphics graphics ) {
   graphics.drawImage(image, 0,0 );
 }
 public void setToolkit( Toolkit toolkit ) {
  this.toolkit=toolkit;
 }
}

Supplied Implementation:
[Enter information about supplied implementation of this extension point.]