edu.rice.cs.drjava.ui

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 » IDE » DrJava » edu.rice.cs.drjava.ui 
edu.rice.cs.drjava.ui
The ui package contains classes for the default user interface for DrJava. The interface allows multiple documents to be open, but requires that exactly one document is active at any time, since only one document is displayed in the GUI. This is enforced by subclassing the DefaultGlobalModel in the model package to add additional constraints to the logic and state of DrJava, while maintaining the separation from the pure user interface classes.

Additional Logic

The SingleDisplayModel is a subclass of DefaultGlobalModel, primarily providing the constraint that exactly one document is active at any time. It adds public methods for getting and setting the currently active document to the interface provided by GlobalModel, and fires a corresponding event through the SingleDisplayModelListener class, which is a subclass of GlobalModelListener.

Note that this behavior is not included in the DefaultGlobalModel because the notion of a single active document is specific to this user interface. Alternative GUIs might choose to display multiple documents simultaneously, eliminating the need for this additional constraint. Housing this logic in a subclass of DefaultGlobalModel, rather than in MainFrame itself, allows us to verify through unit tests that only one document can be active.

User Interface

The graphical user interface is implemented in Swing and is coordinated through the MainFrame class. The general layout and primary components of the interface are shown in the image below.

DrJava GUI

MainFrame

The MainFrame is the JFrame which houses all other components of the GUI. It is solely a means of displaying the state and logic kept within its SingleDisplayModel, and maintains as little state of its own as possible. The MainFrame consists of a JMenuBar containing the menus, current filename, and toolbar buttons, together with a collection of panes for displaying the various components of DrJava. These include a scrollable JList with the OpenDefinitionDocuments, a DefinitionsPane for displaying and editing the source code, and a tabbed pane at the bottom which houses the InteractionsPane, CompilerErrorPanel, and OutputPane.

In addition to setting up the GUI and passing action requests to the model, MainFrame is also responsible for listening to events fired by both the GlobalModel and the document itself, in order to keep the display current.

Other Components

  • The primary GUI component outside the MainFrame is the DefinitionsPane, which is a JEditorPane that is tied to a specific OpenDefinitionsDocument in the model. This pane handles all highlighting and text indenting for its document, as well as undoing actions specific to the document.
  • The InteractionsPane is held in the tabbed pane at the bottom of the interface and provides the actual interaction with the repl interpreter within the GlobalModel.
  • The CompilerErrorPanel is another tab in the tabbed pane, and contains both a JComboBox for selecting the compiler and an ErrorListPane for displaying all the errors from the most recent compilation, sorted by document. The ErrorListPane is an inner class of CompilerErrorPanel, and is responsible for highlighting errors in the list and in the source consistently.
  • The OutputPane is the third tab in the tabbed pane, and is simply where System.out and System.err are redirected when DrJava is run.
  • The FindReplaceDialog is a separate JDialog which handles the logic and state of finding and replacing text in the code, including highlighting and changing the source position as necessary. Only one FindReplaceDialog exists in the GUI, and it must be notified each time the active document is changed.

Java Source File NameTypeComment
AboutDialog.javaClass About dialog.
AbstractConsoleController.javaClass Abstract class to handle hooking up a console document with its pane.
AbstractDJPane.javaClass This pane class for a SwingDocument.
BackgroundColorListener.javaClass Creates and installs an OptionListener for DEFINITIONS_BACKGROUND_COLOR on a specified JTextComponent.
BookmarksPanel.javaClass Panel for displaying bookmarks.
BreakpointsPanel.javaClass Panel for displaying the breakpoints.
BrowserHistoryPanel.javaClass Panel for displaying browser history.
ClassPathFilter.javaClass A file filter for files with extensions ".jar"/".zip".
ClipboardHistoryFrame.javaClass Frame with history of clipboard.
CommonCloseButton.javaClass Common button that can be instantiated to create close buttons with any ActionListener to notify, or not, if you so choose.
CompilerErrorPanel.javaClass The panel which houses the list of errors after an unsuccessful compilation.
ConsoleController.javaClass
ConsoleControllerTest.javaClass
DebugPanel.javaClass Panel for displaying the debugger input and output in MainFrame.
DefinitionsPane.javaClass The pane in which work on a given OpenDefinitionsDocument occurs.
DefinitionsPaneTest.javaClass
DirectoryFilter.javaClass A file filter for selecting directories.
DrJavaErrorHandler.javaClass The handle() method in this class is called everytime an uncaught exception propagates to an AWT action. The static log() method can be used to put log entries into the error log but continue execution. This does not automatically update the "DrJava Errors" window when new errors occur.
DrJavaErrorPopup.javaClass Displays a popup window for the first uncaught exception or logged conditions.
DrJavaErrorWindow.javaClass Displays uncaught exceptions and logged conditions. This window is not automatically updated when new errors occur.
DrJavaScrollableDialog.javaClass A JDialog with a scrollable text area and a button panel.
ErrorCaretListener.javaClass Listens to the caret in the associated DefinitionsPane and highlights the text containing CompilerErrors.
ErrorPanel.javaClass This class contains common code and interfaces from CompilerErrorPanel, JUnitPanel, and JavadocErrorPanel.
FindReplacePanel.javaClass The tabbed panel that handles requests for finding and replacing text.
FindResultsPanel.javaClass Panel for displaying find results.
ForegroundColorListener.javaClass Creates and installs an OptionListener for DEFINITIONS_NORMAL_COLOR on a specified JTextComponent.
HelpFrame.javaClass The frame for displaying the HTML help files.
HistorySaveDialog.javaClass Displayed when the user chooses to save the interactions history.
HTMLFrame.javaClass The frame for displaying the HTML help files.
InteractionsController.javaClass This class installs listeners and actions between an InteractionsDocument (the model) and an InteractionsPane (the view).
InteractionsHistoryFilter.javaClass A file filter for files with extensions ".hist".
InteractionsPane.javaClass The view component for repl interaction.
InteractionsPaneTest.javaClass Test functions of InteractionsPane.
InteractionsScriptController.javaClass Controller for an interactions script.
InteractionsScriptPane.javaClass Pane for an interactions script.
JarOptionsDialog.javaClass
JavadocDialog.javaClass Manages a dialog box that can select a destination directory for generating Javadoc.
JavadocErrorPanel.javaClass The panel which displays all the Javadoc parsing errors.
JavadocFrame.javaClass
JavaSourceFilter.javaClass A file filter for files with extensions ".java" and ".gj".
JUnitPanel.javaClass The panel that displays all the testing errors.
KeyBindingManager.javaClass Contains Hashtables that are used in the key-binding process along with methods to build them and access their contents.
LineEnumRule.javaClass
MainFrame.javaClass DrJava's main window.
MainFrameTest.javaClass Test functions of MainFrame.
PreviewConsoleFrame.javaClass
PreviewDefDocFrame.javaClass
PreviewFrame.javaClass
ProjectMenuTest.javaClass Test functions of Project Facility working through the main frame and model.
ProjectPropertiesFrame.javaClass
QuickStartFrame.javaClass The frame for displaying the HTML quick start files.
RecentDocFrame.javaClass This class extends a Swing view class.
RecentFileManager.javaClass Manages a list of the most recently used files to be displayed in the File menu.
RecentFileManagerTest.javaClass Test functions of RecentFileManager.
RegionsListPanel.javaClass Panel for displaying regions in a list sorted by time of creation.
RegionsTreePanel.javaClass Panel for displaying regions in a tree sorted by class name and line number.
ReverseHighlighter.javaClass Implements the Highlighter interfaces.
SimpleInteractionsWindow.javaClass A standalone Interactions Window that provides the functionality of DrJava's Interactions Pane in a single JVM.
SplashScreen.javaClass A splash screen window to be displayed as DrJava is first starting up.
TabbedPanel.javaClass Extended by all panels that can dynamically be added or removed from the _tabbedPane in MainFrame.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.