Interface LayoutModel

All Superinterfaces:
Iterable<Layout>
All Known Implementing Classes:
ClangLayoutController, EmptyBigLayoutModel, ListingModelAdapter, TestBigLayoutModel

public interface LayoutModel extends Iterable<Layout>
The Big Layout Model interface. Objects that implement this interface can be dispayed using a BigFieldPanel.
  • Method Details

    • isUniform

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

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

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

      BigInteger getIndexAfter(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

      BigInteger getIndexBefore(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(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.
      Specified by:
      iterator in interface Iterable<Layout>
      Returns:
      new iterator
    • iterator

      default LayoutModelIterator iterator(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 beginning 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.