apollo.gui.drawable
Class Triangle

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

public class Triangle
extends DrawableSeqFeature

A glyph that draws a solid bar with a triangle at the top or bottom. This might be useful for showing transposon insertions, for example. Renamed from DrawableInsertion to Triangle in order to be more descriptive of what is actually drawn


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
Triangle()
          constructs a glyph with the triangle at the top pointing in the direction of the insertion.
Triangle(SeqFeatureI feature)
           
 
Method Summary
 void addHighlights(java.awt.Graphics g, java.awt.Rectangle boxBounds, Transformer transformer, TierManagerI manager)
          highlights edges and box around if isHighlighted
 void drawSelected(java.awt.Graphics g, java.awt.Rectangle boxBounds, Transformer transformer, TierManagerI manager)
           
protected  void drawSite(java.awt.Graphics g, java.awt.Rectangle boxBounds, Transformer transformer, TierManagerI manager)
           
 void drawUnselected(java.awt.Graphics g, java.awt.Rectangle boxBounds, Transformer transformer, TierManagerI manager)
           
 void setFeature(SeqFeatureI feature)
          Part of Drawable interface.
 
Methods inherited from class apollo.gui.drawable.DrawableSeqFeature
accept, addDecorations, contains, deleteDrawable, draw, draw, drawMissing, drawStartAndStopCodons, 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, setHighlighted, setLabeled, setLabeled, setRefDrawable, setSelected, setTierIndex, setVisible, synchFeatureProperty, wantToDraw
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Triangle

public Triangle()
constructs a glyph with the triangle at the top pointing in the direction of the insertion. when selected a 1 pixel line is draw down to the insertion site the triangle is filled with gray and outlined in black, and the bar is black.


Triangle

public Triangle(SeqFeatureI feature)
Method Detail

setFeature

public void setFeature(SeqFeatureI feature)
Description copied from class: DrawableSeqFeature
Part of Drawable interface. Currently only called from constructor and DrawableFeatureSet. Is there a scenario where we would publicly change the model of a drawable? It seems like a drawable reason for being comes out of a model object, and ya probably arent going to slip in a new model to a drawable. so im wondering if this needs to be part of drawable interface and perhaps this method should be protected? Subclasses overriding setFeature should call super.setFeature to get featureProperty set

Specified by:
setFeature in interface Drawable
Overrides:
setFeature in class DrawableSeqFeature

drawSelected

public void drawSelected(java.awt.Graphics g,
                         java.awt.Rectangle boxBounds,
                         Transformer transformer,
                         TierManagerI manager)
Overrides:
drawSelected in class DrawableSeqFeature

drawUnselected

public void drawUnselected(java.awt.Graphics g,
                           java.awt.Rectangle boxBounds,
                           Transformer transformer,
                           TierManagerI manager)
Overrides:
drawUnselected in class DrawableSeqFeature

addHighlights

public void addHighlights(java.awt.Graphics g,
                          java.awt.Rectangle boxBounds,
                          Transformer transformer,
                          TierManagerI manager)
Description copied from class: DrawableSeqFeature
highlights edges and box around if isHighlighted

Overrides:
addHighlights in class DrawableSeqFeature

drawSite

protected void drawSite(java.awt.Graphics g,
                        java.awt.Rectangle boxBounds,
                        Transformer transformer,
                        TierManagerI manager)