Workspace Browser

Figure Composer maintains a private workspace in a folder named .datanavx in the user's home directory (as defined by the Java environment variable user.home). In addition to user-defined application settings, the workspace has a path cache storing the file-system paths of all existing DataNav-specific files that the user has created. Currently, these include FypML figure definition files (*.fyp), compatible Matlab figure files (*.fig), and data set source files (*.dnr, *.dnb, *.dna). When Figure Composer launches, it loads the path cache from the workspace file ${user.home}/.datanavx/paths.txt, removing any paths that no longer exist. The cache is updated as the user creates new figures or data set sources, and a background thread monitors all cached directories for new DataNav-specific files. Thus, the application will "discover" figure files that you generate as long as you put them in a directory that is in its cache (it may take a little while for the new files to show up, since the monitor thread performs a sequential scan of all existing cached directories; while Java 7 supports file system event handling, FC is still developed with a Java 6 SDK). When the program exits, the current in-memory path cache is written back to paths.txt. The Workspace Browser -- docked on the right side of the frame window in Figure Composer -- provides convenient access to any FypML and Matlab figure files present in this workspace path cache. As shown in the screenshot, a directory listing at the top of the browser includes the names of all known directories on the host system that contain FypML or Matlab figures. Select any directory in this list, and the list widget immediately underneath it is populated with the names of all figure files located in that directory: FypML figure file names are accompanied by a figure icon and end with the .fyp extension, while Matlab figure file names end in .fig and are accompanied by Mathworks' standard icon for the Matlab program. In the bottom third of the browser panel is a small canvas that offers a preview of the figure selected in the file list control. Below the canvas is a text area displaying the figure's description (if the author did not include a figure description, the text area is hidden). If you're not sure which file contains the figure you're looking for, this "thumbnail preview" will usually make that very clear. When you select a file, Figure Composer must read the file, construct the figure's graphic model, and render that model on the preview canvas. This can take a significant amount of time, especially for complex figures with large data sets. Rather than block the user interface, loading takes place on a background thread, and the canvas is updated once the figure model is ready. During file loading, the canvas displays the message "LOADING...". If for some reason Figure Composer is unable to open the selected figure file, the preview window will typically be blank or contain some kind of error message.

Use the two split-pane dividers to apportion more vertical space to the preview panel and to the figure description within that panel. (The width of the Workspace Browser is fixed.) FC "remembers" the divider locations on exit and attempts to restore them the next time the application is launched.

To sort the contents of the directory and file list controls alphabetically or chronologically, select the desired sort order using the combo box located under the file list. Figure Composer will remember your choice so that you don't have to set it each time you run the application.

You can use the workspace browser to perform some basic file management tasks. To rename a figure file, hold the mouse button down over the file name for at least a half second; upon releasing the button, a text field appears in which you can enter a new file name. It must have the same extension as the original, and it cannot match another file in the parent directory. To delete one or more figures in a directory, just select the files you want to remove and press the file-delete button located under the file listing. To select more than one file, use the Shift and Ctrl (Command in Mac OS X) keys in the usual manner. But use the file-delete button with care; the action cannot be undone.

To duplicate one or more figures in a directory, select the target files and press the file-copy button. A copy of each selected file is saved in the same directory, with "_Copy1" (or "_Copy2", etc.) appended to the base file name to ensure uniqueness. If only a single file is copied, Figure Composer selects the file copy and gives you an opportunity to change the filename that was assigned to it.

To move or copy some figure files from one directory to another, simply select the files you want to move, then "drag and drop" them onto the target directory in the folder list control. The default action is to move the selected files from their current directory to the target directory; to copy the files instead, hold down the Ctrl key when you release the mouse button. After copying or moving the files, the target directory is selected and the relevant files are initially selected in the figure file list.

Opening a figure from the Workspace Browser. To open a figure in Figure Composer, you can use the File|Open or Open Recent commands - or you can find the source file in the Workspace Browser and simply double-click on the desired file in the file list control. This is often the preferred way to open files for users who typically work on a number of different figures maintained in the same folder.

If you do not need the browser or want to hide it to yield more screen space to the Figure Canvas, simply click on the "X" icon in its lower-right corner. To reopen the browser, use the View|Workspace Figures menu command.

Workspace Browser