public class DisplayProperties extends java.lang.Object implements AlignmentListener, SequenceListener
Constructor and Description |
---|
DisplayProperties(int encodingLength,
Alignment alignment,
java.awt.Font font,
java.awt.FontMetrics fontMetrics,
boolean fastRender,
boolean renderGaps) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(DisplayPropertiesListener listener)
Add a listener
|
void |
alignmentNameChanged(Alignment alignment) |
void |
alignmentSeqActivityChanged(Alignment alignment,
Sequence sequence) |
void |
alignmentSeqDeleted(Alignment alignment,
int i,
Sequence sequence) |
void |
alignmentSeqInserted(Alignment alignment,
int i) |
void |
alignmentSeqSwapped(Alignment alignment,
int i,
int j) |
void |
clearHighlights() |
void |
clearSelections()
Deselect all sequences
|
void |
fireDisplayHighlightsChanged(Sequence s) |
void |
fireDisplayHighlightsChanged(Sequence[] s) |
void |
fireSeqSelect(Sequence s) |
int |
getActivityHeight() |
int |
getActivityWidth() |
Alignment |
getAlignment() |
Sequence[] |
getAllSelected() |
Sequence[] |
getAllSelected(boolean inViewOrder) |
boolean |
getAnnView(Sequence s) |
int |
getCursorColumn() |
int |
getCursorRow() |
java.awt.Font |
getFont() |
java.awt.FontMetrics |
getFontMetrics() |
int |
getFontXOffset() |
int |
getFontYOffset() |
java.util.Set<Sequence.LineAnnotation> |
getHiddenLineAnnotations() |
java.util.List<Sequence.LineAnnotation> |
getHiddenLineAnnotations(Sequence sequence)
Get a list of the line annotations that are hidden for the given sequence
|
int[] |
getHighlights(Sequence sequence)
Identify the column positions (activities) that are highlighted in the
given sequence
|
int |
getMaxLength() |
int |
getPrevCursorColumn() |
int |
getPrevCursorRow() |
int |
getSelectedCount() |
boolean |
getSeqSelect(Sequence s) |
int |
getSpacingWidth() |
java.util.List<Sequence.LineAnnotation> |
getVisibleLineAnnotations(Sequence sequence)
Get a list of the line annotations that are visible for the given
sequence.
|
int |
getXForColumn(int column) |
java.awt.Color |
inverseRGB(java.awt.Color c) |
boolean |
isActivityBackgroundSquare() |
boolean |
isAnnotationPopupEnabled() |
boolean |
isEncodedActivityRendered() |
boolean |
isGapRendered() |
boolean |
isGroupEditing() |
boolean |
isMapping() |
boolean |
isSeqAnnEditing() |
boolean |
isSeqHighlight(Sequence s,
int idx) |
boolean |
isSequenceHidden(int row) |
void |
removeListener(DisplayPropertiesListener listener)
Remove a listener
|
void |
sequenceActivityChanged(Sequence sequence) |
void |
sequenceAnnotationChanged(Sequence sequence) |
void |
sequenceColorChanged(Sequence sequence) |
void |
sequenceColumnAnnotationsChanged(Sequence sequence,
int column) |
void |
sequenceLineAnnotationsChanged(Sequence aaseq) |
void |
sequenceNameChanged(Sequence sequence,
java.lang.String oldName) |
void |
setActivityBackgroundSquare(boolean activityBackgroundSquare) |
void |
setAligmentRecentlyEdited(boolean b) |
void |
setAnnView(Sequence s,
boolean show) |
void |
setCursorHidden(boolean b) |
void |
setHiddenLineAnnotation(Sequence sequence,
Sequence.LineAnnotation lineAnnotation) |
void |
setRenderEncodedActivity(boolean showEncodedActivity) |
void |
setRenderGaps(boolean renderGaps) |
void |
setRulerEditing(boolean b) |
void |
setSeqAnnEditing(boolean b) |
void |
setSeqHidden(Sequence s,
boolean hidden) |
void |
setSeqHighlight(Sequence s,
int idx,
boolean highlight) |
void |
setSeqHighlight(Sequence s,
int idx,
boolean highlight,
boolean notify) |
void |
setSeqSelect(Sequence s,
boolean select) |
void |
setVisibleLineAnnotation(Sequence sequence,
Sequence.LineAnnotation lineAnnotation) |
boolean |
showActivityAnnPanel() |
int |
sign(int a) |
void |
updateCursor(int newCursorRow,
int newCursorColumn) |
void |
updateCursor(int newCursorRow,
int newCursorColumn,
boolean isShiftDown,
boolean isControlDown) |
void |
updateCursor(int newCursorRow,
int newCursorColumn,
java.awt.event.MouseEvent e) |
public DisplayProperties(int encodingLength, Alignment alignment, java.awt.Font font, java.awt.FontMetrics fontMetrics, boolean fastRender, boolean renderGaps)
public java.awt.Color inverseRGB(java.awt.Color c)
public boolean isAnnotationPopupEnabled()
public boolean getSeqSelect(Sequence s)
public boolean isMapping()
public void setSeqAnnEditing(boolean b)
public Sequence[] getAllSelected()
public Sequence[] getAllSelected(boolean inViewOrder)
public int getSelectedCount()
public void setSeqSelect(Sequence s, boolean select)
public void clearSelections()
public void setAnnView(Sequence s, boolean show)
public java.util.Set<Sequence.LineAnnotation> getHiddenLineAnnotations()
public java.util.List<Sequence.LineAnnotation> getVisibleLineAnnotations(Sequence sequence)
sequence
- public java.util.List<Sequence.LineAnnotation> getHiddenLineAnnotations(Sequence sequence)
sequence
- public void setCursorHidden(boolean b)
public void updateCursor(int newCursorRow, int newCursorColumn)
public void updateCursor(int newCursorRow, int newCursorColumn, java.awt.event.MouseEvent e)
public void updateCursor(int newCursorRow, int newCursorColumn, boolean isShiftDown, boolean isControlDown)
public int sign(int a)
public boolean isSeqHighlight(Sequence s, int idx)
public void setSeqHighlight(Sequence s, int idx, boolean highlight)
public void setSeqHighlight(Sequence s, int idx, boolean highlight, boolean notify)
public void fireDisplayHighlightsChanged(Sequence s)
public void fireDisplayHighlightsChanged(Sequence[] s)
public void setRenderGaps(boolean renderGaps)
public void setRenderEncodedActivity(boolean showEncodedActivity)
public void setActivityBackgroundSquare(boolean activityBackgroundSquare)
public boolean isEncodedActivityRendered()
public boolean isActivityBackgroundSquare()
public int getMaxLength()
public boolean getAnnView(Sequence s)
public java.awt.FontMetrics getFontMetrics()
public int getCursorRow()
public int getPrevCursorRow()
public int getCursorColumn()
public int getPrevCursorColumn()
public void fireSeqSelect(Sequence s)
public void setVisibleLineAnnotation(Sequence sequence, Sequence.LineAnnotation lineAnnotation)
public void setHiddenLineAnnotation(Sequence sequence, Sequence.LineAnnotation lineAnnotation)
public void addListener(DisplayPropertiesListener listener)
listener
- public void removeListener(DisplayPropertiesListener listener)
listener
- public boolean isGapRendered()
public boolean isGroupEditing()
public boolean isSeqAnnEditing()
public void setAligmentRecentlyEdited(boolean b)
public void setSeqHidden(Sequence s, boolean hidden)
public boolean isSequenceHidden(int row)
public boolean showActivityAnnPanel()
public int getSpacingWidth()
public Alignment getAlignment()
public void setRulerEditing(boolean b)
public java.awt.Font getFont()
public int getActivityWidth()
public int getActivityHeight()
public int getFontXOffset()
public int getFontYOffset()
public int getXForColumn(int column)
public int[] getHighlights(Sequence sequence)
sequence
- public void clearHighlights()
public void alignmentNameChanged(Alignment alignment)
alignmentNameChanged
in interface AlignmentListener
public void alignmentSeqDeleted(Alignment alignment, int i, Sequence sequence)
alignmentSeqDeleted
in interface AlignmentListener
public void alignmentSeqInserted(Alignment alignment, int i)
alignmentSeqInserted
in interface AlignmentListener
public void alignmentSeqSwapped(Alignment alignment, int i, int j)
alignmentSeqSwapped
in interface AlignmentListener
public void alignmentSeqActivityChanged(Alignment alignment, Sequence sequence)
alignmentSeqActivityChanged
in interface AlignmentListener
public void sequenceActivityChanged(Sequence sequence)
sequenceActivityChanged
in interface SequenceListener
public void sequenceLineAnnotationsChanged(Sequence aaseq)
sequenceLineAnnotationsChanged
in interface SequenceListener
public void sequenceNameChanged(Sequence sequence, java.lang.String oldName) throws java.lang.Exception
sequenceNameChanged
in interface SequenceListener
java.lang.Exception
public void sequenceColorChanged(Sequence sequence)
sequenceColorChanged
in interface SequenceListener
public void sequenceAnnotationChanged(Sequence sequence)
sequenceAnnotationChanged
in interface SequenceListener
public void sequenceColumnAnnotationsChanged(Sequence sequence, int column)
sequenceColumnAnnotationsChanged
in interface SequenceListener