|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pivot.wtk.Component
org.apache.pivot.wtk.ImageView
@DefaultProperty(value="image") public class ImageView
Component that displays an image.
Nested Class Summary | |
---|---|
static interface |
ImageView.ImageBindMapping
Translates between image and context data during data binding. |
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component |
---|
Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary |
Constructor Summary | |
---|---|
ImageView()
Creates an empty image view. |
|
ImageView(Image image)
Creates an image view with the given image. |
Method Summary | |
---|---|
void |
clear()
Clears any bound values in the component. |
void |
clearImage()
Force a reset of the image (and its listeners). |
Image |
getImage()
Returns the image view's current image. |
ImageView.ImageBindMapping |
getImageBindMapping()
|
BindType |
getImageBindType()
|
String |
getImageKey()
Returns the image view's image key. |
ListenerList<ImageViewBindingListener> |
getImageViewBindingListeners()
Returns the image view binding listener list. |
ListenerList<ImageViewListener> |
getImageViewListeners()
Returns the image view listener list. |
boolean |
isAsynchronous()
Returns the image view's asynchronous flag. |
void |
load(Object context)
Copies bound values from the bind context to the component. |
void |
setAsynchronous(boolean asynchronous)
Sets the image view's asynchronous flag. |
void |
setImage(Image image)
Sets the image view's current image. |
void |
setImage(String imageName)
Sets the image view's image by resource name. |
void |
setImage(URL imageURL)
Sets the image view's current image by URL. |
void |
setImageBindMapping(ImageView.ImageBindMapping imageBindMapping)
|
void |
setImageBindType(BindType imageBindType)
|
void |
setImageKey(String imageKey)
Sets the image view's image key. |
void |
store(Object context)
Copies bound values from the component to the bind context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ImageView()
public ImageView(Image image)
image
- The initial image to set, or null for no image.Method Detail |
---|
public Image getImage()
public void setImage(Image image)
image
- The image to set, or null for no image.public final void setImage(URL imageURL)
If the icon already exists in the application context resource cache, the cached value will be used. Otherwise, the icon will be loaded synchronously and added to the cache.
imageURL
- The location of the image to set.public final void setImage(String imageName)
imageName
- The resource name of the image to set.setImage(URL)
public boolean isAsynchronous()
public void setAsynchronous(boolean asynchronous)
asynchronous
- true if images specified via URL will be loaded in the background;
false if they will be loaded synchronously.public String getImageKey()
public void setImageKey(String imageKey)
imageKey
- The image key, or null to clear the binding.public BindType getImageBindType()
public void setImageBindType(BindType imageBindType)
public ImageView.ImageBindMapping getImageBindMapping()
public void setImageBindMapping(ImageView.ImageBindMapping imageBindMapping)
public void load(Object context)
Component
load
in class Component
public void store(Object context)
Component
store
in class Component
public void clear()
Component
clear
in class Component
public ListenerList<ImageViewListener> getImageViewListeners()
public ListenerList<ImageViewBindingListener> getImageViewBindingListeners()
public void clearImage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |