apollo.gui.drawable
Class SiteCodon

java.lang.Object
  extended by apollo.gui.drawable.DrawableSeqFeature
      extended by apollo.gui.drawable.SiteCodon
All Implemented Interfaces:
Drawable, SelectableI

public class SiteCodon
extends DrawableSeqFeature

SiteCodon is a class to accomodate the optimizations in SiteView and Sites. SiteView no longer uses to do its drawing. But it needs to send DrawableSeqFeatures for the findFeaturesForSelection method. And it needs to be aware of the selection of the DrawableSeqFeatures that it sends out but does not draw. SiteCodon is a DrawableSeqFeature used by Sites that never gets drawn but notifies its Sites object of any selections it receives. This class will also probably be needed to deal with dragging which is currently not implemented with the SiteView optimizations. I didnt call it DrawableSiteCodon because it is not meant to be drawn. And i dont think it needs to extend DrawableTerminalCodon Should see if its possible to also not subclass DrawableSeqFeature


Field Summary
 
Fields inherited from class apollo.gui.drawable.DrawableSeqFeature
boxBounds, DECORATED, draw_level, drawable_parent, feature, flags, HIGHLIGHTED, is_drawn, LABELED, LEFTEDGE, logger, RIGHTEDGE, SELECTED, VISIBLE
 
Constructor Summary
SiteCodon()
          This is for dragging.
SiteCodon(SeqFeature feature, Sites sites)
          SiteCodon created for selection.
 
Method Summary
 void setSelected(boolean state)
          Pass selection state onto Sites If this is being set to false then it no longer needs to exist
 
Methods inherited from class apollo.gui.drawable.DrawableSeqFeature
accept, addDecorations, addHighlights, contains, deleteDrawable, draw, draw, drawMissing, drawSelected, drawStartAndStopCodons, drawUnselected, feature_draw, findDrawable, fontColorForBackground, getBoxBounds, getCharY, getCodonX, getDisplayLabel, getDrawableColor, getDrawLevel, getEnd, getFeature, getFeatureProperty, getFeatureType, getHigh, getLeft, getLeftmostVisible, getLow, getName, getRefDrawable, getRight, getSize, getStart, getStrand, getTierIndex, getType, getYCentre, getYSpace, intersects, isDecorated, isDrawn, isForwardStrand, isHighlighted, isLabeled, isLeftEdge, isRightEdge, isSelected, isVisible, sameFeature, setBoxBounds, setDrawLevel, setDrawn, setEdgeHighlights, setFeature, setHighlighted, setLabeled, setLabeled, setRefDrawable, setTierIndex, setVisible, synchFeatureProperty, wantToDraw
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SiteCodon

public SiteCodon(SeqFeature feature,
                 Sites sites)
SiteCodon created for selection.


SiteCodon

public SiteCodon()
This is for dragging. SiteView.selectionToSiteCodon (used by createDragView) creates a DrawableFeatureSet and DrawableFeatureSet creates SiteCodons with an empty constructor. Without Sites there can be no selection, but codons being dragged do not get selected so its ok.

Method Detail

setSelected

public void setSelected(boolean state)
Pass selection state onto Sites If this is being set to false then it no longer needs to exist

Specified by:
setSelected in interface SelectableI
Overrides:
setSelected in class DrawableSeqFeature