ti.chimera
Class Plugin.ViewResource

java.lang.Object
  extended byti.chimera.Resource
      extended byti.chimera.Plugin.ViewResource
Enclosing class:
Plugin

public class Plugin.ViewResource
extends Resource

A view-resource adds a view, when installed, and removes the view when uninstalled.


Constructor Summary
Plugin.ViewResource(Plugin.ViewFactory vh, boolean managed)
          Create a ViewResource
Plugin.ViewResource(oscript.data.Value fxn, boolean managed)
          Create a ViewResource.
Plugin.ViewResource(View view)
          Create a ViewResource for a view.
 
Method Summary
 void install()
          install the view
 java.lang.String toString()
          For debugging.
 void uninstall()
          uninstall the view that was installed
 
Methods inherited from class ti.chimera.Resource
isManaged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Plugin.ViewResource

public Plugin.ViewResource(Plugin.ViewFactory vh,
                           boolean managed)
Create a ViewResource

Parameters:
vh - the view-factory
managed - is this a managed view

Plugin.ViewResource

public Plugin.ViewResource(oscript.data.Value fxn,
                           boolean managed)
Create a ViewResource. This constructor is provided as a convenience for script code, so script code can simply pass in a function that returns a View, rather than having to pass in an instance of ViewFactory.

Parameters:
fxn - the script function that takes no args and returns a view instance
managed - is this a managed view

Plugin.ViewResource

public Plugin.ViewResource(View view)
Create a ViewResource for a view. Since a view is potentially not lightweight, this constructor only allows you to create an unmanaged resource. To create a managed resouce, use the constructor that takes a ViewFactory (or a script function that returns a view).

Parameters:
view - the view
Method Detail

install

public void install()
install the view

Specified by:
install in class Resource
See Also:
Resource.uninstall()

uninstall

public void uninstall()
uninstall the view that was installed

Specified by:
uninstall in class Resource
See Also:
Resource.install()

toString

public java.lang.String toString()
For debugging.

Returns:
a string