Class TestBigLayoutModel

  • All Implemented Interfaces:
    LayoutModel

    public class TestBigLayoutModel
    extends java.lang.Object
    implements LayoutModel
    • Constructor Summary

      Constructors 
      Constructor Description
      TestBigLayoutModel​(java.awt.FontMetrics fm, java.lang.String name, java.math.BigInteger numIndexes)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete 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.
      static void main​(java.lang.String[] args)  
      void removeLayoutModelListener​(LayoutModelListener listener)
      Removes a LayoutModelListener to be notified when changes occur.
      void setNumIndexes​(java.math.BigInteger n)  
      protected void updateData​(int i, int j)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TestBigLayoutModel

        public TestBigLayoutModel​(java.awt.FontMetrics fm,
                                  java.lang.String name,
                                  java.math.BigInteger numIndexes)
    • Method Detail

      • setNumIndexes

        public void setNumIndexes​(java.math.BigInteger n)
      • isUniform

        public boolean isUniform()
        Description copied from interface: LayoutModel
        Returns true if every index returns a non-null layout and all the layouts are the same height.
        Specified by:
        isUniform in interface LayoutModel
      • getPreferredViewSize

        public java.awt.Dimension getPreferredViewSize()
        Description copied from interface: LayoutModel
        Returns the width of the largest possible layout.
        Specified by:
        getPreferredViewSize in interface LayoutModel
      • getNumIndexes

        public java.math.BigInteger getNumIndexes()
        Description copied from interface: LayoutModel
        Returns the total number of indexes.
        Specified by:
        getNumIndexes in interface LayoutModel
      • getLayout

        public Layout getLayout​(java.math.BigInteger index)
        Description copied from interface: LayoutModel
        Returns a layout for the given index.
        Specified by:
        getLayout in interface LayoutModel
        Parameters:
        index - the index of the layout to retrieve.
      • addLayoutModelListener

        public void addLayoutModelListener​(LayoutModelListener listener)
        Description copied from interface: LayoutModel
        Adds a LayoutModelListener to be notified when changes occur.
        Specified by:
        addLayoutModelListener in interface LayoutModel
        Parameters:
        listener - the LayoutModelListener to add.
      • removeLayoutModelListener

        public void removeLayoutModelListener​(LayoutModelListener listener)
        Description copied from interface: LayoutModel
        Removes a LayoutModelListener to be notified when changes occur.
        Specified by:
        removeLayoutModelListener in interface LayoutModel
        Parameters:
        listener - the LayoutModelListener to remove.
      • getIndexAfter

        public java.math.BigInteger getIndexAfter​(java.math.BigInteger index)
        Description copied from interface: LayoutModel
        Returns the closest larger index in the model that has a non-null layout.
        Specified by:
        getIndexAfter in interface LayoutModel
        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

        public java.math.BigInteger getIndexBefore​(java.math.BigInteger index)
        Description copied from interface: LayoutModel
        Returns the closest smaller index in the model that has a non-null layout.
        Specified by:
        getIndexBefore in interface LayoutModel
        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.
      • main

        public static void main​(java.lang.String[] args)
      • updateData

        protected void updateData​(int i,
                                  int j)
      • flushChanges

        public void flushChanges()
        Description copied from interface: LayoutModel
        Returns true if the model knows about changes that haven't yet been told to the LayoutModelListeners.
        Specified by:
        flushChanges in interface LayoutModel