databionics.esom.renderer.foreground
Class BestmatchRenderer

java.lang.Object
  extended by databionics.esom.renderer.foreground.ForegroundRenderer
      extended by databionics.esom.renderer.foreground.BestmatchRenderer
Direct Known Subclasses:
ClassBestmatchRenderer, HighlightRenderer, OpinionBestmatch2Renderer, OpinionBestmatchRenderer

public class BestmatchRenderer
extends ForegroundRenderer

Best match foreground renderer.


Field Summary
protected  int bmSize
          size of bestmatch
protected  boolean circle
          draw circles instead of rectangles
protected  java.awt.Graphics g
          graphic to draw on
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
BestmatchRenderer()
          Standard constructor
 
Method Summary
protected  void drawBestmatch(int x, int y, int sizex, int sizey, int index, Renderer renderer)
          Draws the bestmatch
 int getBmSize()
          Get the bestmatch size
protected  java.awt.Color getColor(int index)
          Get the color for this bestmatch.
 int getRndLayer()
          Rank of this foreground
 int getRndPosition()
           
protected  boolean isBold(int index)
          Get the bold flag for this bestmatch.
 boolean isCircle()
           
 void render(Renderer renderer)
          Draw colored square for each best match
 void setBmSize(int bmSize)
          Set the bestmatch size.
 void setCircle(boolean circle)
           
 
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


bmSize

protected int bmSize
size of bestmatch


circle

protected boolean circle
draw circles instead of rectangles

Constructor Detail

BestmatchRenderer

public BestmatchRenderer()
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

isBold

protected boolean isBold(int index)
Get the bold flag for this bestmatch.

Parameters:
index - of bestmatch
Returns:
false, to be overridden in subclasses

drawBestmatch

protected void drawBestmatch(int x,
                             int y,
                             int sizex,
                             int sizey,
                             int index,
                             Renderer renderer)
Draws the bestmatch

Parameters:
x - x-coordinate
y - y-coordinate
sizex - size in x direction
sizey - size in y-direction
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:
12

getRndPosition

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

getBmSize

public int getBmSize()
Get the bestmatch size

Returns:
bm size

setBmSize

public void setBmSize(int bmSize)
Set the bestmatch size.

Parameters:
bmSize - The bmSize to set.

isCircle

public boolean isCircle()
Returns:
Returns the circle.

setCircle

public void setCircle(boolean circle)
Parameters:
circle - The circle to set.


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