|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojava.bio.gui.sequence.SubPairwiseRenderContext
public class SubPairwiseRenderContext
SubPairwiseRenderContext is a rendering context
which wraps a delegate context and effectively hides some of the
delegate's properties with its own. If any of the
SymbolList, FeatureHolder or
RangeLocation arguments are not null, their values are
returned. Otherwise the delegate's method is called and its return
value is returned instead.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.biojava.bio.gui.sequence.SequenceRenderContext |
|---|
SequenceRenderContext.Border |
| Field Summary |
|---|
| Fields inherited from interface org.biojava.bio.gui.sequence.SequenceRenderContext |
|---|
LAYOUT, REPAINT |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Constructor Summary | |
|---|---|
SubPairwiseRenderContext(PairwiseRenderContext context,
SymbolList symbols,
SymbolList secondarySymbols,
FeatureHolder features,
FeatureHolder secondaryFeatures,
RangeLocation range,
RangeLocation secondaryRange)
Creates a new SubPairwiseRenderContext. |
|
| Method Summary | |
|---|---|
int |
getDirection()
Gets the direction in which this context expects sequences to be rendered - HORIZONTAL or VERTICAL. |
FeatureHolder |
getFeatures()
The features to render. |
Font |
getFont()
Gets the Font attribute of the SequenceRenderContext object |
SequenceRenderContext.Border |
getLeadingBorder()
Gets the LeadingBorder attribute of the SequenceRenderContext object. |
RangeLocation |
getRange()
The range of the SymbolList to render. |
double |
getScale()
Gets the scale as pixels per Symbol |
int |
getSecondaryDirection()
getSecondaryDirection returns the direction in
which the secondary sequence is rendered. |
FeatureHolder |
getSecondaryFeatures()
getSecondaryFeatures returns the features on the
secondary sequence. |
RangeLocation |
getSecondaryRange()
getSecondaryRange returns the range of the
secondary sequence currently rendered. |
SymbolList |
getSecondarySymbols()
getSecondarySymbols returns the symbols of the
secondary sequence. |
SymbolList |
getSymbols()
The SymbolList that is currently rendered by this SequenceRenderContext. |
SequenceRenderContext.Border |
getTrailingBorder()
Gets the TrailingBorder attribute of the SequenceRenderContext object. |
int |
graphicsToSecondarySequence(double graphicsPos)
graphicsToSecondarySequence converts a graphical
position to a sequence coordinate on the secondary sequence. |
int |
graphicsToSecondarySequence(Point point)
graphicsToSecondarySequence converts a graphical
position to a secondary sequence index. |
int |
graphicsToSequence(double graphicsPos)
Converts a graphical position into a sequence coordinate. |
int |
graphicsToSequence(Point2D point)
Converts a graphical position into a sequence coordinate. |
double |
secondarySequenceToGraphics(int sequencePos)
secondarySequenceToGraphics converts a sequence
coordinate on the secondary sequence to a graphical position. |
double |
sequenceToGraphics(int sequencePos)
Converts a sequence index into a graphical coordinate. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SubPairwiseRenderContext(PairwiseRenderContext context,
SymbolList symbols,
SymbolList secondarySymbols,
FeatureHolder features,
FeatureHolder secondaryFeatures,
RangeLocation range,
RangeLocation secondaryRange)
SubPairwiseRenderContext.
context - a PairwiseRenderContext to
wrap. This should not be null.symbols - a SymbolList to use instead of the
delegate's. May be null.secondarySymbols - a SymbolList to use
instead of the delegate's. May be null.features - a FeatureHolder to use instead of
the delegate's. May be null.secondaryFeatures - a FeatureHolder to use
instead of the delegate's. May be null.range - a RangeLocation to use instead of the
delegate's. May be null.secondaryRange - a RangeLocation to use
instead of the delegate's. May be null.| Method Detail |
|---|
public SymbolList getSymbols()
SequenceRenderContext
getSymbols in interface SequenceRenderContextpublic SymbolList getSecondarySymbols()
PairwiseRenderContextgetSecondarySymbols returns the symbols of the
secondary sequence.
getSecondarySymbols in interface PairwiseRenderContextSymbolList.public FeatureHolder getFeatures()
SequenceRenderContext
getFeatures in interface SequenceRenderContextpublic FeatureHolder getSecondaryFeatures()
PairwiseRenderContextgetSecondaryFeatures returns the features on the
secondary sequence.
getSecondaryFeatures in interface PairwiseRenderContextFeatureHolder.public RangeLocation getRange()
SequenceRenderContext
getRange in interface SequenceRenderContextpublic RangeLocation getSecondaryRange()
PairwiseRenderContextgetSecondaryRange returns the range of the
secondary sequence currently rendered.
getSecondaryRange in interface PairwiseRenderContextRangeLocation.public int getDirection()
SequenceRenderContext
getDirection in interface SequenceRenderContextpublic int getSecondaryDirection()
PairwiseRenderContextgetSecondaryDirection returns the direction in
which the secondary sequence is rendered. This may be either
HORIZONTAL or VERTICAL.
getSecondaryDirection in interface PairwiseRenderContextint.public double getScale()
SequenceRenderContext
getScale in interface SequenceRenderContextpublic SequenceRenderContext.Border getLeadingBorder()
SequenceRenderContext
getLeadingBorder in interface SequenceRenderContextpublic SequenceRenderContext.Border getTrailingBorder()
SequenceRenderContext
getTrailingBorder in interface SequenceRenderContextpublic double sequenceToGraphics(int sequencePos)
SequenceRenderContext
sequenceToGraphics in interface SequenceRenderContextsequencePos - Index within the sequence
public double secondarySequenceToGraphics(int sequencePos)
PairwiseRenderContextsecondarySequenceToGraphics converts a sequence
coordinate on the secondary sequence to a graphical position.
secondarySequenceToGraphics in interface PairwiseRenderContextsequencePos - an int.
double.public int graphicsToSequence(double graphicsPos)
SequenceRenderContext
graphicsToSequence in interface SequenceRenderContextgraphicsPos - A pixel position
public int graphicsToSequence(Point2D point)
SequenceRenderContext
graphicsToSequence in interface SequenceRenderContextpoint - a point representing the position
public int graphicsToSecondarySequence(double graphicsPos)
PairwiseRenderContextgraphicsToSecondarySequence converts a graphical
position to a sequence coordinate on the secondary sequence.
graphicsToSecondarySequence in interface PairwiseRenderContextgraphicsPos - a double.
int.public int graphicsToSecondarySequence(Point point)
PairwiseRenderContextgraphicsToSecondarySequence converts a graphical
position to a secondary sequence index.
graphicsToSecondarySequence in interface PairwiseRenderContextpoint - a Point.
int.public Font getFont()
SequenceRenderContext
getFont in interface SequenceRenderContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||