Class Macro

    • Constructor Detail

      • Macro

        public Macro()
        Constructor.
      • Macro

        public Macro​(String name)
        Constructor.
        Parameters:
        name - The name of the macro.
      • Macro

        public Macro​(String name,
                     List<org.fife.ui.rtextarea.Macro.MacroRecord> records)
        Constructor.
        Parameters:
        name - The name of the macro.
        records - The initial records of the macro.
    • Method Detail

      • addMacroRecord

        public void addMacroRecord​(org.fife.ui.rtextarea.Macro.MacroRecord record)
        Adds a macro record to this macro.
        Parameters:
        record - The record to add. If null, nothing happens.
        See Also:
        getMacroRecords()
      • getName

        public String getName()
        Returns the name of this macro. A macro's name is simply something to identify it with in a UI; it has nothing to do with the name of the file to save the macro to.
        Returns:
        The macro's name.
        See Also:
        setName(String)
      • saveToFile

        public void saveToFile​(File file)
                        throws IOException
        Saves this macro to an XML file. This file can later be read in by the constructor taking a File parameter; this is the mechanism for saving macros.
        Parameters:
        file - The file in which to save the macro.
        Throws:
        IOException - If an error occurs while generating the XML for the output file.
        See Also:
        saveToFile(String)
      • saveToFile

        public void saveToFile​(String fileName)
                        throws IOException
        Saves this macro to a file. This file can later be read in by the constructor taking a File parameter; this is the mechanism for saving macros.
        Parameters:
        fileName - The name of the file in which to save the macro.
        Throws:
        IOException - If an error occurs while generating the XML for the output file.
        See Also:
        saveToFile(File)
      • setName

        public void setName​(String name)
        Sets the name of this macro. A macro's name is simply something to identify it with in a UI; it has nothing to do with the name of the file to save the macro to.
        Parameters:
        name - The new name for the macro.
        See Also:
        getName()