public class PherogramComponentModel extends java.lang.Object
| Constructor and Description |
|---|
PherogramComponentModel(PherogramComponentModel model)
Creates a copy from the specified instance.
|
PherogramComponentModel(PherogramProvider pherogramProvider)
Creates a new instance of this class without any cut off pherogram ends.
|
PherogramComponentModel(PherogramProvider pherogramProvider,
int leftCutPosition,
int rightCutPosition)
Creates a new instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(PherogramComponentModelListener listener) |
protected void |
fireLeftCutPositionChanged(int oldValue,
PherogramAlignmentRelation oldEditableIndex,
boolean moreEventsUpcoming) |
protected void |
firePherogramProviderChanged(PherogramProvider oldProvider,
boolean reverseComplemented,
boolean moreEventsUpcoming) |
protected void |
fireRightCutPositionChanged(int oldValue,
PherogramAlignmentRelation oldEditableIndex,
boolean moreEventsUpcoming) |
protected PherogramAlignmentRelation |
getAlignmentRelation(int baseCallIndex) |
int |
getLeftCutPosition()
Returns the first base call index of the pherogram which has not been cut off.
|
PherogramProvider |
getPherogramProvider() |
int |
getRightCutPosition()
Returns the first base call index of the pherogram that has been cut off (so that the length of the visible
area of the pherogram can be calculated as
getRightCutPosition() - getLeftCutPosition()). |
protected void |
onSetLeftCutPosition(int oldBaseCallIndex,
int newBaseCallIndex)
Hook method to be implemented in inherited classes and called from within
setLeftCutPosition(int). |
protected void |
onSetRightCutPosition(int oldBaseCallIndex,
int newBaseCallIndex)
Hook method to be implemented in inherited classes and called from within
setRightCutPosition(int). |
void |
removeListener(PherogramComponentModelListener listener) |
void |
reverseComplement()
Reverse complements the pherogram and swaps the left and right cut positions accordingly.
|
void |
setLeftCutPosition(int baseCallIndex)
Sets a new cut position for the left border of the visible part of the pherogram.
|
void |
setProvider(PherogramProvider pherogramProvider)
Sets a new pherogram provider and fires according events.
|
void |
setRightCutPosition(int baseCallIndex)
Sets a new cut position for the right border of the visible part of the pherogram.
|
public PherogramComponentModel(PherogramProvider pherogramProvider)
pherogramProvider - the pherogram providerjava.lang.NullPointerException - if null is specified for pherogramProviderpublic PherogramComponentModel(PherogramComponentModel model)
model - the instance to be copiedjava.lang.NullPointerException - if null is specified for modelpublic PherogramComponentModel(PherogramProvider pherogramProvider, int leftCutPosition, int rightCutPosition)
pherogramProvider - the pherogram providerleftCutPosition - the index in the base call sequence where the pherogram shall be cut off at the left endrightCutPosition - the index in the base call sequence where the pherogram shall be cut off at the right endjava.lang.NullPointerException - if null is specified for pherogramProviderjava.lang.IndexOutOfBoundsException - if leftCutPosition is not between 0 and and rightCutPosition
or rightCutPosition if not between leftCutPosition and the length of the base call sequence
defined by pherogramProviderpublic PherogramProvider getPherogramProvider()
public void reverseComplement()
public void setProvider(PherogramProvider pherogramProvider)
pherogramProvider - the new provider for trace curves and the base call sequencejava.lang.NullPointerException - if null is specified for pherogramProviderpublic int getLeftCutPosition()
protected void onSetLeftCutPosition(int oldBaseCallIndex, int newBaseCallIndex)
setLeftCutPosition(int).oldBaseCallIndex - newBaseCallIndex - public void setLeftCutPosition(int baseCallIndex)
If this method is called on an instance of PherogramAreaModel the property
PherogramAreaModel.getFirstSeqPos() is moved accordingly, so that the pherogram does not move
relative to the sequence. If this shall be avoided PherogramAreaModel.setFirstSeqLeftCutPos(int, int)
should be used instead.
baseCallIndex - the index of the first nucleotide in the base call sequence that shall be visiblejava.lang.IndexOutOfBoundsException - if baseCallIndex is not between 0 and and getRightCutPosition()PherogramAreaModel.setFirstSeqLeftCutPos(int, int)public int getRightCutPosition()
getRightCutPosition() - getLeftCutPosition()).getLeftCutPosition()protected void onSetRightCutPosition(int oldBaseCallIndex, int newBaseCallIndex)
setRightCutPosition(int).oldBaseCallIndex - newBaseCallIndex - public void setRightCutPosition(int baseCallIndex)
baseCallIndex - the index of the first nucleotide after the visible part in the base call sequencejava.lang.IndexOutOfBoundsException - if baseCallIndex if not between getLeftCutPosition() and the length
of the base call sequence defined by getPherogramProvider()public void addListener(PherogramComponentModelListener listener)
public void removeListener(PherogramComponentModelListener listener)
protected PherogramAlignmentRelation getAlignmentRelation(int baseCallIndex)
protected void fireLeftCutPositionChanged(int oldValue, PherogramAlignmentRelation oldEditableIndex, boolean moreEventsUpcoming)
protected void fireRightCutPositionChanged(int oldValue, PherogramAlignmentRelation oldEditableIndex, boolean moreEventsUpcoming)
protected void firePherogramProviderChanged(PherogramProvider oldProvider, boolean reverseComplemented, boolean moreEventsUpcoming)