|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.google.wave.api.BlipContent
com.google.wave.api.Element
com.google.wave.api.Image
public class Image
Represents an image within a Wave. The image can either refer to an external resource or a Wave attachment. An external image is defined by the 'url' property, while the Wave attachment is defined by the 'attachmentId' property.
| Field Summary | |
|---|---|
static java.lang.String |
ATTACHMENT_ID
|
static java.lang.String |
CAPTION
|
static java.lang.String |
HEIGHT
|
static java.lang.String |
URL
|
static java.lang.String |
WIDTH
|
| Constructor Summary | |
|---|---|
Image()
Constructs an empty image. |
|
Image(java.util.Map<java.lang.String,java.lang.String> properties)
Constructs an image with a given set of properties. |
|
Image(java.lang.String url,
int width,
int height,
java.lang.String caption)
Constructs an external image given a url, image dimensions, and a caption. |
|
Image(java.lang.String attachmentId,
java.lang.String caption)
Constructs a Wave image given an attachment id and a caption. |
|
| Method Summary | |
|---|---|
java.lang.String |
getAttachmentId()
Returns the attachmentId for the image. |
java.lang.String |
getCaption()
Returns the caption for the image. |
int |
getHeight()
Returns the fixed height of the image. |
java.lang.String |
getUrl()
Returns the URL for the image. |
int |
getWidth()
Returns the fixed width of the image. |
static Restriction |
restrictByAttachmentId(java.lang.String attachmentId)
Creates an instance of Restriction that can be used to search for
image with the given attachment id. |
static Restriction |
restrictByCaption(java.lang.String caption)
Creates an instance of Restriction that can be used to search for
image with the given caption. |
static Restriction |
restrictByHeight(int height)
Creates an instance of Restriction that can be used to search for
image with the given height. |
static Restriction |
restrictByUrl(java.lang.String url)
Creates an instance of Restriction that can be used to search for
image with the given URL. |
static Restriction |
restrictByWidth(int width)
Creates an instance of Restriction that can be used to search for
image with the given width. |
void |
setAttachmentId(java.lang.String attachmentId)
Sets the attacmentId for the Wave image. |
void |
setCaption(java.lang.String caption)
Sets the caption for the image. |
void |
setHeight(int height)
Sets the fixed height of the image to be displayed. |
void |
setUrl(java.lang.String url)
Changes the URL for the image to the given url. |
void |
setWidth(int width)
Sets the fixed width of the image to be displayed. |
| Methods inherited from class com.google.wave.api.Element |
|---|
getProperties, getProperty, getProperty, getText, getType, isAttachment, isFormElement, isGadget, isImage, isInlineBlip, setProperty, toString |
| Methods inherited from class com.google.wave.api.BlipContent |
|---|
asElement, asPlaintext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ATTACHMENT_ID
public static final java.lang.String CAPTION
public static final java.lang.String HEIGHT
public static final java.lang.String URL
public static final java.lang.String WIDTH
| Constructor Detail |
|---|
public Image()
public Image(java.util.Map<java.lang.String,java.lang.String> properties)
properties - the properties of the image.
public Image(java.lang.String attachmentId,
java.lang.String caption)
attachmentId - the attachment id of the wave image.caption - the caption for the image.
public Image(java.lang.String url,
int width,
int height,
java.lang.String caption)
url - the url for the external image.width - the width of the image.height - the height of the image.caption - the caption for the image.| Method Detail |
|---|
public java.lang.String getUrl()
public void setUrl(java.lang.String url)
url - the new image url.public void setWidth(int width)
width - the fixed width of the image.public int getWidth()
java.lang.IllegalStateException - if no width was specified.public void setHeight(int height)
height - the fixed height of the image.public int getHeight()
java.lang.IllegalStateException - if no height was specified.public void setAttachmentId(java.lang.String attachmentId)
attachmentId - the attachment id for the image.public java.lang.String getAttachmentId()
public void setCaption(java.lang.String caption)
caption - the caption to display for the image.public java.lang.String getCaption()
public static Restriction restrictByAttachmentId(java.lang.String attachmentId)
Restriction that can be used to search for
image with the given attachment id.
attachmentId - the attachment id to filter.
Restriction.public static Restriction restrictByCaption(java.lang.String caption)
Restriction that can be used to search for
image with the given caption.
caption - the caption to filter.
Restriction.public static Restriction restrictByUrl(java.lang.String url)
Restriction that can be used to search for
image with the given URL.
url - the URL to filter.
Restriction.public static Restriction restrictByWidth(int width)
Restriction that can be used to search for
image with the given width.
width - the width to filter.
Restriction.public static Restriction restrictByHeight(int height)
Restriction that can be used to search for
image with the given height.
height - the height to filter.
Restriction.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||