uk.ac.man.bioinf.gui.viewer
Interface FastAlignmentViewerCellRenderer
- All Known Implementing Classes:
- BorderFastAlignmentViewerCellRenderer, ColorFastAlignmentViewerCellRenderer, DefaultFastAlignmentViewerCellRenderer, MultiplexerFastAlignmentViewerCellRenderer, TextFastAlignmentViewerCellRenderer
- public interface FastAlignmentViewerCellRenderer
FastAlignmentViewerCellRenderer.java
Although the JAlignmentViewer provides a pluggable renderer
architecture with the AlignmentViewerCellRenderer it has been found
that this has a fairly disasterous effect on performance of the
viewer particularly with respect to scrolling, due to the large
number of method calls and events to render a cell. This class
circumvents all of that, and still provides a degree of
plugability. The disadvantage of using this class is that its much
lower level. You have to do all of the drawing directly onto the
Graphics context provided, and you can not just simply extend a JComponent.
This interface is the same as for the AlignmentViewerCellRenderer
with the additional information that is required, which is the
graphics context, where to draw on it, and the size to draw.
Created: Mon Apr 17 20:03:52 2000
- Version:
- $Id: FastAlignmentViewerCellRenderer.java,v 1.4 2001/04/11 17:04:42 lord Exp $
- Author:
- Phillip Lord
Method Summary |
void |
renderAlignmentViewerCell(Graphics g,
int x,
int y,
int width,
int height,
JAlignmentViewer viewer,
Element element,
SequenceAlignmentPoint location,
Color bgColor,
boolean isSelected,
boolean hasFocus,
boolean isAtPoint)
This method renders the cell at the given location in a graphics
object, with reference to the JAlignmentViewer. |
renderAlignmentViewerCell
public void renderAlignmentViewerCell(Graphics g,
int x,
int y,
int width,
int height,
JAlignmentViewer viewer,
Element element,
SequenceAlignmentPoint location,
Color bgColor,
boolean isSelected,
boolean hasFocus,
boolean isAtPoint)
- 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.
- Parameters:
g
- the graphics object in usex
- the 'x' location in the graphical displayy
- the 'y' location in the graphical displaywidth
- the width of the cellheight
- the height of the cellviewer
- the JAlignmentViewer objectelement
- the element being drawnlocation
- the sequence alignment location of the elementbgColor
- the background color of the elementisSelected
- whether the element is selectedhasFocus
- whether the element has focusisAtPoint
- whether the cursor is at the elements point