|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.option.OptionItem y.option.ObjectOptionItem y.option.ImageOptionItem
public class ImageOptionItem
OptionItem implementation for Image values which allows for specification of an image universe. By default, the Editor for this item displays a popup menu where values can be chosen or selected through a file browser.
Nested Class Summary | |
---|---|
static interface |
ImageOptionItem.ImageProvider
Utility interface that serves as "universe" of available image descriptions. |
Field Summary | |
---|---|
static String |
ALLOW_BROWSE
Attribute key that controls whether editors should display an item to browse for images. |
static String |
ALLOW_EMPTY_IMAGE
Attribute key that controls whether empty ( null ) image values can be selected through the editor. |
static String |
ATTRIBUTE_LISTCELL_RENDERER
Attribute key to register a customized renderer instance for list and table cell views |
static String |
AUTOUPDATE_IMAGELIST
Attribute key that controls whether the list of available image values should be automatically updated when an image has been selected through the browser. |
Fields inherited from class y.option.OptionItem |
---|
ATTRIBUTE_CONTEXT, ATTRIBUTE_GROUPS, ATTRIBUTE_LONG_DESCRIPTION, COLOR_UNDEFINED, name, PROPERTY_CLASS_TYPE, PROPERTY_ENABLED, PROPERTY_TIP_TEXT, PROPERTY_VALUE, PROPERTY_VALUE_UNDEFINED, UNDEFINED |
Constructor Summary | |
---|---|
ImageOptionItem(String name,
ImageOptionItem.ImageProvider initialImageURLs,
Object value)
Creates a new instance of ImageOptionItem. |
|
ImageOptionItem(String name,
Object value)
Creates a new instance of ImageOptionItem. |
Method Summary | |
---|---|
Image |
getImage()
Returns the current value of this item as an Image instance. |
ImageOptionItem.ImageProvider |
getImageProvider()
Gets the currently registered ImageOptionItem.ImageProvider instance for this item. |
String |
getStringValue()
Returns the stringified value of this option item if the classType property is set, it uses the y.util.ObjectStringConversion class to perform its task, otherwise it will return null. |
String |
getType()
Returns "Object". |
Object |
getValue()
Returns the value of this item. |
boolean |
hasNoImageSet()
Check whether the item contains a valid image value |
void |
setImageProvider(ImageOptionItem.ImageProvider availableImageURLs)
Register an ImageOptionItem.ImageProvider instance that provides a collection of images that can be chosen through this item. |
void |
setStringValue(String value)
Sets the stringified value of this option item if the classType property is set, it uses the y.util.ObjectStringConversion class to perform its task, otherwise it will return null. |
void |
setValue(Object value)
Sets the value of this item. |
Methods inherited from class y.option.ObjectOptionItem |
---|
getBackupValue, resetValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ATTRIBUTE_LISTCELL_RENDERER
public static final String ALLOW_BROWSE
true
.
public static final String ALLOW_EMPTY_IMAGE
null
) image values can be selected through the editor.
Default value is true
.
public static final String AUTOUPDATE_IMAGELIST
false
.
Constructor Detail |
---|
public ImageOptionItem(String name, ImageOptionItem.ImageProvider initialImageURLs, Object value)
name
- the name of this itempublic ImageOptionItem(String name, Object value)
name
- the name of this itemMethod Detail |
---|
public void setImageProvider(ImageOptionItem.ImageProvider availableImageURLs)
ImageOptionItem.ImageProvider
instance that provides a collection of images that can be chosen through this item.
availableImageURLs
- The provider instance that provides the list of available images.getImageProvider()
public String getType()
ObjectOptionItem
getType
in class ObjectOptionItem
public ImageOptionItem.ImageProvider getImageProvider()
ImageOptionItem.ImageProvider
instance for this item.
setImageProvider(y.option.ImageOptionItem.ImageProvider)
public void setValue(Object value)
setValue
in class ObjectOptionItem
OptionItem.publishValue(Object)
public Object getValue()
getValue
in class ObjectOptionItem
public Image getImage()
Image
instance.
Image
instance, or null if the current value does not describe an image.public void setStringValue(String value)
OptionItem
setStringValue
in class OptionItem
public String getStringValue()
OptionItem
getStringValue
in class OptionItem
public boolean hasNoImageSet()
true
iff this item currently describes a valid image.
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |