public abstract class Media extends Resource<com.google.gdata.data.photos.PhotoEntry> implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
java.awt.Image |
bufImage
|
protected boolean |
modified
|
Constructor and Description |
---|
Media(java.lang.String name,
java.lang.String path)
Creates a new Media with a name and a path to a file
|
Media(java.lang.String name,
java.lang.String path,
boolean refresh)
Creates a new Media with a name and a path to a file
|
Modifier and Type | Method and Description |
---|---|
com.google.gdata.data.photos.PhotoEntry |
getEntry()
Get the entry of the media
|
java.awt.Image |
getImage()
Get the Image object associated with this Media
|
boolean |
isModified()
Get if the file has been modified
|
void |
reloadImage()
Delete the buffer
|
void |
saveBufImage()
Save the buffer in a file or online
|
void |
setEntry(com.google.gdata.data.photos.PhotoEntry entry)
Set the entry of the media
|
void |
setMediaSource()
Set the media source of the media
It is the path to the file, useful for Picasa sync
Get the current resourcePath
|
void |
setMediaSource(com.google.gdata.data.media.MediaFileSource mediaSource)
Set the entry media source (path to the file)
|
void |
tmpSaveImage(java.awt.Image i)
Temporally save the image in a bugger
|
delete,
downloadTags,
getDescription,
getGeoLocation,
getId, getResourcePath,
getSerialEntry,
getStatus,
getTags, getThumbnailPath,
getTitle,
resetTags,
save, save,
setDescription,
setGeoLocation,
setId,
setResourcePath,
setSerialEntry,
setStatus,
setTags,
setThumbnailPath,
setTitle,
setTitle
public Media(java.lang.String name, java.lang.String path) throws java.net.URISyntaxException
name
- name of the mediapath
- path to the filejava.net.URISyntaxException
public Media(java.lang.String name, java.lang.String path, boolean refresh) throws java.net.URISyntaxException
name
- name of the mediapath
- path to the filerefresh
- refresh the media or notjava.net.URISyntaxException
public com.google.gdata.data.photos.PhotoEntry getEntry()
public void setEntry(com.google.gdata.data.photos.PhotoEntry entry)
public void setMediaSource()
public void setMediaSource(com.google.gdata.data.media.MediaFileSource mediaSource)
mediaSource
- source filepublic java.awt.Image getImage()
public void tmpSaveImage(java.awt.Image i)
i
- image to save in a bufferpublic void reloadImage()
public void saveBufImage()
public boolean isModified()