Interface LayoutModel

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      void addLayoutModelListener​(LayoutModelListener listener)
      Adds a LayoutModelListener to be notified when changes occur.
      void flushChanges()
      Returns true if the model knows about changes that haven't yet been told to the LayoutModelListeners.
      java.math.BigInteger getIndexAfter​(java.math.BigInteger index)
      Returns the closest larger index in the model that has a non-null layout.
      java.math.BigInteger getIndexBefore​(java.math.BigInteger index)
      Returns the closest smaller index in the model that has a non-null layout.
      Layout getLayout​(java.math.BigInteger index)
      Returns a layout for the given index.
      java.math.BigInteger getNumIndexes()
      Returns the total number of indexes.
      java.awt.Dimension getPreferredViewSize()
      Returns the width of the largest possible layout.
      boolean isUniform()
      Returns true if every index returns a non-null layout and all the layouts are the same height.
      default LayoutModelIterator iterator()
      Returns an iterator that walks all the Layout items in this model.
      default LayoutModelIterator iterator​(java.math.BigInteger startIndex)
      Returns an iterator that walks all the Layout items in this model, starting at the specified index.
      void removeLayoutModelListener​(LayoutModelListener listener)
      Removes a LayoutModelListener to be notified when changes occur.
    • Method Detail

      • isUniform

        boolean isUniform()
        Returns true if every index returns a non-null layout and all the layouts are the same height.
      • getPreferredViewSize

        java.awt.Dimension getPreferredViewSize()
        Returns the width of the largest possible layout.
      • getNumIndexes

        java.math.BigInteger getNumIndexes()
        Returns the total number of indexes.
      • getIndexAfter

        java.math.BigInteger getIndexAfter​(java.math.BigInteger index)
        Returns the closest larger index in the model that has a non-null layout.
        Parameters:
        index - for which to find the next index with a non-null layout.
        Returns:
        returns the closest larger index in the model that has a non-null layout.
      • getIndexBefore

        java.math.BigInteger getIndexBefore​(java.math.BigInteger index)
        Returns the closest smaller index in the model that has a non-null layout.
        Parameters:
        index - for which to find the previous index with a non-null layout.
        Returns:
        returns the closest smaller index in the model that has a non-null layout.
      • getLayout

        Layout getLayout​(java.math.BigInteger index)
        Returns a layout for the given index.
        Parameters:
        index - the index of the layout to retrieve.
      • iterator

        default LayoutModelIterator iterator()
        Returns an iterator that walks all the Layout items in this model.
        Returns:
        new iterator
      • iterator

        default LayoutModelIterator iterator​(java.math.BigInteger startIndex)
        Returns an iterator that walks all the Layout items in this model, starting at the specified index.
        Parameters:
        startIndex - start index in the model to begining iterating
        Returns:
        new iterator
      • addLayoutModelListener

        void addLayoutModelListener​(LayoutModelListener listener)
        Adds a LayoutModelListener to be notified when changes occur.
        Parameters:
        listener - the LayoutModelListener to add.
      • removeLayoutModelListener

        void removeLayoutModelListener​(LayoutModelListener listener)
        Removes a LayoutModelListener to be notified when changes occur.
        Parameters:
        listener - the LayoutModelListener to remove.
      • flushChanges

        void flushChanges()
        Returns true if the model knows about changes that haven't yet been told to the LayoutModelListeners.