Module com.iamsoft.util.ui
Package com.iamsoft.util.ui.swing.mdi
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InternalFrameListModel(InternalFrameContentListModel pInternalFrameContentListModel)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListDataListener(ListDataListener pListener)
protected void
fireContentsChanged(Object pSrc, int pIdx0, int pIdx1)
protected void
fireIntervalAdded(Object pSrc, int pIdx0, int pIdx1)
protected void
fireIntervalRemoved(Object pSrc, int pIdx0, int pIdx1)
T
getElementAt(int pIdx)
int
getSize()
void
removeListDataListener(ListDataListener pListener)
static List<String>
toStringList(Collection<? extends JInternalFrame> pColl)
Construct list of frame titles.
-
-
-
Constructor Detail
-
InternalFrameListModel
public InternalFrameListModel(InternalFrameContentListModel pInternalFrameContentListModel)
-
-
Method Detail
-
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 interfaceListModel<T extends JInternalFrame>
-
removeListDataListener
public void removeListDataListener(ListDataListener pListener)
- Specified by:
removeListDataListener
in interfaceListModel<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)
-
-