Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## mars
Class Settings

    java.lang.Object
      java.util.Observable
          mars.Settings

    public class Settings

extends Observable

Contains various IDE settings. Persistent settings are maintained for the current user and on the current machine using Java's Preference objects. Failing that, default setting values come from Settings.properties file. If both of those fail, default values come from static arrays defined in this class. The latter can can be modified prior to instantiating Settings object. NOTE: If the Preference objects fail due to security exceptions, changes to settings will not carry over from one MARS session to the next. Actual implementation of the Preference objects is platform-dependent. For Windows, they are stored in Registry. To see, run regedit and browse to: HKEY_CURRENT_USER\Software\JavaSoft\Prefs\mars

Author:
  Pete Sanderson

Field Summary
`static int` | `ASSEMBLE_ALL_ENABLED` Flag to determine whether only the current editor source file (enabled false) or all files in its directory (enabled true) will be assembled when assembly is selected.
`static int` | `ASSEMBLE_ON_OPEN_ENABLED` Flag to determine whether or not a file is immediately and automatically assembled upon opening.
`static int` | `AUTO_INDENT` Flag to control whether or not language-aware editor will use auto-indent feature
`static int` | `BARE_MACHINE_ENABLED` Flag to determine whether or not program being assembled is limited to using register numbers instead of names.
`static int` | `CARET_BLINK_RATE` Caret blink rate in milliseconds, 0 means don't blink.
`static int` | `DATA_SEGMENT_HIGHLIGHTING` Flag to control whether or not highlighting is applied to data segment window
`static int` | `DATASEGMENT_HIGHLIGHT_BACKGROUND` RGB color for text segment highlighted background
`static int` | `DATASEGMENT_HIGHLIGHT_FONT` Font for text segment highlighted background
`static int` | `DATASEGMENT_HIGHLIGHT_FOREGROUND` RGB color for text segment highlighted foreground
`static boolean[]` | `defaultBooleanSettingsValues` Last resort default values for boolean settings; will use only if neither the Preferences nor the properties file work.
`static int` | `DELAYED_BRANCHING_ENABLED` Flag to determine whether or not delayed branching is in effect at MIPS execution.
`static int` | `DISPLAY_ADDRESSES_IN_HEX` Default setting for displaying addresses and values in hexidecimal in the Execute pane.
`static int` | `DISPLAY_VALUES_IN_HEX`
`static int` | `EDITOR_CURRENT_LINE_HIGHLIGHTING` Flag to control whether or not editor will highlight the line currently being edited
`static int` | `EDITOR_FONT` Font for the text editor
`static int` | `EDITOR_LINE_NUMBERS_DISPLAYED` Flag to determine whether or not the editor will display line numbers.
`static int` | `EDITOR_POPUP_PREFIX_LENGTH` Number of letters to be matched by editor's instruction guide before popup generated (if popup enabled)
`static int` | `EDITOR_TAB_SIZE` Editor tab size in characters.
`static int` | `EVEN_ROW_BACKGROUND` RGB color for table even row background (text, data, register displays)
`static int` | `EVEN_ROW_FONT` Font for table even row background (text, data, register displays)
`static int` | `EVEN_ROW_FOREGROUND` RGB color for table even row foreground (text, data, register displays)
`static int` | `EXCEPTION_HANDLER` Current specified exception handler file (a MIPS assembly source file)
`static int` | `EXCEPTION_HANDLER_ENABLED` Flag to determine whether the currently selected exception handler source file will be included in each assembly operation.
`static int` | `EXTENDED_ASSEMBLER_ENABLED` Flag to determine whether or not program being assembled is limited to basic MIPS instructions and formats.
`static int` | `GENERIC_TEXT_EDITOR` Flag to control whether or not to use generic text editor instead of language-aware styled editor
`static int` | `LABEL_SORT_STATE` State for sorting label window display
`static int` | `LABEL_WINDOW_VISIBILITY` Default visibilty of label window (symbol table).
`static int` | `MEMORY_CONFIGURATION` Identifier of current memory configuration
`static int` | `ODD_ROW_BACKGROUND` RGB color for table odd row background (text, data, register displays)
`static int` | `ODD_ROW_FONT` Font for table odd row background (text, data, register displays)
`static int` | `ODD_ROW_FOREGROUND` RGB color for table odd row foreground (text, data, register displays)
`static int` | `POPUP_INSTRUCTION_GUIDANCE` Flag to control whether or not editor will provide popup instruction guidance while typing
`static int` | `POPUP_SYSCALL_INPUT` Flag to control whether or not simulator will use popup dialog for input syscalls
`static int` | `PROGRAM_ARGUMENTS` Flag to determine whether or not to display and use program arguments
`static int` | `REGISTER_HIGHLIGHT_BACKGROUND` RGB color for register highlighted background
`static int` | `REGISTER_HIGHLIGHT_FONT` Font for register highlighted background
`static int` | `REGISTER_HIGHLIGHT_FOREGROUND` RGB color for register highlighted foreground
`static int` | `REGISTERS_HIGHLIGHTING` Flag to control whether or not highlighting is applied to register windows
`static int` | `SELF_MODIFYING_CODE_ENABLED` Flag to determine whether a program can write binary code to the text or data segment and execute that code.
`static int` | `START_AT_MAIN` Flag to control whether or not assembler automatically initializes program counter to 'main's address
`static int` | `TEXT_COLUMN_ORDER` Order of text segment table columns
`static int` | `TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_BACKGROUND` RGB color for text segment delay slot highlighted background
`static int` | `TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_FONT` Font for text segment delay slot highlighted background
`static int` | `TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_FOREGROUND` RGB color for text segment delay slot highlighted foreground
`static int` | `TEXTSEGMENT_HIGHLIGHT_BACKGROUND` RGB color for text segment highlighted background
`static int` | `TEXTSEGMENT_HIGHLIGHT_FONT` Font for table odd row foreground (text, data, register displays)
`static int` | `TEXTSEGMENT_HIGHLIGHT_FOREGROUND` RGB color for text segment highlighted foreground
`static int` | `WARNINGS_ARE_ERRORS` Flag to determine whether or not assembler warnings are considered errors.

Constructor Summary
`Settings()` Create Settings object and set to saved values.
`Settings(boolean gui)` Create Settings object and set to saved values.

Method Summary
`boolean` | `getAssembleAllEnabled()` Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.ASSEMBLE_ALL_ENABLED`)
`boolean` | `getAssembleOnOpenEnabled()` Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.ASSEMBLE_ON_OPEN_ENABLED`)
`boolean` | `getBackSteppingEnabled()` Return whether backstepping is permitted at this time.
`boolean` | `getBareMachineEnabled()` Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.BARE_MACHINE_ENABLED`)
`boolean` | `getBooleanSetting(int id)` Fetch value of a boolean setting given its identifier.
`int` | `getCaretBlinkRate()` Retrieve the caret blink rate in milliseconds.
`Color` | `getColorSettingByKey(String key)` Get Color object for specified settings key.
`Color` | `getColorSettingByPosition(int position)` Get Color object for specified settings name (a static constant).
`boolean` | `getDataSegmentHighlighting()` Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.DATA_SEGMENT_HIGHLIGHTING`)
`Color` | `getDefaultColorSettingByKey(String key)` Get default Color value for specified settings key.
`Color` | `getDefaultColorSettingByPosition(int position)` Get default Color object for specified settings name (a static constant).
`SyntaxStyle` | `getDefaultEditorSyntaxStyleByPosition(int index)`
`int` | `getDefaultEditorTabSize()` Get the text editor default tab size in characters
`Font` | `getDefaultFontByPosition(int fontSettingPosition)` Retrieve a default Font setting
`boolean` | `getDelayedBranchingEnabled()` Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.DELAYED_BRANCHING_ENABLED`)
`boolean` | `getDisplayAddressesInHex()` Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.DISPLAY_ADDRESSES_IN_HEX`)
`boolean` | `getDisplayValuesInHex()` Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.DISPLAY_VALUES_IN_HEX`)
`Font` | `getEditorFont()` Current editor font.
`boolean` | `getEditorLineNumbersDisplayed()` Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.EDITOR_LINE_NUMBERS_DISPLAYED`)
`int` | `getEditorPopupPrefixLength()` Get number of letters to be matched by editor's instruction guide before popup generated (if popup enabled).
`SyntaxStyle` | `getEditorSyntaxStyleByPosition(int index)`
`int` | `getEditorTabSize()` Get the tab size in characters.
`String` | `getExceptionHandler()` Name of currently selected exception handler file.
`boolean` | `getExceptionHandlerEnabled()` Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.EXCEPTION_HANDLER_ENABLED`)
`boolean` | `getExtendedAssemblerEnabled()` Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.EXTENDED_ASSEMBLER_ENABLED`)
`Font` | `getFontByPosition(int fontSettingPosition)` Retrieve a Font setting
`String` | `getLabelSortState()` Get the saved state of the Labels Window sorting (can sort by either label or address and either ascending or descending order).
`boolean` | `getLabelWindowVisibility()` Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.LABEL_WINDOW_VISIBILITY`)
`String` | `getMemoryConfiguration()` Returns identifier of current built-in memory configuration.
`boolean` | `getProgramArguments()` Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.PROGRAM_ARGUMENTS`)
`boolean` | `getRegistersHighlighting()` Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.REGISTERS_HIGHLIGHTING`)
`boolean` | `getStartAtMain()` Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.START_AT_MAIN`)
`int[]` | `getTextColumnOrder()` Order of text segment display columns (there are 5, numbered 0 to 4).
`boolean` | `getWarningsAreErrors()` Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.WARNINGS_ARE_ERRORS`)
`void` | `reset(boolean gui)` Reset settings to default values, as described in the constructor comments.
`void` | `setAssembleAllEnabled(boolean value)` Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.ASSEMBLE_ALL_ENABLED`)
`void` | `setAssembleOnOpenEnabled(boolean value)` Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.ASSEMBLE_ON_OPEN_ENABLED`)
`void` | `setBooleanSetting(int id, boolean value)` Set value of a boolean setting given its id and the value.
`void` | `setBooleanSettingNonPersistent(int id, boolean value)` Temporarily establish boolean setting.
`void` | `setCaretBlinkRate(int rate)` Set the caret blinking rate in milliseconds.
`void` | `setColorSettingByKey(String key, Color color)` Set Color object for specified settings key.
`void` | `setColorSettingByPosition(int position, Color color)` Set Color object for specified settings name (a static constant).
`void` | `setDataSegmentHighlighting(boolean value)` Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.DATA_SEGMENT_HIGHLIGHTING`)
`void` | `setDelayedBranchingEnabled(boolean value)` Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.DELAYED_BRANCHING_ENABLED`)
`void` | `setDelayedBranchingEnabledNonPersistent(boolean value)` Deprecated. Use `setBooleanSettingNonPersistent(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.DELAYED_BRANCHING_ENABLED`)
`void` | `setDisplayAddressesInHex(boolean value)` Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.DISPLAY_ADDRESSES_IN_HEX`)
`void` | `setDisplayValuesInHex(boolean value)` Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.DISPLAY_VALUES_IN_HEX`)
`void` | `setEditorFont(Font font)` Set editor font to the specified Font object and write it to persistent storage.
`void` | `setEditorLineNumbersDisplayed(boolean value)` Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.EDITOR_LINE_NUMBERS_DISPLAYED`)
`void` | `setEditorPopupPrefixLength(int length)` Set number of letters to be matched by editor's instruction guide before popup generated (if popup enabled).
`void` | `setEditorSyntaxStyleByPosition(int index, SyntaxStyle syntaxStyle)`
`void` | `setEditorTabSize(int size)` Set the tab size in characters.
`void` | `setExceptionHandler(String newFilename)` Set name of exception handler file and write it to persistent storage.
`void` | `setExceptionHandlerEnabled(boolean value)` Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.EXCEPTION_HANDLER_ENABLED`)
`void` | `setExtendedAssemblerEnabled(boolean value)` Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.EXTENDED_ASSEMBLER_ENABLED`)
`void` | `setFontByPosition(int fontSettingPosition, Font font)` Store a Font setting
`void` | `setLabelSortState(String state)` Store the current state of the Labels Window sorter.
`void` | `setLabelWindowVisibility(boolean value)` Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.LABEL_WINDOW_VISIBILITY`)
`void` | `setMemoryConfiguration(String config)` Store the identifier of the memory configuration.
`void` | `setProgramArguments(boolean value)` Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.PROGRAM_ARGUMENTS`)
`void` | `setRegistersHighlighting(boolean value)` Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.REGISTERS_HIGHLIGHTING`)
`void` | `setStartAtMain(boolean value)` Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.START_AT_MAIN`)
`void` | `setTextColumnOrder(int[] columnOrder)` Store the current order of Text Segment window table columns, so the ordering can be preserved and restored.
`void` | `setWarningsAreErrors(boolean value)` Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.WARNINGS_ARE_ERRORS`)

Methods inherited from class java.util.Observable
`addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### EXTENDED_ASSEMBLER_ENABLED

    public static final int EXTENDED_ASSEMBLER_ENABLED

  Flag to determine whether or not program being assembled is limited to basic MIPS instructions and formats.

  See Also:
    Constant Field Values

### BARE_MACHINE_ENABLED

    public static final int BARE_MACHINE_ENABLED

  Flag to determine whether or not program being assembled is limited to using register numbers instead of names. NOTE: Its default value is false and the IDE provides no means to change it!

  See Also:
    Constant Field Values

### ASSEMBLE_ON_OPEN_ENABLED

    public static final int ASSEMBLE_ON_OPEN_ENABLED

  Flag to determine whether or not a file is immediately and automatically assembled upon opening. Handy when using externa editor like mipster.

  See Also:
    Constant Field Values

### ASSEMBLE_ALL_ENABLED

    public static final int ASSEMBLE_ALL_ENABLED

  Flag to determine whether only the current editor source file (enabled false) or all files in its directory (enabled true) will be assembled when assembly is selected.

  See Also:
    Constant Field Values

### LABEL_WINDOW_VISIBILITY

    public static final int LABEL_WINDOW_VISIBILITY

  Default visibilty of label window (symbol table). Default only, dynamic status maintained by ExecutePane

  See Also:
    Constant Field Values

### DISPLAY_ADDRESSES_IN_HEX

    public static final int DISPLAY_ADDRESSES_IN_HEX

  Default setting for displaying addresses and values in hexidecimal in the Execute pane.

  See Also:
    Constant Field Values

### DISPLAY_VALUES_IN_HEX

    public static final int DISPLAY_VALUES_IN_HEX

See Also:
  Constant Field Values

### EXCEPTION_HANDLER_ENABLED

    public static final int EXCEPTION_HANDLER_ENABLED

  Flag to determine whether the currently selected exception handler source file will be included in each assembly operation.

  See Also:
    Constant Field Values

### DELAYED_BRANCHING_ENABLED

    public static final int DELAYED_BRANCHING_ENABLED

  Flag to determine whether or not delayed branching is in effect at MIPS execution. This means we simulate the pipeline and statement FOLLOWING a successful branch is executed before branch is taken. DPS 14 June 2007.

  See Also:
    Constant Field Values

### EDITOR_LINE_NUMBERS_DISPLAYED

    public static final int EDITOR_LINE_NUMBERS_DISPLAYED

  Flag to determine whether or not the editor will display line numbers.

  See Also:
    Constant Field Values

### WARNINGS_ARE_ERRORS

    public static final int WARNINGS_ARE_ERRORS

  Flag to determine whether or not assembler warnings are considered errors.

  See Also:
    Constant Field Values

### PROGRAM_ARGUMENTS

    public static final int PROGRAM_ARGUMENTS

  Flag to determine whether or not to display and use program arguments

  See Also:
    Constant Field Values

### DATA_SEGMENT_HIGHLIGHTING

    public static final int DATA_SEGMENT_HIGHLIGHTING

  Flag to control whether or not highlighting is applied to data segment window

  See Also:
    Constant Field Values

### REGISTERS_HIGHLIGHTING

    public static final int REGISTERS_HIGHLIGHTING

  Flag to control whether or not highlighting is applied to register windows

  See Also:
    Constant Field Values

### START_AT_MAIN

    public static final int START_AT_MAIN

  Flag to control whether or not assembler automatically initializes program counter to 'main's address

  See Also:
    Constant Field Values

### EDITOR_CURRENT_LINE_HIGHLIGHTING

    public static final int EDITOR_CURRENT_LINE_HIGHLIGHTING

  Flag to control whether or not editor will highlight the line currently being edited

  See Also:
    Constant Field Values

### POPUP_INSTRUCTION_GUIDANCE

    public static final int POPUP_INSTRUCTION_GUIDANCE

  Flag to control whether or not editor will provide popup instruction guidance while typing

  See Also:
    Constant Field Values

### POPUP_SYSCALL_INPUT

    public static final int POPUP_SYSCALL_INPUT

  Flag to control whether or not simulator will use popup dialog for input syscalls

  See Also:
    Constant Field Values

### GENERIC_TEXT_EDITOR

    public static final int GENERIC_TEXT_EDITOR

  Flag to control whether or not to use generic text editor instead of language-aware styled editor

  See Also:
    Constant Field Values

### AUTO_INDENT

    public static final int AUTO_INDENT

  Flag to control whether or not language-aware editor will use auto-indent feature

  See Also:
    Constant Field Values

### SELF_MODIFYING_CODE_ENABLED

    public static final int SELF_MODIFYING_CODE_ENABLED

  Flag to determine whether a program can write binary code to the text or data segment and execute that code.

  See Also:
    Constant Field Values

### defaultBooleanSettingsValues

    public static boolean[] defaultBooleanSettingsValues

  Last resort default values for boolean settings; will use only if neither the Preferences nor the properties file work. If you wish to change them, do so before instantiating the Settings object. Values are matched to keys by list position.

### EXCEPTION_HANDLER

    public static final int EXCEPTION_HANDLER

  Current specified exception handler file (a MIPS assembly source file)

  See Also:
    Constant Field Values

### TEXT_COLUMN_ORDER

    public static final int TEXT_COLUMN_ORDER

  Order of text segment table columns

  See Also:
    Constant Field Values

### LABEL_SORT_STATE

    public static final int LABEL_SORT_STATE

  State for sorting label window display

  See Also:
    Constant Field Values

### MEMORY_CONFIGURATION

    public static final int MEMORY_CONFIGURATION

  Identifier of current memory configuration

  See Also:
    Constant Field Values

### CARET_BLINK_RATE

    public static final int CARET_BLINK_RATE

  Caret blink rate in milliseconds, 0 means don't blink.

  See Also:
    Constant Field Values

### EDITOR_TAB_SIZE

    public static final int EDITOR_TAB_SIZE

  Editor tab size in characters.

  See Also:
    Constant Field Values

### EDITOR_POPUP_PREFIX_LENGTH

    public static final int EDITOR_POPUP_PREFIX_LENGTH

  Number of letters to be matched by editor's instruction guide before popup generated (if popup enabled)

  See Also:
    Constant Field Values

### EDITOR_FONT

    public static final int EDITOR_FONT

  Font for the text editor

  See Also:
    Constant Field Values

### EVEN_ROW_FONT

    public static final int EVEN_ROW_FONT

  Font for table even row background (text, data, register displays)

  See Also:
    Constant Field Values

### ODD_ROW_FONT

    public static final int ODD_ROW_FONT

  Font for table odd row background (text, data, register displays)

  See Also:
    Constant Field Values

### TEXTSEGMENT_HIGHLIGHT_FONT

    public static final int TEXTSEGMENT_HIGHLIGHT_FONT

  Font for table odd row foreground (text, data, register displays)

  See Also:
    Constant Field Values

### TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_FONT

    public static final int TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_FONT

  Font for text segment delay slot highlighted background

  See Also:
    Constant Field Values

### DATASEGMENT_HIGHLIGHT_FONT

    public static final int DATASEGMENT_HIGHLIGHT_FONT

  Font for text segment highlighted background

  See Also:
    Constant Field Values

### REGISTER_HIGHLIGHT_FONT

    public static final int REGISTER_HIGHLIGHT_FONT

  Font for register highlighted background

  See Also:
    Constant Field Values

### EVEN_ROW_BACKGROUND

    public static final int EVEN_ROW_BACKGROUND

  RGB color for table even row background (text, data, register displays)

  See Also:
    Constant Field Values

### EVEN_ROW_FOREGROUND

    public static final int EVEN_ROW_FOREGROUND

  RGB color for table even row foreground (text, data, register displays)

  See Also:
    Constant Field Values

### ODD_ROW_BACKGROUND

    public static final int ODD_ROW_BACKGROUND

  RGB color for table odd row background (text, data, register displays)

  See Also:
    Constant Field Values

### ODD_ROW_FOREGROUND

    public static final int ODD_ROW_FOREGROUND

  RGB color for table odd row foreground (text, data, register displays)

  See Also:
    Constant Field Values

### TEXTSEGMENT_HIGHLIGHT_BACKGROUND

    public static final int TEXTSEGMENT_HIGHLIGHT_BACKGROUND

  RGB color for text segment highlighted background

  See Also:
    Constant Field Values

### TEXTSEGMENT_HIGHLIGHT_FOREGROUND

    public static final int TEXTSEGMENT_HIGHLIGHT_FOREGROUND

  RGB color for text segment highlighted foreground

  See Also:
    Constant Field Values

### TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_BACKGROUND

    public static final int TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_BACKGROUND

  RGB color for text segment delay slot highlighted background

  See Also:
    Constant Field Values

### TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_FOREGROUND

    public static final int TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_FOREGROUND

  RGB color for text segment delay slot highlighted foreground

  See Also:
    Constant Field Values

### DATASEGMENT_HIGHLIGHT_BACKGROUND

    public static final int DATASEGMENT_HIGHLIGHT_BACKGROUND

  RGB color for text segment highlighted background

  See Also:
    Constant Field Values

### DATASEGMENT_HIGHLIGHT_FOREGROUND

    public static final int DATASEGMENT_HIGHLIGHT_FOREGROUND

  RGB color for text segment highlighted foreground

  See Also:
    Constant Field Values

### REGISTER_HIGHLIGHT_BACKGROUND

    public static final int REGISTER_HIGHLIGHT_BACKGROUND

  RGB color for register highlighted background

  See Also:
    Constant Field Values

### REGISTER_HIGHLIGHT_FOREGROUND

    public static final int REGISTER_HIGHLIGHT_FOREGROUND

  RGB color for register highlighted foreground

  See Also:
    Constant Field Values

Constructor Detail

### Settings

    public Settings()

  Create Settings object and set to saved values. If saved values not found, will set based on defaults stored in Settings.properties file. If file problems, will set based on defaults stored in this class.

### Settings

    public Settings(boolean gui)

  Create Settings object and set to saved values. If saved values not found, will set based on defaults stored in Settings.properties file. If file problems, will set based on defaults stored in this class.

  Parameters:
    `gui` - true if running the graphical IDE, false if running from command line. Ignored as of release 3.6 but retained for compatability.

Method Detail

### getBackSteppingEnabled

    public boolean getBackSteppingEnabled()

  Return whether backstepping is permitted at this time. Backstepping is ability to undo execution steps one at a time. Available only in the IDE. This is not a persistent setting and is not under MARS user control.

  Returns:
    true if backstepping is permitted, false otherwise.

### reset

    public void reset(boolean gui)

  Reset settings to default values, as described in the constructor comments.

  Parameters:
    `gui` - true if running from GUI IDE and false if running from command mode. Ignored as of release 3.6 but retained for compatibility.

### setEditorSyntaxStyleByPosition

    public void setEditorSyntaxStyleByPosition(int index,
                                               SyntaxStyle syntaxStyle)

### getEditorSyntaxStyleByPosition

    public SyntaxStyle getEditorSyntaxStyleByPosition(int index)

### getDefaultEditorSyntaxStyleByPosition

    public SyntaxStyle getDefaultEditorSyntaxStyleByPosition(int index)

### getBooleanSetting

    public boolean getBooleanSetting(int id)

  Fetch value of a boolean setting given its identifier.

  Parameters:
    `id` - int containing the setting's identifier (constants listed above)
  Returns:
    corresponding boolean setting.
  Throws:
    `IllegalArgumentException` - if identifier is invalid.

### getBareMachineEnabled

    public boolean getBareMachineEnabled()

  Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.BARE_MACHINE_ENABLED`)

  Setting for whether user programs limited to "bare machine" formatted basic instructions. This was added 8 Aug 2006 but is fixed at false for now, due to uncertainty as to what exactly constitutes "bare machine".

  Returns:
    true if only bare machine instructions allowed, false otherwise.

### getExtendedAssemblerEnabled

    public boolean getExtendedAssemblerEnabled()

  Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.EXTENDED_ASSEMBLER_ENABLED`)

  Setting for whether user programs can use pseudo-instructions or extended addressing modes or alternative instruction formats (all are implemented as pseudo-instructions).

  Returns:
    true if pseudo-instructions and formats permitted, false otherwise.

### getAssembleOnOpenEnabled

    public boolean getAssembleOnOpenEnabled()

  Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.ASSEMBLE_ON_OPEN_ENABLED`)

  Setting for whether selected program will be automatically assembled upon opening. This can be useful if user employs an external editor such as MIPSter.

  Returns:
    true if file is to be automatically assembled upon opening and false otherwise.

### getDisplayAddressesInHex

    public boolean getDisplayAddressesInHex()

  Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.DISPLAY_ADDRESSES_IN_HEX`)

  Setting for whether Addresses in the Execute pane will be displayed in hexadecimal.

  Returns:
    true if addresses are displayed in hexadecimal and false otherwise (decimal).

### getDisplayValuesInHex

    public boolean getDisplayValuesInHex()

  Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.DISPLAY_VALUES_IN_HEX`)

  Setting for whether values in the Execute pane will be displayed in hexadecimal.

  Returns:
    true if values are displayed in hexadecimal and false otherwise (decimal).

### getAssembleAllEnabled

    public boolean getAssembleAllEnabled()

  Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.ASSEMBLE_ALL_ENABLED`)

  Setting for whether the assemble operation applies only to the file currently open in the editor or whether it applies to all files in that file's directory (primitive project capability). If the "assemble on open" setting is set, this "assemble all" setting will be applied as soon as the file is opened.

  Returns:
    true if all files are to be assembled, false if only the file open in editor.

### getExceptionHandlerEnabled

    public boolean getExceptionHandlerEnabled()

  Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.EXCEPTION_HANDLER_ENABLED`)

  Setting for whether the currently selected exception handler (a MIPS source file) will be automatically included in each assemble operation.

  Returns:
    true if exception handler is to be included in assemble, false otherwise.

### getDelayedBranchingEnabled

    public boolean getDelayedBranchingEnabled()

  Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.DELAYED_BRANCHING_ENABLED`)

  Setting for whether delayed branching will be applied during MIPS program execution. If enabled, the statement following a successful branch will be executed and then the branch is taken! This simulates pipelining and all MIPS processors do it. However it is confusing to assembly language students so is disabled by default. SPIM does same thing.

  Returns:
    true if delayed branching is enabled, false otherwise.

### getLabelWindowVisibility

    public boolean getLabelWindowVisibility()

  Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.LABEL_WINDOW_VISIBILITY`)

  Setting concerning whether or not to display the Labels Window -- symbol table.

  Returns:
    true if label window is to be displayed, false otherwise.

### getEditorLineNumbersDisplayed

    public boolean getEditorLineNumbersDisplayed()

  Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.EDITOR_LINE_NUMBERS_DISPLAYED`)

  Setting concerning whether or not the editor will display line numbers.

  Returns:
    true if line numbers are to be displayed, false otherwise.

### getWarningsAreErrors

    public boolean getWarningsAreErrors()

  Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.WARNINGS_ARE_ERRORS`)

  Setting concerning whether or not assembler will consider warnings to be errors.

  Returns:
    true if warnings are considered errors, false otherwise.

### getProgramArguments

    public boolean getProgramArguments()

  Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.PROGRAM_ARGUMENTS`)

  Setting concerning whether or not program arguments can be entered and used.

  Returns:
    true if program arguments can be entered/used, false otherwise.

### getDataSegmentHighlighting

    public boolean getDataSegmentHighlighting()

  Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.DATA_SEGMENT_HIGHLIGHTING`)

  Setting concerning whether or not highlighting is applied to Data Segment window.

  Returns:
    true if highlighting is to be applied, false otherwise.

### getRegistersHighlighting

    public boolean getRegistersHighlighting()

  Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.REGISTERS_HIGHLIGHTING`)

  Setting concerning whether or not highlighting is applied to Registers, Coprocessor0, and Coprocessor1 windows.

  Returns:
    true if highlighting is to be applied, false otherwise.

### getStartAtMain

    public boolean getStartAtMain()

  Deprecated. Use `getBooleanSetting(int id)` with the appropriate boolean setting ID (e.g. `Settings.START_AT_MAIN`)

  Setting concerning whether or not assembler will automatically initialize the program counter to address of statement labeled 'main' if defined.

  Returns:
    true if it initializes to 'main', false otherwise.

### getExceptionHandler

    public String getExceptionHandler()

  Name of currently selected exception handler file.

  Returns:
    String pathname of current exception handler file, empty if none.

### getMemoryConfiguration

    public String getMemoryConfiguration()

  Returns identifier of current built-in memory configuration.

  Returns:
    String identifier of current built-in memory configuration, empty if none.

### getEditorFont

    public Font getEditorFont()

  Current editor font. Retained for compatibility but replaced by: getFontByPosition(Settings.EDITOR_FONT)

  Returns:
    Font object for current editor font.

### getFontByPosition

    public Font getFontByPosition(int fontSettingPosition)

  Retrieve a Font setting

  Parameters:
    `fontSettingPosition` - constant that identifies which item
  Returns:
    Font object for given item

### getDefaultFontByPosition

    public Font getDefaultFontByPosition(int fontSettingPosition)

  Retrieve a default Font setting

  Parameters:
    `fontSettingPosition` - constant that identifies which item
  Returns:
    Font object for given item

### getTextColumnOrder

    public int[] getTextColumnOrder()

  Order of text segment display columns (there are 5, numbered 0 to 4).

  Returns:
    Array of int indicating the order. Original order is 0 1 2 3 4.

### getCaretBlinkRate

    public int getCaretBlinkRate()

  Retrieve the caret blink rate in milliseconds. Blink rate of 0 means do not blink.

  Returns:
    int blink rate in milliseconds

### getEditorTabSize

    public int getEditorTabSize()

  Get the tab size in characters.

  Returns:
    tab size in characters.

### getEditorPopupPrefixLength

    public int getEditorPopupPrefixLength()

  Get number of letters to be matched by editor's instruction guide before popup generated (if popup enabled). Should be 1 or 2. If 1, the popup will be generated after first letter typed, based on all matches; if 2, the popup will be generated after second letter typed.

  Returns:
    number of letters (should be 1 or 2).

### getDefaultEditorTabSize

    public int getDefaultEditorTabSize()

  Get the text editor default tab size in characters

  Returns:
    tab size in characters

### getLabelSortState

    public String getLabelSortState()

  Get the saved state of the Labels Window sorting (can sort by either label or address and either ascending or descending order). Default state is 0, by ascending addresses.

  Returns:
    State value 0-7, as a String.

### getColorSettingByKey

    public Color getColorSettingByKey(String key)

  Get Color object for specified settings key. Returns null if key is not found or its value is not a valid color encoding.

  Parameters:
    `key` - the Setting key
  Returns:
    corresponding Color, or null if key not found or value not valid color

### getDefaultColorSettingByKey

    public Color getDefaultColorSettingByKey(String key)

  Get default Color value for specified settings key. Returns null if key is not found or its value is not a valid color encoding.

  Parameters:
    `key` - the Setting key
  Returns:
    corresponding default Color, or null if key not found or value not valid color

### getColorSettingByPosition

    public Color getColorSettingByPosition(int position)

  Get Color object for specified settings name (a static constant). Returns null if argument invalid or its value is not a valid color encoding.

  Parameters:
    `position` - the Setting name (see list of static constants)
  Returns:
    corresponding Color, or null if argument invalid or value not valid color

### getDefaultColorSettingByPosition

    public Color getDefaultColorSettingByPosition(int position)

  Get default Color object for specified settings name (a static constant). Returns null if argument invalid or its value is not a valid color encoding.

  Parameters:
    `position` - the Setting name (see list of static constants)
  Returns:
    corresponding default Color, or null if argument invalid or value not valid color

### setBooleanSetting

    public void setBooleanSetting(int id,
                                  boolean value)

  Set value of a boolean setting given its id and the value.

  Parameters:
    `id` - int containing the setting's identifier (constants listed above)
    `value` - boolean value to store
  Throws:
    `IllegalArgumentException` - if identifier is not valid.

### setExtendedAssemblerEnabled

    public void setExtendedAssemblerEnabled(boolean value)

  Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.EXTENDED_ASSEMBLER_ENABLED`)

  Establish setting for whether or not pseudo-instructions and formats are permitted in user programs. User can change this setting via the IDE. If setting changes, new setting will be written to properties file.

  Parameters:
    `value` - True to permit, false otherwise.

### setAssembleOnOpenEnabled

    public void setAssembleOnOpenEnabled(boolean value)

  Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.ASSEMBLE_ON_OPEN_ENABLED`)

  Establish setting for whether a file will be automatically assembled as soon as it is opened. This is handy for those using an external text editor such as Mipster. If setting changes, new setting will be written to properties file.

  Parameters:
    `value` - True to automatically assemble, false otherwise.

### setAssembleAllEnabled

    public void setAssembleAllEnabled(boolean value)

  Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.ASSEMBLE_ALL_ENABLED`)

  Establish setting for whether a file will be assembled by itself (false) or along with all other files in its directory (true). This permits multi-file programs and a primitive "project" capability. If setting changes, new setting will be written to properties file.

  Parameters:
    `value` - True to assemble all, false otherwise.

### setDisplayAddressesInHex

    public void setDisplayAddressesInHex(boolean value)

  Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.DISPLAY_ADDRESSES_IN_HEX`)

  Establish setting for whether addresses in the Execute pane will be displayed in hexadecimal format.

  Parameters:
    `value` - True to display addresses in hexadecimal, false for decimal.

### setDisplayValuesInHex

    public void setDisplayValuesInHex(boolean value)

  Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.DISPLAY_VALUES_IN_HEX`)

  Establish setting for whether values in the Execute pane will be displayed in hexadecimal format.

  Parameters:
    `value` - True to display values in hexadecimal, false for decimal.

### setLabelWindowVisibility

    public void setLabelWindowVisibility(boolean value)

  Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.LABEL_WINDOW_VISIBILITY`)

  Establish setting for whether the labels window (i.e. symbol table) will be displayed as part of the Text Segment display. If setting changes, new setting will be written to properties file.

  Parameters:
    `value` - True to dispay labels window, false otherwise.

### setExceptionHandlerEnabled

    public void setExceptionHandlerEnabled(boolean value)

  Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.EXCEPTION_HANDLER_ENABLED`)

  Establish setting for whether the currently selected exception handler (a MIPS source file) will be automatically included in each assemble operation. If setting changes, new setting will be written to properties file.

  Parameters:
    `value` - True to assemble exception handler, false otherwise.

### setDelayedBranchingEnabled

    public void setDelayedBranchingEnabled(boolean value)

  Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.DELAYED_BRANCHING_ENABLED`)

  Establish setting for whether delayed branching will be applied during MIPS program execution. If enabled, the statement following a successful branch will be executed and then the branch is taken! This simulates pipelining and all MIPS processors do it. However it is confusing to assembly language students so is disabled by default. SPIM does same thing.

  Parameters:
    `value` - True to enable delayed branching, false otherwise.

### setEditorLineNumbersDisplayed

    public void setEditorLineNumbersDisplayed(boolean value)

  Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.EDITOR_LINE_NUMBERS_DISPLAYED`)

  Establish setting for whether line numbers will be displayed by the text editor.

  Parameters:
    `value` - True to display line numbers, false otherwise.

### setWarningsAreErrors

    public void setWarningsAreErrors(boolean value)

  Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.WARNINGS_ARE_ERRORS`)

  Establish setting for whether assembler warnings will be considered errors.

  Parameters:
    `value` - True to consider warnings to be errors, false otherwise.

### setProgramArguments

    public void setProgramArguments(boolean value)

  Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.PROGRAM_ARGUMENTS`)

  Establish setting for whether program arguments can be ented/used.

  Parameters:
    `value` - True if program arguments can be entered/used, false otherwise.

### setDataSegmentHighlighting

    public void setDataSegmentHighlighting(boolean value)

  Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.DATA_SEGMENT_HIGHLIGHTING`)

  Establish setting for whether highlighting is to be applied to Data Segment window.

  Parameters:
    `value` - True if highlighting is to be applied, false otherwise.

### setRegistersHighlighting

    public void setRegistersHighlighting(boolean value)

  Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.REGISTERS_HIGHLIGHTING`)

  Establish setting for whether highlighting is to be applied to Registers, Coprocessor0 and Coprocessor1 windows.

  Parameters:
    `value` - True if highlighting is to be applied, false otherwise.

### setStartAtMain

    public void setStartAtMain(boolean value)

  Deprecated. Use `setBooleanSetting(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.START_AT_MAIN`)

  Establish setting for whether assembler will automatically initialize program counter to address of statement labeled 'main' if defined.

  Parameters:
    `value` - True if PC set to address of 'main', false otherwise.

### setBooleanSettingNonPersistent

    public void setBooleanSettingNonPersistent(int id,
                                               boolean value)

  Temporarily establish boolean setting. This setting will NOT be written to persisent store! Currently this is used only when running MARS from the command line

  Parameters:
    `id` - setting identifier. These are defined for this class as static final int.
    `value` - True to enable the setting, false otherwise.

### setDelayedBranchingEnabledNonPersistent

    public void setDelayedBranchingEnabledNonPersistent(boolean value)

  Deprecated. Use `setBooleanSettingNonPersistent(int id, boolean value)` with the appropriate boolean setting ID (e.g. `Settings.DELAYED_BRANCHING_ENABLED`)

  Establish setting for whether delayed branching will be applied during MIPS program execution. This setting will NOT be written to persisent store! This method should be called only to temporarily set this setting -- currently this is needed only when running MARS from the command line.

  Parameters:
    `value` - True to enabled delayed branching, false otherwise.

### setExceptionHandler

    public void setExceptionHandler(String newFilename)

  Set name of exception handler file and write it to persistent storage.

  Parameters:
    `newFilename` - name of exception handler file

### setMemoryConfiguration

    public void setMemoryConfiguration(String config)

  Store the identifier of the memory configuration.

  Parameters:
    `config` - A string that identifies the current built-in memory configuration

### setCaretBlinkRate

    public void setCaretBlinkRate(int rate)

  Set the caret blinking rate in milliseconds. Rate of 0 means no blinking.

  Parameters:
    `rate` - blink rate in milliseconds

### setEditorTabSize

    public void setEditorTabSize(int size)

  Set the tab size in characters.

  Parameters:
    `size` - tab size in characters.

### setEditorPopupPrefixLength

    public void setEditorPopupPrefixLength(int length)

  Set number of letters to be matched by editor's instruction guide before popup generated (if popup enabled). Should be 1 or 2. If 1, the popup will be generated after first letter typed, based on all matches; if 2, the popup will be generated after second letter typed.

  Parameters:
    `number` - of letters (should be 1 or 2).

### setEditorFont

    public void setEditorFont(Font font)

  Set editor font to the specified Font object and write it to persistent storage. This method retained for compatibility but replaced by: setFontByPosition(Settings.EDITOR_FONT, font)

  Parameters:
    `font` - Font object to be used by text editor.

### setFontByPosition

    public void setFontByPosition(int fontSettingPosition,
                                  Font font)

  Store a Font setting

  Parameters:
    `fontSettingPosition` - Constant that identifies the item the font goes with

### setTextColumnOrder

    public void setTextColumnOrder(int[] columnOrder)

  Store the current order of Text Segment window table columns, so the ordering can be preserved and restored.

  Parameters:
    `columnOrder` - An array of int indicating column order.

### setLabelSortState

    public void setLabelSortState(String state)

  Store the current state of the Labels Window sorter. There are 8 possible states as described in LabelsWindow.java

  Parameters:
    `state` - The current labels window sorting state, as a String.

### setColorSettingByKey

    public void setColorSettingByKey(String key,
                                     Color color)

  Set Color object for specified settings key. Has no effect if key is invalid.

  Parameters:
    `key` - the Setting key
    `color` - the Color to save

### setColorSettingByPosition

    public void setColorSettingByPosition(int position,
                                          Color color)

  Set Color object for specified settings name (a static constant). Has no effect if invalid.

  Parameters:
    `position` - the Setting name (see list of static constants)
    `color` - the Color to save

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD