Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.ac.man.bioinf.gui.viewer
Class SingleAlignmentSelectionModel

    java.lang.Object
      |
      +--uk.ac.man.bioinf.gui.viewer.SingleAlignmentSelectionModel

All Implemented Interfaces:
  AlignmentSelectionModel

public class SingleAlignmentSelectionModel
extends Object
implements AlignmentSelectionModel

SingleAlignmentSelectionModel.java Created: Mon Apr 10 11:59:44 2000

Version:
  $Id: SingleAlignmentSelectionModel.java,v 1.5 2001/04/11 17:04:42 lord Exp $
Author:
  Phillip Lord

Constructor Summary
`SingleAlignmentSelectionModel()`

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

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SingleAlignmentSelectionModel

    public SingleAlignmentSelectionModel()

Method Detail

### isSelecting

    public boolean isSelecting()

  Description copied from interface: `AlignmentSelectionModel`
  is the current selection in the process of being selected.

  Specified by:
    `isSelecting` in interface `AlignmentSelectionModel`
  Returns:
    true is selection is changing

### getCurrentSelection

    public SequenceAlignmentRectangle getCurrentSelection()

  Description copied from interface: `AlignmentSelectionModel`
  Returns the current selection or null if there is no selection. If there is more than one selection this should return the most recently made selection

  Specified by:
    `getCurrentSelection` in interface `AlignmentSelectionModel`
  Returns:
    the selection

### getNumberSelections

    public int getNumberSelections()

  Description copied from interface: `AlignmentSelectionModel`
  Get the number of selections.

  Specified by:
    `getNumberSelections` in interface `AlignmentSelectionModel`
  Returns:
    the number of selections

### getSelectionAt

    public SequenceAlignmentRectangle getSelectionAt(int index)
                                              throws ArrayIndexOutOfBoundsException

  Description copied from interface: `AlignmentSelectionModel`
  Gets the given selection. The index should reflect the chronological order in which the selections were made, with the smallest index first

  Specified by:
    `getSelectionAt` in interface `AlignmentSelectionModel`
  Parameters:
    `index` - the index
  Returns:
    the selection array index at the given index
  Throws:
    `ArrayIndexOutOfBoundsException` - if the index is out of bounds

### isPointSelected

    public boolean isPointSelected(SequenceAlignmentPoint point)

  Description copied from interface: `AlignmentSelectionModel`
  Is the point within one of the selection rectangles

  Specified by:
    `isPointSelected` in interface `AlignmentSelectionModel`
  Parameters:
    `point` - the point
  Returns:
    true if point is within a rectangle

### clearSelection

    public void clearSelection()

  Description copied from interface: `AlignmentSelectionModel`
  Clear all the selections in this model

  Specified by:
    `clearSelection` in interface `AlignmentSelectionModel`

### getRectangleAtPoint

    public SequenceAlignmentRectangle getRectangleAtPoint(SequenceAlignmentPoint point)

  Description copied from interface: `AlignmentSelectionModel`
  Get the first selection rectangle which surrounds the point, or null if there is not one.

  Specified by:
    `getRectangleAtPoint` in interface `AlignmentSelectionModel`
  Parameters:
    `point` - the point in question
  Returns:
    the rectangle surrounding point

### getRectanglesAtPoint

    public SequenceAlignmentRectangle[] getRectanglesAtPoint(SequenceAlignmentPoint point)

  Description copied from interface: `AlignmentSelectionModel`
  Get all selection rectangles which surround this point, or null if there is not one

  Specified by:
    `getRectanglesAtPoint` in interface `AlignmentSelectionModel`
  Parameters:
    `point` - the point in question
  Returns:
    the rectangles surrounding point

### extendSelection

    public void extendSelection(SequenceAlignmentPoint point)

  Description copied from interface: `AlignmentSelectionModel`
  Start a selection at the given point

  Specified by:
    `extendSelection` in interface `AlignmentSelectionModel`
  Parameters:
    `point` - the start of the selection

### stopSelection

    public void stopSelection(SequenceAlignmentPoint point)

  Description copied from interface: `AlignmentSelectionModel`
  Complete the selection at the given point

  Specified by:
    `stopSelection` in interface `AlignmentSelectionModel`
  Parameters:
    `point` - the point to complete the selection

### addAlignmentSelectionListener

    public void addAlignmentSelectionListener(AlignmentSelectionListener listener)

  Specified by:
    `addAlignmentSelectionListener` in interface `AlignmentSelectionModel`

### removeAlignmentSelectionListener

    public void removeAlignmentSelectionListener(AlignmentSelectionListener listener)

  Specified by:
    `removeAlignmentSelectionListener` in interface `AlignmentSelectionModel`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD