|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.bio.gui.sequence.SubSequenceRenderContext
public class SubSequenceRenderContext
Allows a new renderer to "wrap" another one, replacing one or more values.
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.
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 | |
---|---|
SubSequenceRenderContext(SequenceRenderContext src,
SymbolList symbols,
FeatureHolder features,
RangeLocation range)
|
|
SubSequenceRenderContext(SequenceRenderContext src,
SymbolList symbols,
FeatureHolder features,
RangeLocation range,
int symOffset)
|
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. |
java.awt.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(java.awt.geom.Point2D point)
Converts a graphical position into a sequence coordinate. |
double |
sequenceToGraphics(int i)
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 SubSequenceRenderContext(SequenceRenderContext src, SymbolList symbols, FeatureHolder features, RangeLocation range)
public SubSequenceRenderContext(SequenceRenderContext src, SymbolList symbols, FeatureHolder features, RangeLocation range, int symOffset)
Method Detail |
---|
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 sequence
public int graphicsToSequence(double d)
SequenceRenderContext
graphicsToSequence
in interface SequenceRenderContext
d
- A pixel position
public int graphicsToSequence(java.awt.geom.Point2D point)
SequenceRenderContext
graphicsToSequence
in interface SequenceRenderContext
point
- a point representing the position
public 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 java.awt.Font getFont()
SequenceRenderContext
getFont
in interface SequenceRenderContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |