sk.baka.ambient.views.gesturelist
Class KeypadController

java.lang.Object
  extended by sk.baka.ambient.views.gesturelist.KeypadController
All Implemented Interfaces:
KeyEvent.Callback

final class KeypadController
extends Object
implements KeyEvent.Callback

Controls the GesturesListView component via the keypad.

Author:
Martin Vysny

Constructor Summary
KeypadController(GesturesListView ownerView)
          Creates new controller instance.
 
Method Summary
(package private)  void cancelWork()
          Invoked by gestures list view if this controller should cancel all its work immediately as other controller is about to do something.
 void copy(Interval i)
          Copies given interval into the clipboard.
 List<TrackMetadataBean> getClipboard()
          Returns the contents of the clipboard as a list of tracks.
 boolean onKeyDown(int keyCode, KeyEvent event)
           
 boolean onKeyMultiple(int keyCode, int arg1, KeyEvent event)
           
 boolean onKeyUp(int keyCode, KeyEvent event)
           
(package private)  void selectionChanged()
          Invoked when the selection is changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeypadController

KeypadController(GesturesListView ownerView)
Creates new controller instance.

Parameters:
ownerView - the owning view.
Method Detail

onKeyUp

public boolean onKeyUp(int keyCode,
                       KeyEvent event)
Specified by:
onKeyUp in interface KeyEvent.Callback

onKeyDown

public boolean onKeyDown(int keyCode,
                         KeyEvent event)
Specified by:
onKeyDown in interface KeyEvent.Callback

onKeyMultiple

public boolean onKeyMultiple(int keyCode,
                             int arg1,
                             KeyEvent event)
Specified by:
onKeyMultiple in interface KeyEvent.Callback

selectionChanged

void selectionChanged()
Invoked when the selection is changed.


cancelWork

void cancelWork()
Invoked by gestures list view if this controller should cancel all its work immediately as other controller is about to do something.


copy

public void copy(Interval i)
Copies given interval into the clipboard. The operation does not block - it may retrieve the tracks in the background

Parameters:
i - the interval to copy.

getClipboard

public List<TrackMetadataBean> getClipboard()
Returns the contents of the clipboard as a list of tracks.

Returns:
list of tracks, never null, may be empty.


Copyright © 2007-2008. All Rights Reserved.