当前页面:
在线文档首页 >
NetBeans API Javadoc (Current Development Version)
Settings.Evaluator (Editor Library) - NetBeans API Javadoc (Current Development Version)
org.netbeans.editor
Interface Settings.Evaluator
- All Known Implementing Classes:
- SettingsUtil.FontStylePrintColoringEvaluator, SettingsUtil.ForeColorPrintColoringEvaluator, SettingsUtil.PrintColoringEvaluator, SettingsUtil.TokenColoringEvaluator
- Enclosing class:
- Settings
public static interface Settings.Evaluator
Evaluator can be used in cases when value of some setting
depends on the value for other setting and it allows to compute
the value dynamically based on the other setting(s) value.
The Evaluator instance can be used as the value
in the Settings.setValue() call. In that case the call
to the Settings.getValue() call will 'evaluate' the Evaluator
by calling its getValue().
getValue
Object getValue(Class kitClass,
String settingName)
- Compute the particular setting's value.
- Parameters:
kitClass
- kit class for which the setting is being retrieved.settingName
- name of the setting to retrieve. Although the Evaluator
are usually constructed only for the concrete setting, this parameter
allows creation of the Evaluator for multiple settings.
- Returns:
- the value for the requested setting. The substitution
is not attempted again, so the return value cannot be another
Evaluator instance. If the returned value is null, the same
action is taken as if there would no value set on the particular
kit level.