apollo.gui.drawable
Class DrawableUtil

java.lang.Object
  extended by apollo.gui.drawable.DrawableUtil

public class DrawableUtil
extends java.lang.Object


Field Summary
protected static org.apache.log4j.Logger logger
           
static java.awt.Color unconventionalPurple
           
 
Constructor Summary
DrawableUtil()
           
 
Method Summary
static Drawable createDrawable(SeqFeatureI sf)
          Creates and returns a DrawableFeatureSet from a FeatureSetI.
static Drawable createGlyph(java.lang.String glyph_name)
          Glyph name may be whole path (apollo.gui.drawable.Zigzag), just the class name(Zigzag)
static java.awt.Rectangle getBoxBounds(java.util.Vector drawables, Transformer transformer, TierManagerI manager)
          This is for creating drag boxes.
static java.awt.Color getFeatureColor(SeqFeatureI feature, FeatureProperty fp)
           
static java.awt.Color getStartCodonColor(FeatureSetI fs)
           
static int getTierYCentrePixel(int tierNum, Transformer transformer, TierManagerI manager)
          Return y value for middle of tier, not feature.
static void setBoxBounds(Drawable dsf, Transformer transformer, TierManagerI manager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.log4j.Logger logger

unconventionalPurple

public static java.awt.Color unconventionalPurple
Constructor Detail

DrawableUtil

public DrawableUtil()
Method Detail

setBoxBounds

public static void setBoxBounds(Drawable dsf,
                                Transformer transformer,
                                TierManagerI manager)

getBoxBounds

public static java.awt.Rectangle getBoxBounds(java.util.Vector drawables,
                                              Transformer transformer,
                                              TierManagerI manager)
This is for creating drag boxes. All the dimensions matter. Returns a union of all the drawables bounds in pixels.


getTierYCentrePixel

public static int getTierYCentrePixel(int tierNum,
                                      Transformer transformer,
                                      TierManagerI manager)
Return y value for middle of tier, not feature. This may not be the middle of the feature. There is one midpoint for the tier, but features of different widths have different middles. Need to use tier midpoint to ensure intron lines collapse to the same line when tier is collapsed


createDrawable

public static Drawable createDrawable(SeqFeatureI sf)
Creates and returns a DrawableFeatureSet from a FeatureSetI. Changed return type from FeatureSetI to DrawableFeatureSet


createGlyph

public static Drawable createGlyph(java.lang.String glyph_name)
Glyph name may be whole path (apollo.gui.drawable.Zigzag), just the class name(Zigzag)


getStartCodonColor

public static java.awt.Color getStartCodonColor(FeatureSetI fs)

getFeatureColor

public static java.awt.Color getFeatureColor(SeqFeatureI feature,
                                             FeatureProperty fp)