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

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

org.netbeans.modules.editor/3 1.32.0

org.netbeans.modules.editor.options
Class OptionUtilities

java.lang.Object
  extended by org.netbeans.modules.editor.options.OptionUtilities

public class OptionUtilities
extends Object

Various utilities for Editor Options.

Since:
08/2001

Field Summary
static String DEFAULT_FOLDER
           
 
Method Summary
static List arrangeMergedFolderObjects(Set items, Set attribs)
          Provides ordering of folder items in accordance with folder attributes
static List arrangeMergedPopup(Set items, Set attribs)
          Provides sorting of merged popup elements according to sort instructions in folder attribs
static String color2String(Color c)
          Converts Color to hexadecimal String representation
static String dimensionToString(Dimension dim)
          Coverts Insets to String representation
static int getFontStyle(String s)
          Decodes font style from string representation
static List getGlobalAttribs(String folderName)
          Gets a list of attributes defined in BaseOptions.BASE MultiPropertyFolder
static List getGlobalMenuItems(String folderName)
          Retrieves a list of BaseOptions.BASE MultiPropertyFolder items
static List getGlobalPopupAttribs()
          Gets attributes of base popup folder
static List getGlobalPopupMenuItems()
          Gets popup menu items (DataObjects) stored in base popup folder
static Map getMapDiff(Map oldMap, Map newMap, boolean allowNewKeys)
          Gets changed values of newMap against the oldMap.
static List getPopupStrings(List popup)
           
static List getPopupStrings(List popup, boolean addSeparatorInstance)
          Creates String representation of popup from DO representation
static String insetsToString(Insets ins)
          Coverts Insets to String representation
static String keysToString(KeyStroke[] stroke)
          Creates textual representation of KeyStroke[].
static String keyToString(KeyStroke stroke)
          Creates textual representation of KeyStroke.
static Map makeKeyBindingsMap(List propList)
          Converts KeyBings List to KeyBindings Map Map.key is the textual representation of keystroke(s)
static Dimension parseDimension(String s)
          Converts textual representation of Insets
static Insets parseInsets(String s)
          Converts textual representation of Insets
static void printDefaultAbbrevs(Map map)
           
static void printDefaultAbbrevs(Map map, FileObject file)
          Prints given Abbreviations Map to XML file with given FO
static void printDefaultKeyBindings(List list, FileObject file)
          Prints given KeyBindings List to XML file with given FO
static void printDefaultMacros(Map map, FileObject file)
          Prints given Macro Map to XML file with given FO
static Color string2Color(String s)
          Converts a String to an integer and returns the specified opaque Color.
static int string2Int(String s)
          Converts String to integer
static KeyStroke stringToKey(String s)
          Converts textual representatin of Keystroke
static KeyStroke[] stringToKeys(String s)
          Converts textual representatin of Keystroke[]
static String style2String(int i)
          Encodes font style to string representation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FOLDER

public static final String DEFAULT_FOLDER
See Also:
Constant Field Values
Method Detail

color2String

public static String color2String(Color c)
Converts Color to hexadecimal String representation


string2Color

public static Color string2Color(String s)
Converts a String to an integer and returns the specified opaque Color.


string2Int

public static int string2Int(String s)
Converts String to integer


getFontStyle

public static int getFontStyle(String s)
Decodes font style from string representation


style2String

public static String style2String(int i)
Encodes font style to string representation


getMapDiff

public static Map getMapDiff(Map oldMap,
                             Map newMap,
                             boolean allowNewKeys)
Gets changed values of newMap against the oldMap. If allowNewKey is false then diff will contain only changed oldMap keys


keysToString

public static String keysToString(KeyStroke[] stroke)
Creates textual representation of KeyStroke[].


keyToString

public static String keyToString(KeyStroke stroke)
Creates textual representation of KeyStroke.


stringToKey

public static KeyStroke stringToKey(String s)
Converts textual representatin of Keystroke


stringToKeys

public static KeyStroke[] stringToKeys(String s)
Converts textual representatin of Keystroke[]


printDefaultAbbrevs

public static void printDefaultAbbrevs(Map map)

printDefaultAbbrevs

public static void printDefaultAbbrevs(Map map,
                                       FileObject file)
Prints given Abbreviations Map to XML file with given FO


printDefaultMacros

public static void printDefaultMacros(Map map,
                                      FileObject file)
Prints given Macro Map to XML file with given FO


printDefaultKeyBindings

public static void printDefaultKeyBindings(List list,
                                           FileObject file)
Prints given KeyBindings List to XML file with given FO


insetsToString

public static String insetsToString(Insets ins)
Coverts Insets to String representation


parseInsets

public static Insets parseInsets(String s)
Converts textual representation of Insets


dimensionToString

public static String dimensionToString(Dimension dim)
Coverts Insets to String representation


parseDimension

public static Dimension parseDimension(String s)
Converts textual representation of Insets


makeKeyBindingsMap

public static Map makeKeyBindingsMap(List propList)
Converts KeyBings List to KeyBindings Map Map.key is the textual representation of keystroke(s)


getGlobalAttribs

public static List getGlobalAttribs(String folderName)
Gets a list of attributes defined in BaseOptions.BASE MultiPropertyFolder


getGlobalPopupAttribs

public static List getGlobalPopupAttribs()
Gets attributes of base popup folder


getGlobalPopupMenuItems

public static List getGlobalPopupMenuItems()
Gets popup menu items (DataObjects) stored in base popup folder


getGlobalMenuItems

public static List getGlobalMenuItems(String folderName)
Retrieves a list of BaseOptions.BASE MultiPropertyFolder items


getPopupStrings

public static List getPopupStrings(List popup)

getPopupStrings

public static List getPopupStrings(List popup,
                                   boolean addSeparatorInstance)
Creates String representation of popup from DO representation

Parameters:
addSeparatorInstance - if true the result list will use instance of JSeparator in case of separator, if false null will be used

arrangeMergedFolderObjects

public static List arrangeMergedFolderObjects(Set items,
                                              Set attribs)
Provides ordering of folder items in accordance with folder attributes


arrangeMergedPopup

public static List arrangeMergedPopup(Set items,
                                      Set attribs)
Provides sorting of merged popup elements according to sort instructions in folder attribs


org.netbeans.modules.editor/3 1.32.0

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