Class FormatManager

    • Field Detail


        public static final java.lang.String ARRAY_OPTIONS_GROUP
        See Also:
        Constant Field Values

        public static final java.lang.String HIGHLIGHT_COLOR_NAME
        See Also:
        Constant Field Values

        public static final java.lang.String HIGHLIGHT_ALT_COLOR_NAME
        See Also:
        Constant Field Values

        public static final java.lang.String ARRAY_DISPLAY_OPTIONS
        See Also:
        Constant Field Values

        public static final java.lang.String ARRAY_DISPLAY_DESCRIPTION
        See Also:
        Constant Field Values
    • Constructor Detail

      • FormatManager

        public FormatManager​(ToolOptions displayOptions,
                             ToolOptions fieldOptions)
        Constructs a new FormatManager.
        displayOptions - the Options containing display options (color, fonts, etc)
        fieldOptions - the Options contains specific field options.
    • Method Detail

      • dispose

        public void dispose()
      • setServiceProvider

        public void setServiceProvider​(ServiceProvider provider)
        Sets the service provider used by the field factory objects.
        provider - the service provider
      • addFormatModelListener

        public void addFormatModelListener​(FormatModelListener listener)
        Adds a listener to be notified when a format changes.
        listener - the listener to be added.
      • removeFormatModleListener

        public void removeFormatModleListener​(FormatModelListener listener)
        Removes the given listener from the list of listeners to be notified of a format change.
        listener - the listener to be removed.
      • getNumModels

        public int getNumModels()
        Returns the total number of model in the format manager.
      • getModel

        public FieldFormatModel getModel​(int index)
        Returns the format model for the given index.
        inde - the index of the format model to return.
      • getDividerModel

        public FieldFormatModel getDividerModel()
        Returns the format model for the address break (divider)
      • getPlateFormat

        public FieldFormatModel getPlateFormat()
        Returns the format model for the plate field
      • getFunctionFormat

        public FieldFormatModel getFunctionFormat()
        Returns the format model for the function signature
      • getFunctionVarFormat

        public FieldFormatModel getFunctionVarFormat()
        Returns the format model for the function variables.
      • getCodeUnitFormat

        public FieldFormatModel getCodeUnitFormat()
        Returns the format model for a code unit.
        cu - the code unit for which to get a model. The cu is used in case there is a custom format for it.
        useCustomFormats - if true seaches for a custom format for the code unit, otherwise always returns the basic instruction/data format model.
      • getOpenDataFormat

        public FieldFormatModel getOpenDataFormat​(Data data)
        Returns the format model to use for the internals of open structures.
        data - the data code unit to get the format model for.
        useCustomFormats - if true, tries to find a custom format model, otherwise always uses the default open data model.
      • update

        public void update()
        update all listeners that a model has changed.
      • getDisplayOptions

        public ToolOptions getDisplayOptions()
        Returns the Options used for display properties.
      • getFieldOptions

        public ToolOptions getFieldOptions()
        Returns the Options used for field specific properties.
      • modelChanged

        public void modelChanged​(FieldFormatModel model)
        Notifies listeners that the given model has changed.
        mode - the format model that changed.
      • getMaxWidth

        public int getMaxWidth()
        Returns the width of the widest model in this manager.
      • getMaxRowCount

        public int getMaxRowCount()
      • getMaxNumRows

        public int getMaxNumRows()
        Returns the maximum number of possible rows in a layout. This would only occur if some address had every possible type of information to be displayed.
      • setDefaultFormat

        public void setDefaultFormat​(int modelID)
        Resets the model with the given id to its default format.
        modelID - the id of the model to reset.
      • setDefaultFormats

        public void setDefaultFormats()
        Resets all format models to their default format.
      • optionsChanged

        public void optionsChanged​(ToolOptions options,
                                   java.lang.String name,
                                   java.lang.Object oldValue,
                                   java.lang.Object newValue)
        Description copied from interface: OptionsChangeListener
        Notification that an option changed.

        Note: to reject an options change, you can throw a OptionsVetoException.

        Specified by:
        optionsChanged in interface OptionsChangeListener
        options - options object containing the property that changed
        name - name of option that changed
        oldValue - old value of the option
        newValue - new value of the option
      • saveState

        public void saveState​(SaveState saveState)
        Saves the state of this LayoutManager to the SaveState object.
        saveState - the SaveState object to write to.
      • readState

        public void readState​(SaveState saveState)
        Restores the state of this LayoutController from the given SaveState object.
        saveState - the SaveState to read from.