Java Doc for RecentFileMenu.java in  » Testing » KeY » de » uka » ilkd » key » gui » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » KeY » de.uka.ilkd.key.gui 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   de.uka.ilkd.key.gui.RecentFileMenu

RecentFileMenu
public class RecentFileMenu (Code)
This class offers a mechanism to manage recent files; it adds the necessary menu items to a menu or even can provide that menu itself. also it offers a way to read the recent files from a java.util.Properties object and can store them again to a Properties object. This class is a result of the fusion of the RecentFileBuffer and RecentFiles classes. It's not a Menu in itself!!!
author:
   Ute Platzer, with a lot of input from Volker Braun.

Inner Class :public static class RecentFileEntry


Constructor Summary
public  RecentFileMenu(ActionListener listener, int maxNumberOfEntries, Properties p)
     Create a new RecentFiles list.
Parameters:
  listener - the ActionListener that will be notified of the userclicked on a recent file menu entry.

Method Summary
public  voidaddRecentFile(String name)
     call this method to add a new file to the beginning of the RecentFiles list.
public  StringgetAbsolutePath(JMenuItem item)
    
public  JMenugetMenu()
     the menu where the recent files are kept.
public  RecentFileEntrygetMostRecent()
    
public  voidload(Properties p)
     read the recent file names from the properties object.
public  voidload(String filename)
    
public  voidsetMaxNumberOfEntries(int max)
     specify the maximal number of recent files in the list.
public  voidstore(Properties p)
     Put the names of the recent Files into the properties object.
public  voidstore(String filename)
     write the recent file names to the given properties file.


Constructor Detail
RecentFileMenu
public RecentFileMenu(ActionListener listener, int maxNumberOfEntries, Properties p)(Code)
Create a new RecentFiles list.
Parameters:
  listener - the ActionListener that will be notified of the userclicked on a recent file menu entry. The selected filename can bedetermined with the ActionEvent's getSource() method, cast the Objectinto a JMenuItem and call the getLabel() method.
Parameters:
  maxNumberOfEntries - the maximal number of items/entries in therecent file menu.
Parameters:
  p - a Properties object containing information about the recentfiles to be displayed initially.Or null to use no initial information.




Method Detail
addRecentFile
public void addRecentFile(String name)(Code)
call this method to add a new file to the beginning of the RecentFiles list. If the name is already part of the list, it will be moved to the first position. No more than a specified maximum number of names will be allowed in the list, and additional names will be removed at the end. (set the maximum number with the RecentFileMenu.setMaxNumberOfEntries(int i) method).
Parameters:
  name - the name of the file.



getAbsolutePath
public String getAbsolutePath(JMenuItem item)(Code)



getMenu
public JMenu getMenu()(Code)
the menu where the recent files are kept. If the user didn't specify one in the constructor, a new JMenu is created. It can be accessed via this method.



getMostRecent
public RecentFileEntry getMostRecent()(Code)



load
public void load(Properties p)(Code)
read the recent file names from the properties object. the property names are expected to be "RecentFile0" "RecentFile1" ...



load
public void load(String filename)(Code)
read the recent files from the given properties file



setMaxNumberOfEntries
public void setMaxNumberOfEntries(int max)(Code)
specify the maximal number of recent files in the list. The default is 5



store
public void store(Properties p)(Code)
Put the names of the recent Files into the properties object. The property names are "RecentFile0" "RecentFile1" ... The values are fully qualified path names.



store
public void store(String filename)(Code)
write the recent file names to the given properties file. the file will be read (if it exists) and then re-written so no information will be lost.



Methods inherited from java.lang.Object
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object o)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public void notify() throws IllegalMonitorStateException(Code)(Java Doc)
final public void notifyAll() throws IllegalMonitorStateException(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public void wait() throws IllegalMonitorStateException, InterruptedException(Code)(Java Doc)
final public void wait(long ms) throws IllegalMonitorStateException, InterruptedException(Code)(Java Doc)
final public void wait(long ms, int ns) throws IllegalMonitorStateException, InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.