Class DataChangeEvent

  • All Implemented Interfaces:
    Serializable

    public class DataChangeEvent
    extends EventObject
    An event indicating that the underlying containers have changed.
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Indices

        protected int[] m_Indices
        the indices of the modified containers.
    • Constructor Detail

      • DataChangeEvent

        public DataChangeEvent​(AbstractContainerManager source,
                               DataChangeEvent.Type type,
                               int index)
        Initializes the event.
        Parameters:
        source - the manager that triggered the event
        type - the type of event
        index - the relevant index
      • DataChangeEvent

        public DataChangeEvent​(AbstractContainerManager source,
                               DataChangeEvent.Type type,
                               int index,
                               AbstractContainer cont)
        Initializes the event.
        Parameters:
        source - the manager that triggered the event
        type - the type of event
        index - the relevant index
        cont - the old container, can be null
      • DataChangeEvent

        public DataChangeEvent​(AbstractContainerManager source,
                               DataChangeEvent.Type type,
                               int[] indices)
        Initializes the event.
        Parameters:
        source - the manager that triggered the event
        type - the type of event
        indices - the relevant indices, can be null
      • DataChangeEvent

        public DataChangeEvent​(AbstractContainerManager source,
                               DataChangeEvent.Type type,
                               int[] indices,
                               AbstractContainer[] cont)
        Initializes the event.
        Parameters:
        source - the manager that triggered the event
        type - the type of event
        indices - the relevant indices, can be null
        cont - the old containers, can be null
    • Method Detail

      • getManager

        public AbstractContainerManager getManager()
        Returns the manager that triggered the event.
        Returns:
        the manager
      • getIndices

        public int[] getIndices()
        Returns the relevant indices, can be null.
        Returns:
        the indices, can be null
      • getContainers

        public AbstractContainer[] getContainers()
        Returns the old containers, can be null.
        Returns:
        the containers, can be null
      • toString

        public String toString()
        Returns a short string representation of the event.
        Overrides:
        toString in class EventObject
        Returns:
        the string representation