uk.ac.man.bioinf.gui.viewer
Class MultiplexerFastAlignmentViewerCellRenderer

java.lang.Object
  |
  +--uk.ac.man.bioinf.gui.viewer.MultiplexerFastAlignmentViewerCellRenderer
All Implemented Interfaces:
EventListener, FastAlignmentViewerCellRenderer, PropertyChangeListener
Direct Known Subclasses:
CursorLessFastAlignmentViewerCellRenderer

public class MultiplexerFastAlignmentViewerCellRenderer
extends Object
implements FastAlignmentViewerCellRenderer, PropertyChangeListener

MultiplexerFastAlignmentViewerCellRenderer.java This multiplexer uses three other cell renderers to render the cell. The reason for this is that as the size of the cell changes, it is necessary to alter what is drawn.

As a result, this renderer listens to the JAlignmentViewer for alterations to the size of the cell.

The big disadvantage to this renderer may prove its downfall - it has to make three function calls to draw the cell at normal size. Created: Fri Sep 15 19:21:54 2000

Version:
$Id: MultiplexerFastAlignmentViewerCellRenderer.java,v 1.6 2001/04/11 17:04:42 lord Exp $
Author:
Julian Selley

Constructor Summary
MultiplexerFastAlignmentViewerCellRenderer(JAlignmentViewer viewer)
           
 
Method Summary
protected  void calculateViableRenderers(int cellSize)
           
 void propertyChange(PropertyChangeEvent pce)
           
 void renderAlignmentViewerCell(Graphics g, int x, int y, int width, int height, JAlignmentViewer viewer, Element element, SequenceAlignmentPoint location, Color color, boolean isSelected, boolean hasFocus, boolean isAtPoint)
          This method renders the cell at the given location in a graphics object, with reference to the JAlignmentViewer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiplexerFastAlignmentViewerCellRenderer

public MultiplexerFastAlignmentViewerCellRenderer(JAlignmentViewer viewer)
Method Detail

calculateViableRenderers

protected void calculateViableRenderers(int cellSize)

renderAlignmentViewerCell

public void renderAlignmentViewerCell(Graphics g,
                                      int x,
                                      int y,
                                      int width,
                                      int height,
                                      JAlignmentViewer viewer,
                                      Element element,
                                      SequenceAlignmentPoint location,
                                      Color color,
                                      boolean isSelected,
                                      boolean hasFocus,
                                      boolean isAtPoint)
Description copied from interface: FastAlignmentViewerCellRenderer
This method renders the cell at the given location in a graphics object, with reference to the JAlignmentViewer. It makes use of certain parameters, such as the color of the element being drawn.

Specified by:
renderAlignmentViewerCell in interface FastAlignmentViewerCellRenderer
Parameters:
g - the graphics object in use
x - the 'x' location in the graphical display
y - the 'y' location in the graphical display
width - the width of the cell
height - the height of the cell
viewer - the JAlignmentViewer object
element - the element being drawn
location - the sequence alignment location of the element
color - the background color of the element
isSelected - whether the element is selected
hasFocus - whether the element has focus
isAtPoint - whether the cursor is at the elements point

propertyChange

public void propertyChange(PropertyChangeEvent pce)
Specified by:
propertyChange in interface PropertyChangeListener