Oxygen XML Editor 14.2 Author API

ro.sync.exml.workspace.api.options
Interface WSOptionsStorage


@API(type=NOT_EXTENDABLE,
     src=PUBLIC)
public interface WSOptionsStorage

Support for the user to save and retrieve custom options in the Oxygen common preferences.


Method Summary
 void addOptionListener(WSOptionListener listener)
          Adds an OptionListener to the current set of options.
 java.lang.String getOption(java.lang.String key, java.lang.String defaultValue)
          Provides the value of the option associated with the specified key.
 void removeOptionListener(WSOptionListener listener)
          Removes an option listener from the current set of option listeners.
 void setOption(java.lang.String key, java.lang.String value)
          Modifies the value of an option.
 

Method Detail

addOptionListener

void addOptionListener(WSOptionListener listener)
Adds an OptionListener to the current set of options. The listener is notified when the value of its associated option changes.

Parameters:
listener - The OptionListener to be added.

removeOptionListener

void removeOptionListener(WSOptionListener listener)
Removes an option listener from the current set of option listeners.

Parameters:
listener - The OptionListener to be removed.

getOption

java.lang.String getOption(java.lang.String key,
                           java.lang.String defaultValue)
Provides the value of the option associated with the specified key.

Parameters:
key - The key that uniquely identifies an option.
defaultValue - The default value for the specified option.
Returns:
The value of the specified option or the default value if the option has not been set yet.

setOption

void setOption(java.lang.String key,
               java.lang.String value)
Modifies the value of an option. If the supplied value is null The option will be removed from storage.

Parameters:
key - The key of the option whose value is to be modified.
value - The new value of the option. If null the option will be removed from the storage.

Oxygen XML Editor 14.2 Author API

© Copyright SyncRO Soft SRL 2002 - 2013. All rights reserved.