Module com.iamsoft.util.ui
Package com.iamsoft.util.ui.swing.mdi
Class InternalFrameContentListModel
java.lang.Object
javax.swing.AbstractListModel<Container>
com.iamsoft.util.ui.swing.mdi.InternalFrameContentListModel
- All Implemented Interfaces:
Serializable
,ListModel<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.
-
Field Summary
Fields inherited from class javax.swing.AbstractListModel
listenerList
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetElementAt
(int pIdx) After a ListModelEvent is fired, the size of this map is guaranteed to be equal to the number of open frames.int
getSize()
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
-
Constructor Details
-
InternalFrameContentListModel
-
-
Method Details
-
getElementAt
-
getSize
public int getSize() -
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.
-