|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.tamu.bpaulson.marqs.Album
public class Album
Contains album objects and associated method
| Constructor Summary | |
|---|---|
Album(java.lang.String name)
Constructor |
|
| Method Summary | |
|---|---|
void |
add(AlbumObject x)
Method used to add an object to the album |
void |
addFile(java.io.File f)
Method used to add a file to the album |
void |
addFile(java.net.URL url)
Method used to add a file to the album |
void |
addFiles(java.io.File[] files)
Method used to add multiple files to the album |
void |
addSketch(Sketch s)
Add a sketch to the list of sketches for this album |
boolean |
contains(AlbumObject x)
Used to determine if the album already contains x |
static Album |
getAlbumFromXML(org.w3c.dom.Element e)
Read an album object from an XML element |
javax.swing.ImageIcon |
getImage(int i)
Get the image for the picture at index i |
java.util.ArrayList<AlbumObject> |
getMusicFiles()
Method used to get all the music files in the album |
java.util.Vector<java.lang.String> |
getMusicList()
Get an array list of the names of the music files in the album |
java.lang.String |
getMusicPath(int i)
Get the path of the object at index i in the music files list |
java.net.URL |
getMusicURL(int i)
Get the URL path of the music object at index i |
java.lang.String |
getName()
Method used to return the name of the album |
java.lang.String |
getPictureFilename(int i)
Get the filename of the picture at index i |
java.lang.String |
getPicturePath(int i)
Get the path of the object at index i in the pictures list |
java.util.ArrayList<AlbumObject> |
getPictures()
Method used to get all the pictures in the album |
Sketch |
getSketch()
Get the sketch associated with the album |
ExampleSet |
getSketchSet()
Return the set of sketches associated with the album |
javax.swing.ImageIcon |
getThumbnail(int i)
Get the thumbnail for the picture at index i |
org.w3c.dom.Element |
getXMLElement(org.w3c.dom.Document d)
Return an XML-style element representing this album |
boolean |
musicContains(AlbumObject x)
Used to determine if the music list already contains x |
int |
numMusicFiles()
Return the number of music files in the album |
int |
numPictures()
Return the number of pictures in the album |
boolean |
otherContains(AlbumObject x)
Used to determine if the "others" list already contains x |
boolean |
pictureContains(AlbumObject x)
Used to determine if the picture list already contains x |
void |
remove(java.util.ArrayList<AlbumObject> a)
Remove a list of album objects from the album |
void |
removeAllSketches()
Remove all the sketches associated with the album |
void |
removeSketch(int i)
Remove the sketch at index i |
void |
setName(java.lang.String n)
Method used to set the name of the album |
void |
setSketch(Sketch s)
Set the sketch associated with this album |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Album(java.lang.String name)
name - the name of the album| Method Detail |
|---|
public java.lang.String getName()
public void setName(java.lang.String n)
n - new name for the albumpublic void add(AlbumObject x)
x - album object to add to the albumpublic void addFiles(java.io.File[] files)
files - files to add to the albumpublic void addFile(java.io.File f)
f - file to add to the albumpublic void addFile(java.net.URL url)
url - url of the filepublic java.util.ArrayList<AlbumObject> getMusicFiles()
public java.util.ArrayList<AlbumObject> getPictures()
public int numPictures()
public int numMusicFiles()
public javax.swing.ImageIcon getThumbnail(int i)
i - index of the album object to get a thumbnail of
public javax.swing.ImageIcon getImage(int i)
i - index of the album object to get an image of
public java.util.Vector<java.lang.String> getMusicList()
public java.lang.String getMusicPath(int i)
i - index of the music file to get the path for
java.net.MalformedURLException
public java.net.URL getMusicURL(int i)
throws java.net.MalformedURLException
i - index of the music object in the music list
java.net.MalformedURLException - when URL is invalidpublic java.lang.String getPicturePath(int i)
i - index of the picture to get the path for
public java.lang.String getPictureFilename(int i)
i - index of the picture
public boolean musicContains(AlbumObject x)
x - album object to search for
public boolean pictureContains(AlbumObject x)
x - album object to search for
public boolean otherContains(AlbumObject x)
x - album object to search for
public boolean contains(AlbumObject x)
x - album object to search for
public Sketch getSketch()
public ExampleSet getSketchSet()
public void setSketch(Sketch s)
s - sketch to associate the album withpublic void addSketch(Sketch s)
s - sketch to add to the example setpublic void remove(java.util.ArrayList<AlbumObject> a)
a - list of album objects to removepublic void removeAllSketches()
public void removeSketch(int i)
i - indexpublic org.w3c.dom.Element getXMLElement(org.w3c.dom.Document d)
d - document to write album to
public static Album getAlbumFromXML(org.w3c.dom.Element e)
e - xml element
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||