|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.argouml.ui.menubar.LastRecentlyUsedMenuList
menu extension for last recently used files menu functionality: it is created with a link to the (file-)menu, if it is created it is reading its content from config information the add entry method adds a specific filename to the list, ensures that it bubbles at top of list if it is already member of list typically called by SaveFile method LRU is added at the specific position at creation time and all entries are going to be inserted or deletied
Field Summary | |
private ConfigurationKey[] |
_confKeys
Array of conf keys for accessing the stored entries |
private javax.swing.JMenu |
_fileMenu
menu where the list is bound to |
private int |
_lruCount
recent loaded count |
private int |
_maxCount
maxcount read from configuration |
private int |
_maxCountDefault
default value for maxcount if there is no configuration |
private int |
_menuIndex
index where the menu entries should be inserted -1 to be sure (adds at end) |
private javax.swing.JMenuItem[] |
_menuItems
menuitems actually created and added to menu |
Constructor Summary | |
LastRecentlyUsedMenuList(javax.swing.JMenu filemenu)
Creates a new instance of LastRecentlyUsedMenuList with respect to the menu where the lru is bound to |
Method Summary | |
void |
addEntry(java.lang.String filename)
Adds a new entry to lru list and removes the last one if if it increases maxCount |
private javax.swing.JMenuItem |
addEventHandler(java.lang.String filename,
int addAt)
Adds the eventhandler to the menu and renames the entry |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final int _maxCountDefault
private javax.swing.JMenu _fileMenu
private int _lruCount
private int _maxCount
private int _menuIndex
private javax.swing.JMenuItem[] _menuItems
private ConfigurationKey[] _confKeys
Constructor Detail |
public LastRecentlyUsedMenuList(javax.swing.JMenu filemenu)
filemenu
- at this menu the lru is bound after last entry
it is added with a separatorMethod Detail |
private javax.swing.JMenuItem addEventHandler(java.lang.String filename, int addAt)
public void addEntry(java.lang.String filename)
filename
- name of link which is to be used to represent
_and_ reopen the file
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20040316) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |