databionics.esom.renderer.foreground
Class ForegroundRenderer

java.lang.Object
  extended by databionics.esom.renderer.foreground.ForegroundRenderer
Direct Known Subclasses:
BestmatchRenderer, ClassmaskRenderer, ColorizeRenderer, FrameRenderer, IslandRenderer, LineRenderer, NamesRenderer

public abstract class ForegroundRenderer
extends java.lang.Object

Base class for all foreground renderers.


Field Summary
protected  java.awt.Color favoriteColor
          the color to choose if none is given
protected  ForegroundTool foregroundTool
          points to the foregroundTool.
static int RENDER_MASK
          Indicates that a Foreground wants to be renderered at the very end.
static int RENDER_POSTTILE
          Indicates that a Foreground wants to be renderered after tiling the image is tiled.
static int RENDER_PRETILE
          Indicates that a Foreground wants to be renderered before the image is tiled.
protected  Renderer renderer
          points on main renderer
 
Constructor Summary
ForegroundRenderer()
          Standard constructor.
 
Method Summary
 java.awt.Color getFavoriteColor()
          Get the favorite Color
 ForegroundTool getForegroundTool()
           
 java.lang.String getName()
          Get the name by removing the "Renderer" from the class name.
 Renderer getRenderer()
          Get the renderer
abstract  int getRndLayer()
          Determines which foreground is renderered first.
abstract  int getRndPosition()
           
 void init()
          Optional initialization of foreground renderer.
abstract  void render(Renderer renderer)
          Add foreground to the Image taken from the given renderer.
 void setFavoriteColor(java.awt.Color color)
          Set the favourite color.
 void setForegroundTool(ForegroundTool foregroundTool)
           
 void setRenderer(Renderer renderer)
          Set the renderer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RENDER_PRETILE

public static final int RENDER_PRETILE
Indicates that a Foreground wants to be renderered before the image is tiled. Colorize and Areas make use of this.

See Also:
Constant Field Values

RENDER_POSTTILE

public static final int RENDER_POSTTILE
Indicates that a Foreground wants to be renderered after tiling the image is tiled. BestmatchRenderer, OpinionRenderer, Highlight, and DataclassRenderer make use of this.

See Also:
Constant Field Values

RENDER_MASK

public static final int RENDER_MASK
Indicates that a Foreground wants to be renderered at the very end. Island and Frame make use of this.

See Also:
Constant Field Values

renderer

protected Renderer renderer
points on main renderer


foregroundTool

protected ForegroundTool foregroundTool
points to the foregroundTool. to be removed


favoriteColor

protected java.awt.Color favoriteColor
the color to choose if none is given

Constructor Detail

ForegroundRenderer

public ForegroundRenderer()
Standard constructor. Sets favoriteColor tho WHITE.

Method Detail

render

public abstract void render(Renderer renderer)
Add foreground to the Image taken from the given renderer.

Parameters:
renderer - The invoking Renderer

init

public void init()
Optional initialization of foreground renderer.


setFavoriteColor

public void setFavoriteColor(java.awt.Color color)
Set the favourite color.

Parameters:
color - The color to set.

getFavoriteColor

public java.awt.Color getFavoriteColor()
Get the favorite Color

Returns:
the favorite color

getForegroundTool

public ForegroundTool getForegroundTool()
Returns:
Returns the foregroundTool.

setForegroundTool

public void setForegroundTool(ForegroundTool foregroundTool)
Parameters:
foregroundTool - The foregroundTool to set.

getRenderer

public Renderer getRenderer()
Get the renderer

Returns:
Returns the renderer.

setRenderer

public void setRenderer(Renderer renderer)
Set the renderer

Parameters:
renderer - The renderer to set.

getRndPosition

public abstract int getRndPosition()

getRndLayer

public abstract int getRndLayer()
Determines which foreground is renderered first. Low numbers will be renderered before high numbers.

Returns:
returns the rendering rank

getName

public java.lang.String getName()
Get the name by removing the "Renderer" from the class name.

Returns:
Returns the foreground name


Copyright © 2005-2006 Databionics Research Group. All Rights Reserved.