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
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 |
MultiplexerFastAlignmentViewerCellRenderer
public MultiplexerFastAlignmentViewerCellRenderer(JAlignmentViewer viewer)
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 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 elementcolor
- the background color of the elementisSelected
- whether the element is selectedhasFocus
- whether the element has focusisAtPoint
- whether the cursor is at the elements point
propertyChange
public void propertyChange(PropertyChangeEvent pce)
- Specified by:
propertyChange
in interface PropertyChangeListener