Class InternalFrameContentListModel

  • All Implemented Interfaces:
    Serializable, ListModel<Container>

    public class InternalFrameContentListModel
    extends AbstractListModel<Container>
    Maintains a list of content panes. List is ordered by last focus. When focus is transferred, new focus owner is removed from list and re-added at the front. Consequently, two events are fired upon focus change. Guaranteed never to fire a list data changed event. Even if content pane is changed, this class continues to listen for focus with the old container. May face problems if frame focus is transferred without an internal component that grabs focus.
    See Also:
    JInternalFrame.getContentPane(), Serialized Form
    • Constructor Detail

      • InternalFrameContentListModel

        public InternalFrameContentListModel​(JDesktopPane pDesktop)
    • Method Detail

      • getElementAt

        public Container getElementAt​(int pIdx)
      • getSize

        public int getSize()
      • getPaneToFrame

        public Map<Container,​JInternalFrame> getPaneToFrame()
        After a ListModelEvent is fired, the size of this map is guaranteed to be equal to the number of open frames. Thus, to test whether 'remove' event is the result of a focus change, test whether getSize() == getPaneToFrame().size().
        Returns:
        Map from content pane to associated internal frame.