net.sourceforge.atunes.kernel.handlers
Class RadioHandler

java.lang.Object
  extended by net.sourceforge.atunes.kernel.handlers.RadioHandler
All Implemented Interfaces:
ApplicationFinishListener

public class RadioHandler
extends java.lang.Object
implements ApplicationFinishListener

The Class RadioHandler.

Author:
sylvain

Method Summary
 void addRadio()
          Add the radio station from the add radio dialog.
 void addRadio(Radio radio)
          Add a radio station to the list.
 void applicationFinish()
          Write stations to xml files.
static RadioHandler getInstance()
          Gets the single instance of RadioHandler.
 java.util.List<Radio> getRadioPresets()
          Gets the radio presets.
 java.util.List<Radio> getRadios()
          Gets the radios.
 java.util.List<Radio> getRadios(java.lang.String label)
          Gets the radios.
 java.lang.Runnable getReadRadiosRunnable()
          Runnable process to read radio cache.
 void refresh()
          Refreshes radio view.
 void removeRadio(Radio radio)
          Remove a station from the list.
 void retrieveRadios()
          Retrieve radios.
 java.util.List<Radio> retrieveRadiosForBrowser()
          Retrieve radios for browser.
 void setLabel(java.util.List<Radio> radioList, java.lang.String label)
          Change label of radio.
 void setName(Radio radio, java.lang.String name)
          Change radio name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static RadioHandler getInstance()
Gets the single instance of RadioHandler.

Returns:
single instance of RadioHandler

addRadio

public void addRadio()
Add the radio station from the add radio dialog.


addRadio

public void addRadio(Radio radio)
Add a radio station to the list.

Parameters:
radio - Station

applicationFinish

public void applicationFinish()
Write stations to xml files.

Specified by:
applicationFinish in interface ApplicationFinishListener

getRadios

public java.util.List<Radio> getRadios()
Gets the radios.

Returns:
the radios

getRadioPresets

public java.util.List<Radio> getRadioPresets()
Gets the radio presets.

Returns:
the preset radios, minus user maintained radio stations.

getRadios

public java.util.List<Radio> getRadios(java.lang.String label)
Gets the radios.

Parameters:
label - the label
Returns:
the radios

getReadRadiosRunnable

public java.lang.Runnable getReadRadiosRunnable()
Runnable process to read radio cache.

Returns:
the read radios runnable

refresh

public void refresh()
Refreshes radio view.


removeRadio

public void removeRadio(Radio radio)
Remove a station from the list. Preset stations are not really removed but are marked so they not show up in the navigator

Parameters:
radio - Radio to be removed

retrieveRadiosForBrowser

public java.util.List<Radio> retrieveRadiosForBrowser()
                                               throws java.io.IOException
Retrieve radios for browser.

Returns:
the list< radio>
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

retrieveRadios

public void retrieveRadios()
Retrieve radios.


setLabel

public void setLabel(java.util.List<Radio> radioList,
                     java.lang.String label)
Change label of radio.

Parameters:
radioList - List of radios for which the label should be changed
label - New label

setName

public void setName(Radio radio,
                    java.lang.String name)
Change radio name. Also permits changing name of preset stations.

Parameters:
radio - Radio station
name - New name


Copyright © 2006-2008 The aTunes Team. All Rights Reserved.