Package ghidra.util.table.field
Class CodeUnitOffsetSettingsDefinition
- java.lang.Object
-
- ghidra.util.table.field.CodeUnitOffsetSettingsDefinition
-
- All Implemented Interfaces:
EnumSettingsDefinition
,SettingsDefinition
public class CodeUnitOffsetSettingsDefinition extends java.lang.Object implements EnumSettingsDefinition
-
-
Field Summary
Fields Modifier and Type Field Description static CodeUnitOffsetSettingsDefinition
DEF
static int
DEFAULT_CHOICE
static int
DEFAULT_OFFSET
static int
MAX_OFFSET
static int
MIN_OFFSET
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear(Settings settings)
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
getChoice(Settings settings)
Returns the current value for this settingsjava.lang.String
getDescription()
Returns a description of this settings definitionjava.lang.String
getDisplayChoice(int value, Settings s1)
Returns the String for the given enum valuejava.lang.String[]
getDisplayChoices(Settings settings)
Gets the list of choices as strings based on the current settingsjava.lang.String
getDisplayValue(Settings settings)
java.lang.String
getName()
Returns the name of this SettingsDefinitionint
getOffset(Settings settings)
boolean
hasValue(Settings setting)
void
setChoice(Settings settings, int value)
Sets the given value into the settings object using this definition as a keyvoid
setOffset(Settings settings, int offset)
-
-
-
Field Detail
-
DEF
public static final CodeUnitOffsetSettingsDefinition DEF
-
DEFAULT_OFFSET
public static final int DEFAULT_OFFSET
- See Also:
- Constant Field Values
-
MIN_OFFSET
public static final int MIN_OFFSET
- See Also:
- Constant Field Values
-
MAX_OFFSET
public static final int MAX_OFFSET
- See Also:
- Constant Field Values
-
DEFAULT_CHOICE
public static final int DEFAULT_CHOICE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getOffset
public int getOffset(Settings settings)
-
setOffset
public void setOffset(Settings settings, int offset)
-
getChoice
public int getChoice(Settings settings)
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
-
setChoice
public void setChoice(Settings settings, int value)
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.
-
getDisplayValue
public java.lang.String getDisplayValue(Settings settings)
-
getDisplayChoices
public java.lang.String[] getDisplayChoices(Settings settings)
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
public java.lang.String getName()
Description copied from interface:SettingsDefinition
Returns the name of this SettingsDefinition- Specified by:
getName
in interfaceSettingsDefinition
-
getDescription
public java.lang.String getDescription()
Description copied from interface:SettingsDefinition
Returns a description of this settings definition- Specified by:
getDescription
in interfaceSettingsDefinition
-
getDisplayChoice
public java.lang.String getDisplayChoice(int value, Settings s1)
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
public void clear(Settings settings)
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
public void copySetting(Settings settings, Settings destSettings)
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
public boolean hasValue(Settings setting)
- Specified by:
hasValue
in interfaceSettingsDefinition
-
-