org::gel::mauve::color::NormalizedOffsetColorScheme Class Reference

Colors the matches based on their generalized offsets using the entire color spectrum evenly. More...

Inheritance diagram for org::gel::mauve::color::NormalizedOffsetColorScheme:

Inheritance graph
[legend]
Collaboration diagram for org::gel::mauve::color::NormalizedOffsetColorScheme:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void apply (BaseViewerModel model)
String toString ()

Private Member Functions

Vector getMatchesByOffset (BaseViewerModel model)

Private Attributes

Vector matchesByOffset
long uniqueOffsetCount

Static Private Attributes

final Comparator MATCH_OFFSET_COMPARATOR

Detailed Description

Colors the matches based on their generalized offsets using the entire color spectrum evenly.

Uses a very simple linear mapping approach for now. It can be tricked up later.

Definition at line 16 of file NormalizedOffsetColorScheme.java.


Member Function Documentation

void org::gel::mauve::color::NormalizedOffsetColorScheme::apply BaseViewerModel  model  )  [inline]
 

Parameters:
model Apply the color scheme to the elements of the model. At a minimum, the matches of the model must be assigned colors.

Implements org::gel::mauve::ColorScheme.

Definition at line 29 of file NormalizedOffsetColorScheme.java.

References org::gel::mauve::Match::color, org::gel::mauve::BaseViewerModel::getMatchCount(), getMatchesByOffset(), matchesByOffset, and uniqueOffsetCount.

Vector org::gel::mauve::color::NormalizedOffsetColorScheme::getMatchesByOffset BaseViewerModel  model  )  [inline, private]
 

Returns:
Returns the list of the matches sorted by their generalized offset.

Definition at line 58 of file NormalizedOffsetColorScheme.java.

References MATCH_OFFSET_COMPARATOR, matchesByOffset, org::gel::mauve::BaseViewerModel::sortedMatches(), and uniqueOffsetCount.

Referenced by apply().

String org::gel::mauve::color::NormalizedOffsetColorScheme::toString  )  [inline]
 

Definition at line 79 of file NormalizedOffsetColorScheme.java.


Member Data Documentation

final Comparator org::gel::mauve::color::NormalizedOffsetColorScheme::MATCH_OFFSET_COMPARATOR [static, private]
 

Initial value:

 new Comparator () {
                public int compare (Object o1, Object o2) {
                        Match a = (Match) o1;
                        Match b = (Match) o2;
                        return (int) (a.offset () - b.offset ());
                }
        }

Definition at line 17 of file NormalizedOffsetColorScheme.java.

Referenced by getMatchesByOffset().

Vector org::gel::mauve::color::NormalizedOffsetColorScheme::matchesByOffset [private]
 

Definition at line 25 of file NormalizedOffsetColorScheme.java.

Referenced by apply(), and getMatchesByOffset().

long org::gel::mauve::color::NormalizedOffsetColorScheme::uniqueOffsetCount [private]
 

Definition at line 27 of file NormalizedOffsetColorScheme.java.

Referenced by apply(), and getMatchesByOffset().


The documentation for this class was generated from the following file:
Generated on Mon Aug 19 06:03:52 2013 for Mauve by doxygen 1.3.6