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.Border
LAYOUT, REPAINT
BOTTOM, 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()
SequenceRenderContext
getDirection
in interface SequenceRenderContext
public double getScale()
SequenceRenderContext
getScale
in interface SequenceRenderContext
public double sequenceToGraphics(int i)
SequenceRenderContext
sequenceToGraphics
in interface SequenceRenderContext
i
- Index within the sequencepublic int graphicsToSequence(double d)
SequenceRenderContext
graphicsToSequence
in interface SequenceRenderContext
d
- A pixel positionpublic int graphicsToSequence(Point2D point)
SequenceRenderContext
graphicsToSequence
in interface SequenceRenderContext
point
- a point representing the positionpublic SymbolList getSymbols()
SequenceRenderContext
getSymbols
in interface SequenceRenderContext
public FeatureHolder getFeatures()
SequenceRenderContext
getFeatures
in interface SequenceRenderContext
public RangeLocation getRange()
SequenceRenderContext
getRange
in interface SequenceRenderContext
public SequenceRenderContext.Border getLeadingBorder()
SequenceRenderContext
getLeadingBorder
in interface SequenceRenderContext
public SequenceRenderContext.Border getTrailingBorder()
SequenceRenderContext
getTrailingBorder
in interface SequenceRenderContext
public Font getFont()
SequenceRenderContext
getFont
in interface SequenceRenderContext
Copyright © 2014 BioJava. All rights reserved.