sk.baka.ambient.activity.main
Class AmpacheController

java.lang.Object
  extended by sk.baka.ambient.activity.main.AbstractController
      extended by sk.baka.ambient.activity.main.AbstractListController
          extended by sk.baka.ambient.activity.main.cb.AbstractCollectionController
              extended by sk.baka.ambient.activity.main.AmpacheController
All Implemented Interfaces:
IApplicationListener, ILibraryListener, IGestureListViewListener

public final class AmpacheController
extends AbstractCollectionController
implements IApplicationListener

Browses the Ampache server and optionally allows a synchronization of tracks.

Author:
Martin Vysny

Nested Class Summary
 
Nested classes/interfaces inherited from class sk.baka.ambient.activity.main.AbstractController
AbstractController.Listener
 
Field Summary
 
Fields inherited from class sk.baka.ambient.activity.main.cb.AbstractCollectionController
collection
 
Fields inherited from class sk.baka.ambient.activity.main.AbstractListController
highlightColor, listView
 
Fields inherited from class sk.baka.ambient.activity.main.AbstractController
app, cycle, listener, mainActivity, mainView
 
Constructor Summary
AmpacheController(Activity mainActivity, GesturesListView playlistView)
          Creates new ampache controller.
 
Method Summary
(package private)  void ampacheClientChanged()
          Invoked when the Ampache client configuration changes.
 void clipboardChanged()
          The clipboard has been changed.
 void configChanged(ConfigurationBean config)
          The configuration was changed.
 void destroy()
          The controller is about to be destroyed.
 void offline(boolean offline)
          Informs that the application has entered an offline/online mode.
protected  void onAction(ActionsEnum action)
          Called when an action button is pressed.
protected  void performZoom(boolean zoom)
          Zooms, or un-zooms the controller.
 void stateChanged(AppState state)
          The application state was changed.
protected  void visibilityChanged(boolean visible)
          Invoked when the component visibility changes.
 
Methods inherited from class sk.baka.ambient.activity.main.cb.AbstractCollectionController
canComputeItems, canHighlight, computeTracks, coverLoaded, getHint, isComputeTracksLong, isComputeTracksOnlineOp, isReadOnly, itemActivated, libraryUpdate, lyricsLoaded, recomputeListItems, refetchData, removeItems, reset, update, updateData
 
Methods inherited from class sk.baka.ambient.activity.main.AbstractListController
dropItems, getClipboard, highlightChanged, moveItems, moveItemsByOne, setClipboard, update
 
Methods inherited from class sk.baka.ambient.activity.main.AbstractController
equals, flipVisibility, hashCode, hide, initButtonBar, initButtonBar, initButtonBar, isDestroyed, isVisible, isZoomed, setVisibility, show, zoom
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AmpacheController

public AmpacheController(Activity mainActivity,
                         GesturesListView playlistView)
Creates new ampache controller.

Parameters:
mainActivity - the owning activity.
playlistView - the playlist view.
Method Detail

onAction

protected void onAction(ActionsEnum action)
Description copied from class: AbstractController
Called when an action button is pressed. By default invokes main activity. Subclasses can override.

Overrides:
onAction in class AbstractCollectionController
Parameters:
action - the action to take

ampacheClientChanged

void ampacheClientChanged()
Invoked when the Ampache client configuration changes.


destroy

public void destroy()
Description copied from class: AbstractController
The controller is about to be destroyed. No invocations are performed after this call. The controller should release its resources, stop its activities etc. Make sure that you call super() if you override this method!

Overrides:
destroy in class AbstractCollectionController

clipboardChanged

public void clipboardChanged()
Description copied from interface: IApplicationListener
The clipboard has been changed.

Specified by:
clipboardChanged in interface IApplicationListener

configChanged

public void configChanged(ConfigurationBean config)
Description copied from interface: IApplicationListener
The configuration was changed.

Specified by:
configChanged in interface IApplicationListener
Parameters:
config - the configuration instance, must NOT be modified.

offline

public void offline(boolean offline)
Description copied from interface: IApplicationListener
Informs that the application has entered an offline/online mode.

Specified by:
offline in interface IApplicationListener
Parameters:
offline - if true then we are currently offline. If false then we are online.

stateChanged

public void stateChanged(AppState state)
Description copied from interface: IApplicationListener
The application state was changed.

Specified by:
stateChanged in interface IApplicationListener
Parameters:
state - the state instance, must NOT be modified.

visibilityChanged

protected void visibilityChanged(boolean visible)
Description copied from class: AbstractController
Invoked when the component visibility changes. By default does nothing.

Overrides:
visibilityChanged in class AbstractController
Parameters:
visible - new visibility flag.

performZoom

protected void performZoom(boolean zoom)
Description copied from class: AbstractController
Zooms, or un-zooms the controller.

Overrides:
performZoom in class AbstractListController
Parameters:
zoom - true zoom the controller in, false zoom the controller out.


Copyright © 2007-2008. All Rights Reserved.