Package esmska.data

Class Log


  • public class Log
    extends java.lang.Object
    Class for collecting user-side log messages
    • Field Detail

      • ACTION_ADD_RECORD

        public static final int ACTION_ADD_RECORD
        new record added
        See Also:
        Constant Field Values
      • ACTION_REMOVE_RECORD

        public static final int ACTION_REMOVE_RECORD
        existing record removed
        See Also:
        Constant Field Values
      • ACTION_CLEAR_RECORDS

        public static final int ACTION_CLEAR_RECORDS
        all records deleted
        See Also:
        Constant Field Values
    • Method Detail

      • addActionListener

        public void addActionListener​(java.awt.event.ActionListener actionListener)
      • removeActionListener

        public void removeActionListener​(java.awt.event.ActionListener actionListener)
      • getInstance

        public static Log getInstance()
        Get shared instance
      • getRecords

        public java.util.List<Log.Record> getRecords()
        get all records in unmodifiable list
      • addRecord

        public void addRecord​(Log.Record record)
        add new record
      • removeRecord

        public void removeRecord​(Log.Record record)
        remove existing record
      • clearRecords

        public void clearRecords()
        delete all records
      • size

        public int size()
        Return number of records
        Returns:
        See Collection.size()
      • isEmpty

        public boolean isEmpty()
        Return if there are no records
        Returns:
        See Collection.isEmpty()
      • getLastRecord

        public Log.Record getLastRecord()
        Get lastly added record
        Returns:
        last record or null if log empty