Package ghidra.docking.settings
Class IntegerSignednessFormattingModeSettingsDefinition
java.lang.Object
ghidra.docking.settings.IntegerSignednessFormattingModeSettingsDefinition
- All Implemented Interfaces:
EnumSettingsDefinition
,SettingsDefinition
public class IntegerSignednessFormattingModeSettingsDefinition
extends Object
implements EnumSettingsDefinition
The settings definition for the numeric display format for handling signed values.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final IntegerSignednessFormattingModeSettingsDefinition
static final IntegerSignednessFormattingModeSettingsDefinition
static final IntegerSignednessFormattingModeSettingsDefinition
protected static final String
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Removes any values in the given settings object assocated with this settings definitionvoid
copySetting
(Settings settings, Settings destSettings) Copies any setting value associated with this settings definition from the srcSettings settings to the destSettings.int
Returns the current value for this settingsReturns a description of this settings definitiongetDisplayChoice
(int value, Settings s1) Returns the String for the given enum valuegetDisplayChoice
(Settings settings) String[]
getDisplayChoices
(Settings settings) Gets the list of choices as strings based on the current settingsgetFormatMode
(Settings settings) Returns the format based on the specified settingsgetName()
Returns the display name of this SettingsDefinitionGet theSettings
key which is used when storing a key/value entry.getValueString
(Settings settings) Get the setting value as a string which corresponds to this definition.boolean
Determine if a setting value has been storedvoid
Sets the given value into the settings object using this definition as a keyvoid
setDisplayChoice
(Settings settings, String choice) Sets the settings object to the enum value indicating the specified choice as a string.void
setFormatMode
(Settings settings, SignednessFormatMode mode) Set, or clear ifmode
is null, the new mode in the provided settingsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ghidra.docking.settings.EnumSettingsDefinition
hasSameValue
-
Field Details
-
SIGN_FORMAT
- See Also:
-
DEF
-
DEF_SIGNED
-
DEF_UNSIGNED
-
-
Method Details
-
getFormatMode
Returns the format based on the specified settings- Parameters:
settings
- the instance settings or null for default value.- Returns:
- the format mode
-
getChoice
Description copied from interface:EnumSettingsDefinition
Returns the current value for this settings- Specified by:
getChoice
in interfaceEnumSettingsDefinition
- Parameters:
settings
- The settings to search- Returns:
- the value for the settingsDefintions
-
getValueString
Description copied from interface:SettingsDefinition
Get the setting value as a string which corresponds to this definition. A default value string will be returned if a setting has not been stored.- Specified by:
getValueString
in interfaceSettingsDefinition
- Parameters:
settings
- settings- Returns:
- value string or null if not set and default has not specified by this definition
-
setFormatMode
Set, or clear ifmode
is null, the new mode in the provided settings- Parameters:
settings
- settings objectmode
- new value to assign, or null to clear
-
setChoice
Description copied from interface:EnumSettingsDefinition
Sets the given value into the settings object using this definition as a key- Specified by:
setChoice
in interfaceEnumSettingsDefinition
- Parameters:
settings
- the settings to store the value.value
- the settings value to be stored.
-
getDisplayChoices
Description copied from interface:EnumSettingsDefinition
Gets the list of choices as strings based on the current settings- Specified by:
getDisplayChoices
in interfaceEnumSettingsDefinition
- Parameters:
settings
- the instance settings- Returns:
- an array of strings which represent valid choices based on the current settings.
-
getName
Description copied from interface:SettingsDefinition
Returns the display name of this SettingsDefinition- Specified by:
getName
in interfaceSettingsDefinition
- Returns:
- display name for setting
-
getStorageKey
Description copied from interface:SettingsDefinition
Get theSettings
key which is used when storing a key/value entry.- Specified by:
getStorageKey
in interfaceSettingsDefinition
- Returns:
- settings storage key
-
getDescription
Description copied from interface:SettingsDefinition
Returns a description of this settings definition- Specified by:
getDescription
in interfaceSettingsDefinition
- Returns:
- setting description
-
getDisplayChoice
Description copied from interface:EnumSettingsDefinition
Returns the String for the given enum value- Specified by:
getDisplayChoice
in interfaceEnumSettingsDefinition
- Parameters:
value
- the value to get a display string fors1
- the instance settings which may affect the results- Returns:
- the display string for the given settings.
-
clear
Description copied from interface:SettingsDefinition
Removes any values in the given settings object assocated with this settings definition- Specified by:
clear
in interfaceSettingsDefinition
- Parameters:
settings
- the settings object to be cleared.
-
copySetting
Description copied from interface:SettingsDefinition
Copies any setting value associated with this settings definition from the srcSettings settings to the destSettings.- Specified by:
copySetting
in interfaceSettingsDefinition
- Parameters:
settings
- the settings to be copieddestSettings
- the settings to be updated.
-
hasValue
Description copied from interface:SettingsDefinition
Determine if a setting value has been stored- Specified by:
hasValue
in interfaceSettingsDefinition
- Parameters:
setting
- stored settings- Returns:
- true if a value has been stored, else false
-
getDisplayChoice
-
setDisplayChoice
Sets the settings object to the enum value indicating the specified choice as a string.- Parameters:
settings
- the settings to store the value.choice
- enum string representing a choice in the enum.
-