databionics.esom.renderer.foreground
Class LineRenderer

java.lang.Object
  extended by databionics.esom.renderer.foreground.ForegroundRenderer
      extended by databionics.esom.renderer.foreground.LineRenderer

public class LineRenderer
extends ForegroundRenderer

Line connecting bestmatches.


Field Summary
protected  java.awt.Graphics g
          graphic to draw on
protected  int lineSize
          size of bestmatch
protected static org.apache.log4j.Logger log
          interface to log4j system
 
Fields inherited from class databionics.esom.renderer.foreground.ForegroundRenderer
favoriteColor, foregroundTool, RENDER_MASK, RENDER_POSTTILE, RENDER_PRETILE, renderer
 
Constructor Summary
LineRenderer()
          Standard constructor
 
Method Summary
protected  void drawBestmatch(int x1, int y1, int x2, int y2, int index, Renderer renderer)
          Draws the bestmatch
protected  java.awt.Color getColor(int index)
          Get the color for this bestmatch.
 int getLineSize()
          Get the bestmatch size
 int getRndLayer()
          Rank of this foreground
 int getRndPosition()
           
 void render(Renderer renderer)
          Draw colored square for each best match
 void setLineSize(int lineSize)
          Set the bestmatch size.
 
Methods inherited from class databionics.esom.renderer.foreground.ForegroundRenderer
getFavoriteColor, getForegroundTool, getName, getRenderer, init, setFavoriteColor, setForegroundTool, setRenderer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.log4j.Logger log
interface to log4j system


g

protected java.awt.Graphics g
graphic to draw on


lineSize

protected int lineSize
size of bestmatch

Constructor Detail

LineRenderer

public LineRenderer()
Standard constructor

Method Detail

getColor

protected java.awt.Color getColor(int index)
Get the color for this bestmatch.

Parameters:
index - of bestmatch
Returns:
favorite color, can be overridden in subclasses

drawBestmatch

protected void drawBestmatch(int x1,
                             int y1,
                             int x2,
                             int y2,
                             int index,
                             Renderer renderer)
Draws the bestmatch

Parameters:
x1 - x-coordinate
y1 - y-coordinate
x2 - x-coordinate
y2 - y-coordinate
index - index of Bestmatch
renderer - the Renderer

render

public void render(Renderer renderer)
Draw colored square for each best match

Specified by:
render in class ForegroundRenderer
Parameters:
renderer - The invoking Renderer

getRndLayer

public int getRndLayer()
Rank of this foreground

Specified by:
getRndLayer in class ForegroundRenderer
Returns:
10

getRndPosition

public int getRndPosition()
Specified by:
getRndPosition in class ForegroundRenderer

getLineSize

public int getLineSize()
Get the bestmatch size

Returns:
bm size

setLineSize

public void setLineSize(int lineSize)
Set the bestmatch size.

Parameters:
lineSize - The lineSize to set.


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