|
intarsys runtime library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.intarsys.tools.preferences.PreferencesTools
public class PreferencesTools
A tool class for some common tasks when dealing with IPreferences.
| Field Summary | |
|---|---|
static String |
ELEMENT_SEPARATOR
|
static String |
KEY_VALUE_SEPARATOR
|
| Method Summary | ||
|---|---|---|
static String |
fitKey(String name)
|
|
static
|
getEnumItem(IPreferences preferences,
EnumMeta<T> meta,
String name)
|
|
static
|
getEnumItem(IPreferences preferences,
EnumMeta<T> meta,
String name,
String defaultValue)
|
|
static String |
getLarge(IPreferences preferences,
String name,
String defaultValue)
|
|
static String |
getSecret(IPreferences preferences,
String name,
String defaultValue)
|
|
static void |
importPreferences(IPreferences root,
IPreferences source)
|
|
static void |
mergeArgs(IPreferences source,
IArgs args)
Add all argument bindings stored in source to args. |
|
static void |
putArgs(IPreferences preferences,
IArgs args,
IDeclarationBlock block)
Serialize the declared argument bindings to a preferences node. |
|
static void |
putArgsAll(IPreferences preferences,
IArgs args,
boolean secret)
Save all argument bindings in the preferences node. |
|
static void |
putArgsDeclared(IPreferences preferences,
IArgs args,
IDeclarationElement[] declarations,
boolean secret)
Serialize the declared argument bindings to a preferences node. |
|
static void |
putArgValue(IPreferences preferences,
String name,
Object pValue,
IArgumentDeclaration argDecl,
boolean secret)
Serialize a name/value pair in a preferences node. |
|
static void |
putEnumItem(IPreferences preferences,
String name,
EnumItem item)
|
|
static void |
putLarge(IPreferences preferences,
String name,
String longValue)
|
|
static void |
putSecret(IPreferences preferences,
String name,
String value)
|
|
static Rectangle |
toRect(String value)
|
|
static Rectangle |
toRect(String value,
int[] ranges)
|
|
static String |
toString(float[] value)
|
|
static String |
toString(int[] value)
|
|
static String |
toString(List value)
|
|
static String |
toString(Map map)
|
|
static String |
toString(Rectangle rect)
|
|
static String |
toString(String[] value)
|
|
static String[] |
toStringArray(String value)
|
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ELEMENT_SEPARATOR
public static final String KEY_VALUE_SEPARATOR
| Method Detail |
|---|
public static String fitKey(String name)
public static <T extends EnumItem> T getEnumItem(IPreferences preferences,
EnumMeta<T> meta,
String name)
public static <T extends EnumItem> T getEnumItem(IPreferences preferences,
EnumMeta<T> meta,
String name,
String defaultValue)
public static String getLarge(IPreferences preferences,
String name,
String defaultValue)
public static String getSecret(IPreferences preferences,
String name,
String defaultValue)
public static void importPreferences(IPreferences root,
IPreferences source)
throws BackingStoreException
BackingStoreException
public static void mergeArgs(IPreferences source,
IArgs args)
source - args -
public static void putArgs(IPreferences preferences,
IArgs args,
IDeclarationBlock block)
This implementation does not remove any binding from preferences. If this is required, you should clear the preferences beforehand.
preferences - args - block -
public static void putArgsAll(IPreferences preferences,
IArgs args,
boolean secret)
This implementation does not remove any binding from preferences. If this is required, you should clear the preferences beforehand.
preferences - args - secret -
public static void putArgsDeclared(IPreferences preferences,
IArgs args,
IDeclarationElement[] declarations,
boolean secret)
This implementation does not remove any binding from preferences. If this is required, you should clear the preferences beforehand.
preferences - args - declarations -
public static void putArgValue(IPreferences preferences,
String name,
Object pValue,
IArgumentDeclaration argDecl,
boolean secret)
If value is itself an IArgs structure, argument serialization is
recursed.
preferences - name - pValue - argDecl - secret -
public static void putEnumItem(IPreferences preferences,
String name,
EnumItem item)
public static void putLarge(IPreferences preferences,
String name,
String longValue)
public static void putSecret(IPreferences preferences,
String name,
String value)
public static Rectangle toRect(String value)
public static Rectangle toRect(String value,
int[] ranges)
public static String toString(float[] value)
public static String toString(int[] value)
public static String toString(List value)
public static String toString(Map map)
public static String toString(Rectangle rect)
public static String toString(String[] value)
public static String[] toStringArray(String value)
|
intarsys runtime library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||