com.groovemanager.sampled.waveform
Interface Selectable

All Known Implementing Classes:
MarkableWaveFormDisplay, SelectableWaveFormDisplay, WaveFormDisplay

public interface Selectable

A Selectable instance always has a Selection that can be changed and queried. A Selection has a left and a right border. A Selection can also be of zero length when left and right border are the same. A Selectable has also a position that can be set and queried. The position is a single value that is independent from the Selection.

Author:
Manu Robledo

Method Summary
 void addSelectableListener(SelectableListener listener)
          Add a SelectableListener that will be notified of changes to this Selectable´s Selection or position
 int getPosition()
          Get the current position
 Selection getSelection()
          Get the current Selection
 void removeSelectableListener(SelectableListener listener)
          Remove a SelectableListener from this Selectable
 void setPosition(int pos)
          Set the position
 void setSelection(Selection sel)
          Set the Selection
 

Method Detail

addSelectableListener

void addSelectableListener(SelectableListener listener)
Add a SelectableListener that will be notified of changes to this Selectable´s Selection or position

Parameters:
listener - The SelectableListener to add

getPosition

int getPosition()
Get the current position

Returns:
The current position

getSelection

Selection getSelection()
Get the current Selection

Returns:
The current Selection

removeSelectableListener

void removeSelectableListener(SelectableListener listener)
Remove a SelectableListener from this Selectable

Parameters:
listener - The SelectableListener to remove

setPosition

void setPosition(int pos)
Set the position

Parameters:
pos - The new position

setSelection

void setSelection(Selection sel)
Set the Selection

Parameters:
sel - The new Selection