edu.tamu.bpaulson.marqs
Class AlbumObject

java.lang.Object
  extended by java.io.File
      extended by edu.tamu.bpaulson.marqs.AlbumObject
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<java.io.File>

public class AlbumObject
extends java.io.File

Object that can be added to an album

Author:
Paulson Brandon
See Also:
Serialized Form

Field Summary
static int MUSIC
           
static int OTHER
           
static int PICTURE
           
 
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
 
Constructor Summary
AlbumObject(java.lang.String filename)
          Constructor for an AlbumObject
 
Method Summary
 boolean equals(AlbumObject x)
          Compares album object to x to see if they share the same file path
 java.lang.String getExtension()
          Method used to return the extension of the file
 java.lang.String getFilename()
          Method used to return the filename of the object
 javax.swing.ImageIcon getImage()
          Return the image of this album object (if it's a picture)
 javax.swing.ImageIcon getThumbnail()
          Return a thumbnail version of the album object if it is a picture file
 boolean isMusic()
          Method used to determine if object is a music file
 boolean isPicture()
          Method used to determine if object is a picture
 
Methods inherited from class java.io.File
canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getName, getParent, getParentFile, getPath, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setLastModified, setReadOnly, toString, toURI, toURL
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

OTHER

public static int OTHER

PICTURE

public static int PICTURE

MUSIC

public static int MUSIC
Constructor Detail

AlbumObject

public AlbumObject(java.lang.String filename)
Constructor for an AlbumObject

Parameters:
filename - name of the file
Method Detail

getExtension

public java.lang.String getExtension()
Method used to return the extension of the file

Returns:
extension of the file

getFilename

public java.lang.String getFilename()
Method used to return the filename of the object

Returns:
filename of the object

isPicture

public boolean isPicture()
Method used to determine if object is a picture

Returns:
true if picture, else false

isMusic

public boolean isMusic()
Method used to determine if object is a music file

Returns:
true if music file, else false

getThumbnail

public javax.swing.ImageIcon getThumbnail()
Return a thumbnail version of the album object if it is a picture file

Returns:
thumbnail version of the album object

getImage

public javax.swing.ImageIcon getImage()
Return the image of this album object (if it's a picture)

Returns:
image of this album object if picture; otherwise null

equals

public boolean equals(AlbumObject x)
Compares album object to x to see if they share the same file path

Parameters:
x - album object to compare to
Returns:
true if the same, else false