public interface IDialogSettings
DialogSettings
Modifier and Type | Method and Description |
---|---|
IDialogSettings |
addNewSection(String name)
Create a new section in the receiver and return it.
|
void |
addSection(IDialogSettings section)
Add a section in the receiver.
|
String |
get(String key)
Returns the value of the given key in this dialog settings.
|
String[] |
getArray(String key)
Returns the value, an array of strings, of the given key in this dialog
settings.
|
boolean |
getBoolean(String key)
Convenience API.
|
double |
getDouble(String key)
Convenience API.
|
float |
getFloat(String key)
Convenience API.
|
int |
getInt(String key)
Convenience API.
|
long |
getLong(String key)
Convenience API.
|
String |
getName()
Returns the IDialogSettings name.
|
IDialogSettings |
getSection(String sectionName)
Returns the section with the given name in this dialog settings.
|
IDialogSettings[] |
getSections()
Returns all the sections in this dialog settings.
|
void |
load(Reader reader)
Load a dialog settings from a stream and fill the receiver with its
content.
|
void |
load(String fileName)
Load a dialog settings from a file and fill the receiver with its
content.
|
void |
put(String key,
boolean value)
Convenience API.
|
void |
put(String key,
double value)
Convenience API.
|
void |
put(String key,
float value)
Convenience API.
|
void |
put(String key,
int value)
Convenience API.
|
void |
put(String key,
long value)
Convenience API.
|
void |
put(String key,
String value)
Adds the pair
key/value to this dialog settings. |
void |
put(String key,
String[] value)
Adds the pair
key/value to this dialog settings. |
void |
save(String fileName)
Save a dialog settings to a file.
|
void |
save(Writer writer)
Save a dialog settings to a stream
|
IDialogSettings addNewSection(String name)
name
- the name of the new sectionDialogSettings.getOrCreateSection(IDialogSettings, String)
void addSection(IDialogSettings section)
section
- the section to be addedString get(String key)
key
- the keynull
if noneString[] getArray(String key)
key
- the keynull
if noneboolean getBoolean(String key)
key
- the keyfalse
if nonedouble getDouble(String key) throws NumberFormatException
key
- the keyNumberFormatException
if noneNumberFormatException
- if the string value does not contain a parsable number.Double.valueOf(java.lang.String)
float getFloat(String key) throws NumberFormatException
key
- the keyNumberFormatException
if noneNumberFormatException
- if the string value does not contain a parsable number.Float.valueOf(java.lang.String)
int getInt(String key) throws NumberFormatException
key
- the keyNumberFormatException
if noneNumberFormatException
- if the string value does not contain a parsable number.Integer.valueOf(java.lang.String)
long getLong(String key) throws NumberFormatException
key
- the keyNumberFormatException
if noneNumberFormatException
- if the string value does not contain a parsable number.Long.valueOf(java.lang.String)
String getName()
IDialogSettings getSection(String sectionName)
sectionName
- the keynull
if noneDialogSettings.getOrCreateSection(IDialogSettings, String)
IDialogSettings[] getSections()
null
if nonevoid load(Reader reader) throws IOException
reader
- a Reader specifying the stream where the settings are read
from.IOException
void load(String fileName) throws IOException
fileName
- the name of the file the settings are read from.IOException
void put(String key, String[] value)
key/value
to this dialog settings.key
- the key.value
- the value to be associated with the key
void put(String key, double value)
value
to a string and
adds the pair key/value
to this dialog settings.key
- the key.value
- the value to be associated with the key
void put(String key, float value)
value
to a string and
adds the pair key/value
to this dialog settings.key
- the key.value
- the value to be associated with the key
void put(String key, int value)
value
to a string and
adds the pair key/value
to this dialog settings.key
- the key.value
- the value to be associated with the key
void put(String key, long value)
value
to a string and
adds the pair key/value
to this dialog settings.key
- the key.value
- the value to be associated with the key
void put(String key, String value)
key/value
to this dialog settings.key
- the key.value
- the value to be associated with the key
void put(String key, boolean value)
value
to a string
and adds the pair key/value
to this dialog settings.key
- the key.value
- the value to be associated with the key
void save(Writer writer) throws IOException
writer
- a Writer specifying the stream the settings are written in.IOException
void save(String fileName) throws IOException
fileName
- the name of the file the settings are written in.IOException
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.