| java.lang.Object org.netbeans.editor.SettingsUtil
SettingsUtil | public class SettingsUtil (Code) | | Utility methods for managing settings
author: Miloslav Metelka version: 1.00 |
Inner Class :public static class FontStylePrintColoringEvaluator extends PrintColoringEvaluator | |
Inner Class :public static class ForeColorPrintColoringEvaluator extends PrintColoringEvaluator | |
Method Summary | |
public static Acceptor | getAcceptor(Class kitClass, String settingName, Acceptor defaultValue) | public static boolean | getBoolean(Class kitClass, String settingName, boolean defaultValue) | public static boolean | getBoolean(Class kitClass, String settingName, Boolean defaultValue) | public static List | getClonedList(List l) Get either the cloned list or new list if the old one was null. | public static List | getClonedList(Class kitClass, String settingName) | public static List | getClonedList(Map settingsMap, String settingName) | public static Map | getClonedMap(Map m) | public static Map | getClonedMap(Class kitClass, String settingName) | public static Map | getClonedMap(Map settingsMap, String settingName) | public static Coloring | getColoring(Class kitClass, String coloringName, boolean printingSet) | public static Object | getColoring(Class kitClass, String coloringName, boolean printingSet, boolean evaluateEvaluators) | public static Object | getColoring(Map settingsMap, String coloringName, boolean printingSet) Get the coloring setting from the map that holds the settings values for
the particular kit. | public static Map | getColoringMap(Class kitClass, boolean printingSet, boolean evaluateEvaluators) Get the map holding [coloring-name, coloring-value] pairs for all the
colorings defined for the given kit. | public static Settings.Initializer | getColoringMapInitializer(Class kitClass, Map coloringMap, boolean printingSet, String initializerName) Create initializer that reflects the colorings given by the coloring map.
Parameters: kitClass - class of the kit for which the colorings will be updated bythe initializer. | public static List | getCumulativeList(Class kitClass, String settingName, List defaultValue) | public static int | getInteger(Class kitClass, String settingName, int defaultValue) | public static int | getInteger(Class kitClass, String settingName, Integer defaultValue) | public static List | getList(Class kitClass, String settingName, List defaultValue) | public static Map | getMap(Class kitClass, String settingName, Map defaultValue) | public static int | getNonNegativeInteger(Class kitClass, String settingName, int defaultValue) | public static int | getNonNegativeInteger(Class kitClass, String settingName, Integer defaultValue) | public static int | getPositiveInteger(Class kitClass, String settingName, int defaultValue) | public static int | getPositiveInteger(Class kitClass, String settingName, Integer defaultValue) | public static String | getString(Class kitClass, String settingName, String defaultValue) | public static Coloring | getTokenColoring(TokenContextPath tcp, TokenCategory tokenIDOrCategory, boolean printingSet) | public static Object | getTokenColoring(TokenContextPath tcp, TokenCategory tokenIDOrCategory, boolean printingSet, boolean evaluateEvaluators) | public static Object | getValue(Class kitClass, String settingName, Object defaultValue) | public static void | setColoring(Class kitClass, String coloringName, Object newValue, boolean printingSet) | public static void | setColoring(Class kitClass, String coloringName, Object componentColoringNewValue) | public static void | setColoring(Class kitClass, String coloringName, Object componentColoringNewValue, Object printColoringNewValue) | public static void | setColoring(Map settingsMap, String coloringName, Object newValue, boolean printingSet) Put the coloring into a map holding the settings for the particular kit. | public static void | setColoring(Map settingsMap, String coloringName, Object componentColoringNewValue) Put the coloring into a map holding the settings for the particular kit
and assign a default print coloring Evaluator to the print coloring
setting. | public static void | setColoring(Map settingsMap, String coloringName, Object componentColoringNewValue, Object printColoringNewValue) | public static void | setColoringMap(Class kitClass, Map coloringMap, boolean printingSet) Update the settings according to the changes provided in the coloringMap.
Parameters: kitClass - class of the kit for which the colorings are being updated.Only the colorings with the names contained inCOLORING_NAME_LIST will be updated for thekitClass settings. | public static void | updateListSetting(Class kitClass, String settingName, Object[] addToList) | public static void | updateListSetting(Map settingsMap, String settingName, Object[] addToList) |
TOKEN_COLORING_INITIALIZER_NAME_SUFFIX | final public static String TOKEN_COLORING_INITIALIZER_NAME_SUFFIX(Code) | | |
defaultPrintColoringEvaluator | final public static PrintColoringEvaluator defaultPrintColoringEvaluator(Code) | | |
getBoolean | public static boolean getBoolean(Class kitClass, String settingName, boolean defaultValue)(Code) | | |
getClonedList | public static List getClonedList(List l)(Code) | | Get either the cloned list or new list if the old one was null.
Parameters: l - list to check the cloned list if it was non-null or the new list |
getClonedList | public static List getClonedList(Map settingsMap, String settingName)(Code) | | Useful for initializers
|
getClonedMap | public static Map getClonedMap(Map settingsMap, String settingName)(Code) | | Useful for initializers
|
getColoring | public static Object getColoring(Class kitClass, String coloringName, boolean printingSet, boolean evaluateEvaluators)(Code) | | |
getColoring | public static Object getColoring(Map settingsMap, String coloringName, boolean printingSet)(Code) | | Get the coloring setting from the map that holds the settings values for
the particular kit.
Parameters: settingsMap - map that holds the [setting-name, setting-value] pairs forsome kit-class. Parameters: coloringName - name of the coloring to retrieve Parameters: printingSet - retrieve the value of printing coloring instead of componentcoloring. |
getColoringMap | public static Map getColoringMap(Class kitClass, boolean printingSet, boolean evaluateEvaluators)(Code) | | Get the map holding [coloring-name, coloring-value] pairs for all the
colorings defined for the given kit. The
SettingsNames.COLORING_NAME_LIST setting is used to the
coloring names that will apear in the map.
Parameters: kitClass - kit class for which the colorings are retrieved from thesettings. Parameters: printingSet - retrieve the printing colorings instead of componentcolorings. Parameters: evaluateEvaluators - evaluate all the Settings.Evaluator instances or not. |
getColoringMapInitializer | public static Settings.Initializer getColoringMapInitializer(Class kitClass, Map coloringMap, boolean printingSet, String initializerName)(Code) | | Create initializer that reflects the colorings given by the coloring map.
Parameters: kitClass - class of the kit for which the colorings will be updated bythe initializer. Only the colorings with the names containedin COLORING_NAME_LIST will be updated for thekitClass settings. The rest is considered to be the tokencolorings so they are updated in BaseKit settings by theinitializer. Parameters: coloringMap - map containing [coloring-name, coloring-value] pairs. Parameters: printingSet - whether printing colorings should be updated instead ofcomponent colorings. Parameters: initializerName - name that will be assigned to the initializer. |
getInteger | public static int getInteger(Class kitClass, String settingName, int defaultValue)(Code) | | |
getNonNegativeInteger | public static int getNonNegativeInteger(Class kitClass, String settingName, int defaultValue)(Code) | | |
getNonNegativeInteger | public static int getNonNegativeInteger(Class kitClass, String settingName, Integer defaultValue)(Code) | | |
getPositiveInteger | public static int getPositiveInteger(Class kitClass, String settingName, int defaultValue)(Code) | | |
setColoring | public static void setColoring(Class kitClass, String coloringName, Object newValue, boolean printingSet)(Code) | | |
setColoring | public static void setColoring(Class kitClass, String coloringName, Object componentColoringNewValue)(Code) | | |
setColoring | public static void setColoring(Class kitClass, String coloringName, Object componentColoringNewValue, Object printColoringNewValue)(Code) | | |
setColoring | public static void setColoring(Map settingsMap, String coloringName, Object newValue, boolean printingSet)(Code) | | Put the coloring into a map holding the settings for the particular kit.
|
setColoring | public static void setColoring(Map settingsMap, String coloringName, Object componentColoringNewValue)(Code) | | Put the coloring into a map holding the settings for the particular kit
and assign a default print coloring Evaluator to the print coloring
setting.
|
setColoring | public static void setColoring(Map settingsMap, String coloringName, Object componentColoringNewValue, Object printColoringNewValue)(Code) | | |
setColoringMap | public static void setColoringMap(Class kitClass, Map coloringMap, boolean printingSet)(Code) | | Update the settings according to the changes provided in the coloringMap.
Parameters: kitClass - class of the kit for which the colorings are being updated.Only the colorings with the names contained inCOLORING_NAME_LIST will be updated for thekitClass settings. The rest is considered to be the tokencolorings so they are updated in BaseKit settings. Parameters: coloringMap - map containing [coloring-name, coloring-value] pairs. Parameters: printingSet - whether printing colorings should be updated instead ofcomponent colorings. |
updateListSetting | public static void updateListSetting(Class kitClass, String settingName, Object[] addToList)(Code) | | |
updateListSetting | public static void updateListSetting(Map settingsMap, String settingName, Object[] addToList)(Code) | | |
|
|