com.groovemanager.sampled.waveform
Interface Markable

All Known Implementing Classes:
MarkableWaveFormDisplay, WaveFormDisplay

public interface Markable

Instances of implementing classes can have an unlimited number of Markers added to themselves. The Markers can be moved or removed. Each Marker will be located at a specific position so this Markable instance should be able to deal with something like position.

Author:
Manu Robledo

Method Summary
 void addMarkableListener(MarkableListener listener)
          Add a MarkableListener that will be notified of any changes made to this Markable instance
 void addMarker(int position, java.lang.String name)
          Add a Marker with the given name to this Markable at the given position
 int getMarkerCount()
          Get the current number of Markers contained in this Markable
 Marker[] getMarkers()
          Get all Markers currently assigned to this Markable
 void moveMarker(int oldPos, int newPos)
          Move a Marker from the specified position to a new position
 void moveMarker(java.lang.String name, int newPos)
          Move the Marker identified by the given name to the specified position
 void moveMarker(java.lang.String name, int oldPos, int newPos)
          Move the Marker identified by the given name and currently located at the given position to the a new position
 void moveMarkerIndex(int index, int newPos)
          Move the Marker at the given index to the given new position
 void removeMarkableListener(MarkableListener listener)
          Remove a MarkableListener
 void removeMarker(int position)
          Remove a marker from the given position
 void removeMarker(int position, java.lang.String name)
          Remove a Marker identified by the given name and located at the given position
 void removeMarker(java.lang.String name)
          Remove a marker identified by the given name
 void removeMarkerIndex(int index)
          Remove the Marker at the given index
 

Method Detail

addMarkableListener

void addMarkableListener(MarkableListener listener)
Add a MarkableListener that will be notified of any changes made to this Markable instance

Parameters:
listener - The MarkableListener to add

addMarker

void addMarker(int position,
               java.lang.String name)
Add a Marker with the given name to this Markable at the given position

Parameters:
position - The position where the Marker should be created
name - The name of the Marker

getMarkerCount

int getMarkerCount()
Get the current number of Markers contained in this Markable

Returns:
The number of Markers contained in this Markable

getMarkers

Marker[] getMarkers()
Get all Markers currently assigned to this Markable

Returns:
An Array of all Markers currently assigned to this Markable

moveMarker

void moveMarker(int oldPos,
                int newPos)
Move a Marker from the specified position to a new position

Parameters:
oldPos - The position at which the Marker is currently positioned
newPos - The position to which the Marker should be moved

moveMarker

void moveMarker(java.lang.String name,
                int newPos)
Move the Marker identified by the given name to the specified position

Parameters:
name - The name of the Marker to move
newPos - The position to which the Marker should be moved

moveMarker

void moveMarker(java.lang.String name,
                int oldPos,
                int newPos)
Move the Marker identified by the given name and currently located at the given position to the a new position

Parameters:
name - The name of the Marker to move
oldPos - The position at which the Marker is currently located
newPos - The position to which the Marker should be moved

moveMarkerIndex

void moveMarkerIndex(int index,
                     int newPos)
Move the Marker at the given index to the given new position

Parameters:
index - The zero-based index of the Marker to move
newPos - The position to move the Marker to

removeMarkableListener

void removeMarkableListener(MarkableListener listener)
Remove a MarkableListener

Parameters:
listener - The MarkableListener to remove

removeMarker

void removeMarker(int position)
Remove a marker from the given position

Parameters:
position - The position from where the Marker should be removed

removeMarker

void removeMarker(int position,
                  java.lang.String name)
Remove a Marker identified by the given name and located at the given position

Parameters:
position - The position from where the Marker should be removed
name - The name of the Marker to remove

removeMarker

void removeMarker(java.lang.String name)
Remove a marker identified by the given name

Parameters:
name - The name of the Marker to remove

removeMarkerIndex

void removeMarkerIndex(int index)
Remove the Marker at the given index

Parameters:
index - The zero-based index of the Marker to remove