com.blackledge.david.tivo.multitasker.plugins
Class GenericImageBrand

java.lang.Object
  extended by com.blackledge.david.tivo.multitasker.plugins.GenericImageBrand
All Implemented Interfaces:
Brand, LocalOptionProvider

public class GenericImageBrand
extends Object
implements Brand, LocalOptionProvider

Essentially a duplicate of GenericBackgroundImage but it sets the resource of the Brand view with the images identified via OPTION_URLS ("GenericImageBrand.urls")


Field Summary
static String OPTION_PREVENT_DUPLICATES
           
static String OPTION_URLS
           
 
Fields inherited from interface com.blackledge.david.tivo.multitasker.LocalOptionProvider
TYPE_BOOLEAN, TYPE_CLASS, TYPE_COLOR, TYPE_FILE, TYPE_FLOAT, TYPE_FOLDER, TYPE_IMAGE, TYPE_INTEGER, TYPE_STRING, TYPE_URL
 
Constructor Summary
GenericImageBrand()
           
 
Method Summary
 String getLocalOptionDefault(String key)
          default for OPTION_URLS - loopback to current tivo's dancing tivo guy animated gif; for OPTION_PREVENT_DUPLICATES - true.
 Collection getLocalOptionNames()
          just the keySet of getLocalOptionPreferences()
 Map getLocalOptionPreferences()
          Add support for OPTION_URLS map of your option keys where the value is "Type[+],text [range]" per the MultiTaskerPreferences class.
 com.tivo.hme.bananas.BView getUpdatedBrand(com.tivo.hme.bananas.BView brandParent)
          Gets called to create the brand and any time the multitasker thinks it should be updated.
 void init(MultiTaskerApplication app)
          initialize the plugin with the current application context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPTION_URLS

public static final String OPTION_URLS
See Also:
Constant Field Values

OPTION_PREVENT_DUPLICATES

public static final String OPTION_PREVENT_DUPLICATES
See Also:
Constant Field Values
Constructor Detail

GenericImageBrand

public GenericImageBrand()
Method Detail

init

public void init(MultiTaskerApplication app)
Description copied from interface: Brand
initialize the plugin with the current application context. Called once before Brand.getUpdatedBrand(BView) is ever called.

Specified by:
init in interface Brand

getUpdatedBrand

public com.tivo.hme.bananas.BView getUpdatedBrand(com.tivo.hme.bananas.BView brandParent)
Description copied from interface: Brand
Gets called to create the brand and any time the multitasker thinks it should be updated. Implementors are responsible for cleaning up your old View if creating a new one!

Specified by:
getUpdatedBrand in interface Brand
Parameters:
brandParent - the parent to use for the brand's view - constrains height/width/position
Returns:
View that contains the brand. Will be set visible or invisible as needed by multitasker. If null is returned, the Brand will be unchanged this "round."

getLocalOptionDefault

public String getLocalOptionDefault(String key)
default for OPTION_URLS - loopback to current tivo's dancing tivo guy animated gif; for OPTION_PREVENT_DUPLICATES - true.

Specified by:
getLocalOptionDefault in interface LocalOptionProvider
Returns:
Option value to use if none is set or overridden.
See Also:
LocalOptionProvider.getLocalOptionDefault(java.lang.String)

getLocalOptionNames

public Collection getLocalOptionNames()
just the keySet of getLocalOptionPreferences()

Specified by:
getLocalOptionNames in interface LocalOptionProvider
Returns:

getLocalOptionPreferences

public Map getLocalOptionPreferences()
Add support for OPTION_URLS map of your option keys where the value is "Type[+],text [range]" per the MultiTaskerPreferences class. Use a LinkedHashMap to maintain the order of your options.

Specified by:
getLocalOptionPreferences in interface LocalOptionProvider
Returns:
See Also:
LocalOptionProvider.getLocalOptionPreferences()