Chapter 20. Creating the User Interfacefor the Mail Client
Creating a filesystem to represent mail folders and messages takes care of the basic storage and fundamental interactions between a user and mail server. But it is a terrible user interface—users wish to see messages presented as in a normal email client for the most part, so we need to provide additional layers on top of the filesystem to make it a more plausible application.
We will start by displaying some special mail-specific information to the user when he or she is looking at a message and ensuring that text messages can be viewed and edited in the Source Editor window. But the most interesting UI addition will be to create special nodes to represent messages, folders, and threads, which can be displayed in the Explorer and provide a more refined model. A dedicated workspace will be created to focus the user’s attention.
Creating a DataLoader for Messages
It is fine and good to cause messages to appear as files in the IMAP filesystem, but message “files” may typically be named arbitrarily (for example, by message ID) and might normally appear in the Explorer as blank icons, like this:
Additionally, such “unrecognized objects” are not permitted to be opened in the editor (since the IDE does not know whether they are really textual, or binary) and we do not have much control over them.
Note
You will find a Convert ...
Get NetBeans: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.