public class SubSequenceRenderContext extends Object implements SequenceRenderContext
Use this when implementing SequenceRenderer classes that modify the data that is passed on to delegate renderers e.g. filtering the features, transforming the sequence or moving the rendering co-ordinates.
SequenceRenderContext.BorderLAYOUT, REPAINTBOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST| Constructor and Description |
|---|
SubSequenceRenderContext(SequenceRenderContext src,
SymbolList symbols,
FeatureHolder features,
RangeLocation range) |
SubSequenceRenderContext(SequenceRenderContext src,
SymbolList symbols,
FeatureHolder features,
RangeLocation range,
int symOffset) |
| Modifier and Type | Method and Description |
|---|---|
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
|
SymbolList |
getSymbols()
The SymbolList that is currently rendered by this SequenceRenderContext.
|
SequenceRenderContext.Border |
getTrailingBorder()
Gets the TrailingBorder attribute of the SequenceRenderContext object.
|
int |
graphicsToSequence(double d)
Converts a graphical position into a sequence coordinate.
|
int |
graphicsToSequence(Point2D point)
Converts a graphical position into a sequence coordinate.
|
double |
sequenceToGraphics(int i)
Converts a sequence index into a graphical coordinate.
|
public SubSequenceRenderContext(SequenceRenderContext src, SymbolList symbols, FeatureHolder features, RangeLocation range)
public SubSequenceRenderContext(SequenceRenderContext src, SymbolList symbols, FeatureHolder features, RangeLocation range, int symOffset)
public int getDirection()
SequenceRenderContextgetDirection in interface SequenceRenderContextpublic double getScale()
SequenceRenderContextgetScale in interface SequenceRenderContextpublic double sequenceToGraphics(int i)
SequenceRenderContextsequenceToGraphics in interface SequenceRenderContexti - Index within the sequencepublic int graphicsToSequence(double d)
SequenceRenderContextgraphicsToSequence in interface SequenceRenderContextd - A pixel positionpublic int graphicsToSequence(Point2D point)
SequenceRenderContextgraphicsToSequence in interface SequenceRenderContextpoint - a point representing the positionpublic SymbolList getSymbols()
SequenceRenderContextgetSymbols in interface SequenceRenderContextpublic FeatureHolder getFeatures()
SequenceRenderContextgetFeatures in interface SequenceRenderContextpublic RangeLocation getRange()
SequenceRenderContextgetRange in interface SequenceRenderContextpublic SequenceRenderContext.Border getLeadingBorder()
SequenceRenderContextgetLeadingBorder in interface SequenceRenderContextpublic SequenceRenderContext.Border getTrailingBorder()
SequenceRenderContextgetTrailingBorder in interface SequenceRenderContextpublic Font getFont()
SequenceRenderContextgetFont in interface SequenceRenderContextCopyright © 2014 BioJava. All rights reserved.