|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectgriffon.coverflow.ui.ImageFlowItem
public class ImageFlowItem extends Object
Defines an item that can be displayed in an ImageFlow.
Provides lazy-loading capabilities of images.
| Nested Class Summary | |
|---|---|
private static class |
ImageFlowItem.FileLazyImageLoader
|
private static class |
ImageFlowItem.ImageLazyImageLoader
|
private static class |
ImageFlowItem.InputStreamLazyImageLoader
|
private static class |
ImageFlowItem.LazyImageLoader
|
static class |
ImageFlowItem.Resource
Helper class to locate classpath resources. |
private static class |
ImageFlowItem.ResourceLazyImageLoader
|
private static class |
ImageFlowItem.URLLazyImageLoader
|
| Field Summary | |
|---|---|
private ImageFlowItem.LazyImageLoader |
imageLoader
|
private String |
label
|
| Constructor Summary | |
ImageFlowItem(ImageFlowItem.Resource resource)
Creates a new item using a classpath |
|
ImageFlowItem(ImageFlowItem.Resource resource, String label)
Creates a new item using a classpath |
|
ImageFlowItem(Image image)
Creates a new item using an |
|
ImageFlowItem(Image image, String label)
Creates a new item using an |
|
ImageFlowItem(String fileName)
Creates a new item using a |
|
ImageFlowItem(String fileName, String label)
Creates a new item using a |
|
ImageFlowItem(File file)
Creates a new item using a |
|
ImageFlowItem(File file, String label)
Creates a new item using a |
|
ImageFlowItem(InputStream is)
Creates a new item using an |
|
ImageFlowItem(InputStream is, String label)
Creates a new item using an |
|
ImageFlowItem(URL url)
Creates a new item using an |
|
ImageFlowItem(URL url, String label)
Creates a new item using an |
|
private ImageFlowItem(ImageFlowItem.LazyImageLoader imageLoader, String label)
|
|
| Method Summary | |
|---|---|
Image
|
getImage()
Returns the |
String
|
getLabel()
Returns the item's label. |
static List
|
loadFromDirectory(File directory)
Builds a list of |
String
|
toString()
|
| Methods inherited from class Object | |
|---|---|
| wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
| Field Detail |
|---|
private final ImageFlowItem.LazyImageLoader imageLoader
private final String label
| Constructor Detail |
|---|
public ImageFlowItem(ImageFlowItem.Resource resource)
Resource as
image source, and "" as label.
resource - a classpath Resource pointing to
an image that can be loaded with ImageIO.
public ImageFlowItem(ImageFlowItem.Resource resource, String label)
Resource as
image source, and the provided label.
resource - a classpath Resource pointing to
an image that can be loaded with ImageIO.label - a non-null String.
public ImageFlowItem(Image image)
Image as
image source, and "" as label.
image - an Image object.
public ImageFlowItem(Image image, String label)
Image as
image source, and the provided label.
image - an Image object.label - a non-null String.
public ImageFlowItem(String fileName)
String pointing to a
filename as image source, and "" as label.
fileName - a fileName pointing to
an image that can be loaded with ImageIO.
public ImageFlowItem(String fileName, String label)
String pointing to a
filename as image source, and the provided label.
fileName - a fileName pointing to
an image that can be loaded with ImageIO.label - a non-null String.
public ImageFlowItem(File file)
File as
image source, and "" as label.
file - a file pointing to an image that can be loaded
with ImageIO.
public ImageFlowItem(File file, String label)
File as
image source, and the provided label.
file - a file pointing to an image that can be loaded
with ImageIO.label - a non-null String.
public ImageFlowItem(InputStream is)
InputStream as
image source, and "" as label.
is - an inputStream pointing to an image that can be loaded
with ImageIO.
public ImageFlowItem(InputStream is, String label)
InputStream as
image source, and the provided label.
is - an inputStream pointing to an image that can be loaded
with ImageIO.label - a non-null String.
public ImageFlowItem(URL url)
URL as
image source, and "" as label.
url - an url pointing to an image that can be loaded
with ImageIO.
public ImageFlowItem(URL url, String label)
URL as
image source, and the provided label.
url - an url pointing to an image that can be loaded
with ImageIO.label - a non-null String.
private ImageFlowItem(ImageFlowItem.LazyImageLoader imageLoader, String label)
| Method Detail |
|---|
public Image getImage()
Image of this item.If the image is not loaded then it will atempt loading it from its source.
Image.
public String getLabel()
public static List loadFromDirectory(File directory)
ImageFlowItems, one per each file
in directory
directory - a File that contains image files.
de public public String toString()
Groovy Documentation