org.netbeans.modules.editor.settings.storage/1 1.19

org.netbeans.modules.editor.settings.storage.api
Class EditorSettings

java.lang.Object
  extended by org.netbeans.modules.editor.settings.storage.api.EditorSettings

public abstract class EditorSettings
extends Object

This singleton class contains access methods for editor settings like font & colors profiles and keymaps.


Field Summary
static String PROP_CURRENT_FONT_COLOR_PROFILE
          Property name constant.
static String PROP_CURRENT_KEY_MAP_PROFILE
          Property name constant.
static String PROP_DEFAULT_FONT_COLORS
          Deprecated. This has always been meant for internal use only. As per general contract clients should listen on mime type specific Lookup for changes in editor settings.
static String PROP_EDITOR_FONT_COLORS
          Deprecated. This has always been meant for internal use only. As per general contract clients should listen on mime type specific Lookup for changes in editor settings.
 
Constructor Summary
EditorSettings()
           
 
Method Summary
abstract  void addPropertyChangeListener(PropertyChangeListener l)
          PropertyChangeListener registration.
abstract  void addPropertyChangeListener(String propertyName, PropertyChangeListener l)
          PropertyChangeListener registration.
abstract  Set<String> getAllMimeTypes()
          Gets all top level mime types registered under the Editors/ folder.
abstract  String getCurrentFontColorProfile()
          Returns name of current font & colors profile.
abstract  String getCurrentKeyMapProfile()
          Returns name of current keymap profile.
static EditorSettings getDefault()
          Returns default instance of EditorSettings.
abstract  Collection<AttributeSet> getDefaultFontColorDefaults(String profile)
          Deprecated. Use getFontColorSettings(new String[0]).getAllFontColorsDefaults(profile) instead.
abstract  Collection<AttributeSet> getDefaultFontColors(String profile)
          Deprecated. Use getFontColorSettings(new String[0]).getAllFontColors(profile) instead.
abstract  Set<String> getFontColorProfiles()
          Returns set of font & colors profiles.
abstract  FontColorSettingsFactory getFontColorSettings(String[] mimeTypes)
          Returns FontColorSettings for given mimetypes.
abstract  Map<String,AttributeSet> getHighlightingDefaults(String profile)
          Returns defaults for highlighting properties for given profile, or null if the profile is not known.
abstract  Map<String,AttributeSet> getHighlightings(String profile)
          Returns highlighting properties for given profile or null, if the profile is not known.
abstract  KeyBindingSettingsFactory getKeyBindingSettings(String[] mimeTypes)
          Returns KeyBindingSettings for given mimetypes.
abstract  Set<String> getKeyMapProfiles()
          Returns set of keymap profiles.
abstract  String getLanguageName(String mimeType)
          Returns name of language for given mime type.
abstract  Set<String> getMimeTypes()
          Returns set of mimetypes.
abstract  boolean isCustomFontColorProfile(String profile)
          Returns true for user defined profile.
abstract  boolean isCustomKeymapProfile(String profile)
          Returns true for user defined profile.
abstract  void removePropertyChangeListener(PropertyChangeListener l)
          PropertyChangeListener registration.
abstract  void removePropertyChangeListener(String propertyName, PropertyChangeListener l)
          PropertyChangeListener registration.
abstract  void setCurrentFontColorProfile(String profile)
          Sets current font & colors profile.
abstract  void setCurrentKeyMapProfile(String profile)
          Sets current keymap profile.
abstract  void setDefaultFontColors(String profile, Collection<AttributeSet> fontColors)
          Deprecated. Use getFontColorSettings(new String[0]).setAllFontColors(profile, fontColors) instead.
abstract  void setHighlightings(String profile, Map<String,AttributeSet> highlightings)
          Sets highlighting properties for given profile.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_CURRENT_FONT_COLOR_PROFILE

public static final String PROP_CURRENT_FONT_COLOR_PROFILE
Property name constant.

See Also:
Constant Field Values

PROP_DEFAULT_FONT_COLORS

public static final String PROP_DEFAULT_FONT_COLORS
Deprecated. This has always been meant for internal use only. As per general contract clients should listen on mime type specific Lookup for changes in editor settings.
The name of the property change event for 'All Languages' font and colors.

See Also:
Constant Field Values

PROP_EDITOR_FONT_COLORS

public static final String PROP_EDITOR_FONT_COLORS
Deprecated. This has always been meant for internal use only. As per general contract clients should listen on mime type specific Lookup for changes in editor settings.
The name of the property change event for 'Highlighting' font and colors.


PROP_CURRENT_KEY_MAP_PROFILE

public static final String PROP_CURRENT_KEY_MAP_PROFILE
Property name constant.

See Also:
Constant Field Values
Constructor Detail

EditorSettings

public EditorSettings()
Method Detail

getDefault

public static EditorSettings getDefault()
Returns default instance of EditorSettings.

Returns:
default instance of EditorSettings

getAllMimeTypes

public abstract Set<String> getAllMimeTypes()
Gets all top level mime types registered under the Editors/ folder.

Returns:
set of mimetypes
Since:
1.9

getMimeTypes

public abstract Set<String> getMimeTypes()
Returns set of mimetypes. The set contains only mime types that have coloring.xml defined in the default profile.

Returns:
set of mimetypes

getLanguageName

public abstract String getLanguageName(String mimeType)
Returns name of language for given mime type.

Parameters:
mimeType - The mime type to translate.
Returns:
name of language for given mime type

getFontColorProfiles

public abstract Set<String> getFontColorProfiles()
Returns set of font & colors profiles.

Returns:
set of font & colors profiles

isCustomFontColorProfile

public abstract boolean isCustomFontColorProfile(String profile)
Returns true for user defined profile.

Parameters:
profile - a profile name
Returns:
true for user defined profile

getCurrentFontColorProfile

public abstract String getCurrentFontColorProfile()
Returns name of current font & colors profile.

Returns:
name of current font & colors profile

setCurrentFontColorProfile

public abstract void setCurrentFontColorProfile(String profile)
Sets current font & colors profile.

Parameters:
profile - a profile name

getDefaultFontColors

public abstract Collection<AttributeSet> getDefaultFontColors(String profile)
Deprecated. Use getFontColorSettings(new String[0]).getAllFontColors(profile) instead.

Returns font & color defaults for given profile or null, if the profile is unknown .

Parameters:
profile - a profile name
Returns:
font & color defaults for given profile or null

getDefaultFontColorDefaults

public abstract Collection<AttributeSet> getDefaultFontColorDefaults(String profile)
Deprecated. Use getFontColorSettings(new String[0]).getAllFontColorsDefaults(profile) instead.

Returns default values for font & color defaults for given profile or null, if the profile is unknown.

Parameters:
profile - a profile name
Returns:
font & color defaults for given profile or null

setDefaultFontColors

public abstract void setDefaultFontColors(String profile,
                                          Collection<AttributeSet> fontColors)
Deprecated. Use getFontColorSettings(new String[0]).setAllFontColors(profile, fontColors) instead.

Sets font & color defaults for given profile.

Parameters:
profile - a profile name
fontColors - font & color defaults to be used

getHighlightings

public abstract Map<String,AttributeSet> getHighlightings(String profile)
Returns highlighting properties for given profile or null, if the profile is not known.

Parameters:
profile - a profile name
Returns:
highlighting properties for given profile or null

getHighlightingDefaults

public abstract Map<String,AttributeSet> getHighlightingDefaults(String profile)
Returns defaults for highlighting properties for given profile, or null if the profile is not known.

Parameters:
profile - a profile name
Returns:
highlighting properties for given profile or null

setHighlightings

public abstract void setHighlightings(String profile,
                                      Map<String,AttributeSet> highlightings)
Sets highlighting properties for given profile.

Parameters:
profile - a profile name
highlightings - a highlighting properties to be used

getFontColorSettings

public abstract FontColorSettingsFactory getFontColorSettings(String[] mimeTypes)
Returns FontColorSettings for given mimetypes.

Parameters:
mimeTypes - The mime path to get the settings for.
Returns:
FontColorSettings for given mimetypes

getKeyBindingSettings

public abstract KeyBindingSettingsFactory getKeyBindingSettings(String[] mimeTypes)
Returns KeyBindingSettings for given mimetypes.

Parameters:
mimeTypes - The mime path to get the settings for.
Returns:
KeyBindingSettings for given mimetypes

getKeyMapProfiles

public abstract Set<String> getKeyMapProfiles()
Returns set of keymap profiles.

Returns:
set of font & colors profiles

isCustomKeymapProfile

public abstract boolean isCustomKeymapProfile(String profile)
Returns true for user defined profile.

Parameters:
profile - a profile name
Returns:
true for user defined profile

getCurrentKeyMapProfile

public abstract String getCurrentKeyMapProfile()
Returns name of current keymap profile.

Returns:
name of current keymap profile

setCurrentKeyMapProfile

public abstract void setCurrentKeyMapProfile(String profile)
Sets current keymap profile.

Parameters:
profile - a profile name

addPropertyChangeListener

public abstract void addPropertyChangeListener(PropertyChangeListener l)
PropertyChangeListener registration.

Parameters:
l - a PropertyChangeListener to be registerred

removePropertyChangeListener

public abstract void removePropertyChangeListener(PropertyChangeListener l)
PropertyChangeListener registration.

Parameters:
l - a PropertyChangeListener to be unregisterred

addPropertyChangeListener

public abstract void addPropertyChangeListener(String propertyName,
                                               PropertyChangeListener l)
PropertyChangeListener registration.

Parameters:
propertyName - The name of the property to listen on.
l - a PropertyChangeListener to be registerred

removePropertyChangeListener

public abstract void removePropertyChangeListener(String propertyName,
                                                  PropertyChangeListener l)
PropertyChangeListener registration.

Parameters:
propertyName - The name of the property to listen on.
l - a PropertyChangeListener to be unregisterred

org.netbeans.modules.editor.settings.storage/1 1.19

Built on December 3 2008.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.