y.option
Class IconOptionItem

java.lang.Object
  extended by y.option.OptionItem
      extended by y.option.ObjectOptionItem
          extended by y.option.IconOptionItem
All Implemented Interfaces:
BackupValueOwner, PropertyChangeReporter, VetoableChangeReporter

public class IconOptionItem
extends ObjectOptionItem

 

Nested Class Summary
static interface IconOptionItem.IconProvider
           
 
Field Summary
static String ALLOW_BROWSE
           
static String ALLOW_EMPTY_ICON
           
static String ATTRIBUTE_LISTCELL_RENDERER
           
static String AUTOUPDATE_ICONLIST
           
static String CUSTOM_FILE_FILTER
           
 
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
IconOptionItem(String name, IconOptionItem.IconProvider initialIconURLs, Object value)
          Creates a new instance of IconOptionItem.
 
Method Summary
 void addAvailableIcon(Icon icon, URL url)
           
 Icon getIcon()
           
 IconOptionItem.IconProvider getIconProvider()
           
 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 noIconSet()
           
 void setAvailableIconURLs(IconOptionItem.IconProvider availableIconURLs)
           
 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 y.option.OptionItem
addEditor, addEditorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, adoptEditorValue, checkEditorValue, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getAttribute, getClassType, getEditor, getEditor, getEditors, getName, getTipText, isEnabled, isValueUndefined, publishEnabled, publishValue, publishValueUndefined, removeAttribute, removeEditor, removeEditorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener, setAttribute, setClassType, setEnabled, setTipText, setValueUndefined, wantsVisibleName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIBUTE_LISTCELL_RENDERER

public static final String ATTRIBUTE_LISTCELL_RENDERER
See Also:
Constant Field Values

ALLOW_BROWSE

public static final String ALLOW_BROWSE
See Also:
Constant Field Values

ALLOW_EMPTY_ICON

public static final String ALLOW_EMPTY_ICON
See Also:
Constant Field Values

AUTOUPDATE_ICONLIST

public static final String AUTOUPDATE_ICONLIST
See Also:
Constant Field Values

CUSTOM_FILE_FILTER

public static final String CUSTOM_FILE_FILTER
See Also:
Constant Field Values
Constructor Detail

IconOptionItem

public IconOptionItem(String name,
                      IconOptionItem.IconProvider initialIconURLs,
                      Object value)
Creates a new instance of IconOptionItem.

Parameters:
name - the name of this item
Method Detail

setAvailableIconURLs

public void setAvailableIconURLs(IconOptionItem.IconProvider availableIconURLs)

getType

public String getType()
Description copied from class: ObjectOptionItem
Returns "Object".

Overrides:
getType in class ObjectOptionItem

getIconProvider

public IconOptionItem.IconProvider getIconProvider()

addAvailableIcon

public void addAvailableIcon(Icon icon,
                             URL url)

setValue

public void setValue(Object value)
Sets the value of this item.

Overrides:
setValue in class ObjectOptionItem
See Also:
OptionItem.publishValue(Object)

getValue

public Object getValue()
Returns the value of this item.

Overrides:
getValue in class ObjectOptionItem

getIcon

public Icon getIcon()

setStringValue

public void setStringValue(String value)
Description copied from class: OptionItem
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.

Overrides:
setStringValue in class OptionItem

getStringValue

public String getStringValue()
Description copied from class: OptionItem
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.

Overrides:
getStringValue in class OptionItem

noIconSet

public boolean noIconSet()

© Copyright 2000-2008,
yWorks GmbH.
All rights reserved.