org.opensourcephysics.tools
Class LibraryCollection

java.lang.Object
  extended by org.opensourcephysics.tools.LibraryResource
      extended by org.opensourcephysics.tools.LibraryCollection

public class LibraryCollection
extends LibraryResource

This represents a collection of library resources.

Version:
1.0
Author:
Douglas Brown

Field Summary
 
Fields inherited from class org.opensourcephysics.tools.LibraryResource
allTypes, COLLECTION_TYPE, displayName, EJS_TYPE, ejsIcon, HTML_TYPE, htmlIcon, PDF_TYPE, pdfIcon, resourceTypes, TRACKER_TYPE, trackerIcon, UNKNOWN_TYPE, unknownIcon, VIDEO_TYPE, videoIcon
 
Constructor Summary
LibraryCollection(java.lang.String name)
          Constructor.
 
Method Summary
 void addResource(LibraryResource resource)
          Adds a resource to the end of this collection.
static XML.ObjectLoader getLoader()
          Returns an ObjectLoader to save and load data for this class.
 LibraryResource[] getResources()
          Gets the array of resources in this collection.
 void insertResource(LibraryResource resource, int index)
          Inserts a resource into this collection at a specified index.
 void removeResource(LibraryResource resource)
          Removes a resource from this collection.
 
Methods inherited from class org.opensourcephysics.tools.LibraryResource
getBasePath, getClone, getDescription, getHTMLPath, getIcon, getName, getProperty, getPropertyNames, getTarget, getType, setBasePath, setDescription, setHTMLPath, setName, setProperty, setTarget, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LibraryCollection

public LibraryCollection(java.lang.String name)
Constructor.

Parameters:
name - the name of the collection
Method Detail

addResource

public void addResource(LibraryResource resource)
Adds a resource to the end of this collection.

Parameters:
resource - the resource

insertResource

public void insertResource(LibraryResource resource,
                           int index)
Inserts a resource into this collection at a specified index.

Parameters:
resource - the resource
index - the index

removeResource

public void removeResource(LibraryResource resource)
Removes a resource from this collection.

Parameters:
resource - the resource to remove

getResources

public LibraryResource[] getResources()
Gets the array of resources in this collection.

Returns:
an array of resources

getLoader

public static XML.ObjectLoader getLoader()
Returns an ObjectLoader to save and load data for this class.

Returns:
the object loader