|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
AlignmentSelectionModel.java This defines the selection model for the JAlignmentViewer. The main three methods of this class, namely stopSelection(), extendSelection() and clearSelection() are called by the JAlignmentViewer, or one of its helper classes and usually considered to be advisory. The model is free to ignore these method calls if it is appropriate behaviour. Created: Mon Apr 10 11:32:26 2000
Method Summary | |
void |
addAlignmentSelectionListener(AlignmentSelectionListener listener)
|
void |
clearSelection()
Clear all the selections in this model |
void |
extendSelection(SequenceAlignmentPoint point)
Start a selection at the given point |
SequenceAlignmentRectangle |
getCurrentSelection()
Returns the current selection or null if there is no selection. |
int |
getNumberSelections()
Get the number of selections. |
SequenceAlignmentRectangle |
getRectangleAtPoint(SequenceAlignmentPoint point)
Get the first selection rectangle which surrounds the point, or null if there is not one. |
SequenceAlignmentRectangle[] |
getRectanglesAtPoint(SequenceAlignmentPoint point)
Get all selection rectangles which surround this point, or null if there is not one |
SequenceAlignmentRectangle |
getSelectionAt(int index)
Gets the given selection. |
boolean |
isPointSelected(SequenceAlignmentPoint point)
Is the point within one of the selection rectangles |
boolean |
isSelecting()
is the current selection in the process of being selected. |
void |
removeAlignmentSelectionListener(AlignmentSelectionListener listener)
|
void |
stopSelection(SequenceAlignmentPoint point)
Complete the selection at the given point |
Method Detail |
public boolean isSelecting()
public SequenceAlignmentRectangle getCurrentSelection()
public int getNumberSelections()
public SequenceAlignmentRectangle getSelectionAt(int index) throws IndexOutOfBoundsException
index
- the index
ArrayIndexOutOfBoundsException
- if the index is out of bounds
IndexOutOfBoundsException
public boolean isPointSelected(SequenceAlignmentPoint point)
point
- the point
public void clearSelection()
public SequenceAlignmentRectangle getRectangleAtPoint(SequenceAlignmentPoint point)
point
- the point in question
public SequenceAlignmentRectangle[] getRectanglesAtPoint(SequenceAlignmentPoint point)
point
- the point in question
public void extendSelection(SequenceAlignmentPoint point)
point
- the start of the selectionpublic void stopSelection(SequenceAlignmentPoint point)
point
- the point to complete the selectionpublic void addAlignmentSelectionListener(AlignmentSelectionListener listener)
public void removeAlignmentSelectionListener(AlignmentSelectionListener listener)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |