站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

OptionSupport (Editor Module) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.editor/3 1.32.0

org.netbeans.modules.editor.options
Class OptionSupport

java.lang.Object
  extended by org.openide.util.SharedClassObject
      extended by org.openide.options.SystemOption
          extended by org.netbeans.modules.editor.options.OptionSupport
All Implemented Interfaces:
Externalizable, Serializable, HelpCtx.Provider
Direct Known Subclasses:
BaseOptions, BasePrintOptions

public class OptionSupport
extends SystemOption

Options for the base editor kit

See Also:
Serialized Form

Constructor Summary
OptionSupport(Class kitClass, String typeName)
          Construct new option support.
 
Method Summary
 String displayName()
           
 void doSetSettingValue(String settingName, Object newValue, String propertyName)
           
 Class getKitClass()
           
protected  boolean getSettingBoolean(String settingName)
          Get the value of the boolean setting from the Settings
protected  int getSettingInteger(String settingName)
          Get the value of the integer setting from the Settings
protected  String getSettingsInitializerName()
          Get the name of the Settings.Initializer related to these options.
 Object getSettingValue(String settingName)
          Get the value of the setting from the Settings
protected  String getString(String s)
           
 String getTypeName()
           
static String getTypeName(Class kitClass)
           
static String[] mergeStringArrays(String[] a1, String[] a2)
          Helper method for merging string arrays without searching for the same strings.
protected  void setSettingBoolean(String settingName, boolean newValue, String propertyName)
          Enables easier handling of the boolean settings.
protected  void setSettingInteger(String settingName, int newValue, String propertyName)
          Enables easier handling of the integer settings.
 void setSettingValue(String settingName, Object newValue)
          Can be used when the settingName is the same as the propertyName
 void setSettingValue(String settingName, Object newValue, String propertyName)
          Set the value into the Settings and optionally fire the property change.
protected  void updateSettingsMap(Class kitClass, Map settingsMap)
           
 
Methods inherited from class org.openide.options.SystemOption
clearSharedData, firePropertyChange, getHelpCtx, getName, isReadExternal, isWriteExternal, readExternal, reset, writeExternal
 
Methods inherited from class org.openide.util.SharedClassObject
addNotify, addPropertyChangeListener, equals, finalize, findObject, findObject, getLock, getProperty, hashCode, initialize, putProperty, putProperty, removeNotify, removePropertyChangeListener, writeReplace
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptionSupport

public OptionSupport(Class kitClass,
                     String typeName)
Construct new option support. The pair [kitClass, typeName] is put into a map so it's possible to find a typeName when kitClass is known through getTypeName() static method.

Parameters:
kitClass - class of the editorr kit for which this support is constructed.
typeName - name
Method Detail

getKitClass

public Class getKitClass()

getTypeName

public String getTypeName()

getTypeName

public static String getTypeName(Class kitClass)

displayName

public String displayName()
Specified by:
displayName in class SystemOption

getSettingValue

public Object getSettingValue(String settingName)
Get the value of the setting from the Settings

Parameters:
settingName - name of the setting to get.

getSettingBoolean

protected final boolean getSettingBoolean(String settingName)
Get the value of the boolean setting from the Settings

Parameters:
settingName - name of the setting to get.

getSettingInteger

protected final int getSettingInteger(String settingName)
Get the value of the integer setting from the Settings

Parameters:
settingName - name of the setting to get.

setSettingValue

public void setSettingValue(String settingName,
                            Object newValue)
Can be used when the settingName is the same as the propertyName


setSettingValue

public void setSettingValue(String settingName,
                            Object newValue,
                            String propertyName)
Set the value into the Settings and optionally fire the property change.

Parameters:
settingName - name of the setting to change
newValue - new value of the setting
propertyName - if non-null it means that the property change should be fired if the newValue is differernt from the old one. Firing is performed using the given property name. Nothing is fired when it's set to null.

doSetSettingValue

public void doSetSettingValue(String settingName,
                              Object newValue,
                              String propertyName)

setSettingBoolean

protected void setSettingBoolean(String settingName,
                                 boolean newValue,
                                 String propertyName)
Enables easier handling of the boolean settings.

Parameters:
settingName - name of the setting to change
newValue - new boolean value of the setting
propertyName - if non-null it means that the property change should be fired if the newValue is differernt from the old one. Firing is performed using the given property name. Nothing is fired when it's set to null.

setSettingInteger

protected void setSettingInteger(String settingName,
                                 int newValue,
                                 String propertyName)
Enables easier handling of the integer settings.

Parameters:
settingName - name of the setting to change
newValue - new integer value of the setting
propertyName - if non-null it means that the property change should be fired if the newValue is differernt from the old one. Firing is performed using the given property name. Nothing is fired when it's set to null.

getString

protected String getString(String s)
Returns:
localized string

mergeStringArrays

public static String[] mergeStringArrays(String[] a1,
                                         String[] a2)
Helper method for merging string arrays without searching for the same strings.

Parameters:
a1 - array that will be at the begining of the resulting array
a1 - array that will be at the end of the resulting array

getSettingsInitializerName

protected String getSettingsInitializerName()
Get the name of the Settings.Initializer related to these options.


updateSettingsMap

protected void updateSettingsMap(Class kitClass,
                                 Map settingsMap)

org.netbeans.modules.editor/3 1.32.0

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.