Class InternalFrameListModel<T extends JInternalFrame>

java.lang.Object
com.iamsoft.util.ui.swing.mdi.InternalFrameListModel<T>
Type Parameters:
T - Frame type.
All Implemented Interfaces:
Serializable, ListModel<T>

public class InternalFrameListModel<T extends JInternalFrame> extends Object
Maintains an ordered list of internal frames. List is ordered by last focus. When focus is transferred, a list data changed event is fired, spanning from 0 to the original index of the new focus owner. Thus all 'add' and 'remove' events correspond to a true window opening or closing. Note that, when split pane view is enabled, the true order of the internal frames may not match the list model's order. The desktop is guaranteed to be reorganized, however, as soon split pane view is disabled (and before any related CardLayout PropertyChangeEvents events are fired).
See Also:
  • Constructor Details

  • Method Details

    • getElementAt

      public T getElementAt(int pIdx)
    • getSize

      public int getSize()
    • toStringList

      public static List<String> toStringList(Collection<? extends JInternalFrame> pColl)
      Construct list of frame titles. For debugging purposes.
    • addListDataListener

      public void addListDataListener(ListDataListener pListener)
      Specified by:
      addListDataListener in interface ListModel<T extends JInternalFrame>
    • removeListDataListener

      public void removeListDataListener(ListDataListener pListener)
      Specified by:
      removeListDataListener in interface ListModel<T extends JInternalFrame>
    • fireContentsChanged

      protected void fireContentsChanged(Object pSrc, int pIdx0, int pIdx1)
    • fireIntervalAdded

      protected void fireIntervalAdded(Object pSrc, int pIdx0, int pIdx1)
    • fireIntervalRemoved

      protected void fireIntervalRemoved(Object pSrc, int pIdx0, int pIdx1)