|
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 java.lang.String |
ALLOW_BROWSE
Attribute key that controls whether editors should display an item to browse for images. |
static java.lang.String |
ALLOW_EMPTY_IMAGE
Attribute key that controls whether empty ( null ) image values can be selected through the editor. |
static java.lang.String |
ATTRIBUTE_FILE_CHOOSER
Attribute key used to store a pre-configured instance of JFileChooser to be used by editors. |
static java.lang.String |
ATTRIBUTE_LISTCELL_RENDERER
Attribute key to register a customized renderer instance for list and table cell views |
static java.lang.String |
ATTRIBUTE_SHOW_URL
Attribute key that controls whether or not the image URL should be displayed in the editor in addition to the actual image. |
static java.lang.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(java.lang.String name,
ImageOptionItem.ImageProvider initialImageURLs,
java.lang.Object value)
Creates a new instance of ImageOptionItem. |
|
ImageOptionItem(java.lang.String name,
java.lang.Object value)
Creates a new instance of ImageOptionItem. |
Method Summary | |
---|---|
java.awt.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. |
java.lang.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. |
java.lang.String |
getType()
Returns "Object". |
java.lang.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(java.lang.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(java.lang.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 java.lang.String ATTRIBUTE_FILE_CHOOSER
JFileChooser
to be used by editors.
public static final java.lang.String ATTRIBUTE_LISTCELL_RENDERER
public static final java.lang.String ATTRIBUTE_SHOW_URL
true
.
public static final java.lang.String ALLOW_BROWSE
true
.
public static final java.lang.String ALLOW_EMPTY_IMAGE
null
) image values can be selected through the editor.
Default value is true
.
public static final java.lang.String AUTOUPDATE_IMAGELIST
false
.
Constructor Detail |
---|
public ImageOptionItem(java.lang.String name, ImageOptionItem.ImageProvider initialImageURLs, java.lang.Object value)
name
- the name of this itempublic ImageOptionItem(java.lang.String name, java.lang.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 java.lang.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(java.lang.Object value)
setValue
in class ObjectOptionItem
OptionItem.publishValue(Object)
public java.lang.Object getValue()
getValue
in class ObjectOptionItem
public java.awt.Image getImage()
Image
instance.
Image
instance, or null if the current value does not describe an image.public void setStringValue(java.lang.String value)
OptionItem
setStringValue
in class OptionItem
public java.lang.String getStringValue()
OptionItem
getStringValue
in class OptionItem
public boolean hasNoImageSet()
true
iff this item currently describes a valid image.
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |