JMRI: Panel Editor Help
Author: Pete Cressman
Keywords: JMRI help Index Editor

# The Image Index Editor

This window is used to create an Image Index. The index may be organized according to any taxonomy you wish. Using it allows you to access any image file that is accessible from your computer without moving or copying the file. It is similar to a table of contents or index that you might find in a reference textbook.

## Contents of the Image Index Editor

The window contains two panes side by side. The left side is your current Image Catalog. This is what the Icon Editors have been using to change icons. The top panel of this pane consists of one or more trees. The default tree is "Program Directory", the catalog of all the image files downloaded with the version of JMRI you are using. These are files that were encapsulated in "jmri.jar". Another default tree may be "Preferences Directory", the catalog of all the image files contained in the "resources" directory in your JMRI preferences directory. If you have not created a "resources" directory in your JMRI preferences directory you will not see this tree. Other trees that you may see are those that you have installed after using the Open File System Directory menu item in one of the Icon Editor windows and pressed the Add to Catalog button there. (The "Add to Catalog" button does not appear in this window.) Next to each tree is a "Preview" pane that displays the images found in any node that you have selected from one of the above trees. "Nodes" are the folder icons that appear when you click on the handle to the left of a folder icon. Clicking on a node will open a pane that displays the icons contained in the node.

The "Preview" pane has a label that states how many image files are referenced in the node. Beneath each image (icon) is a label that states the "scale" at which the image is displayed. since 4.9.7 Below the icons are "View on:" combo boxes that allow you to choose a background for the icons. This may help you determine what parts of the icon are opaque and what parts are transparent.

The right side is the Image Index you may edit. It is similar to the left pane in that the left half shows the tree of the Index you are creating. Likewise, the right half displays the images found in any node of the tree that you select. Initially, there will be just one node labeled "Image Index". You are able to add additional nodes to this node by using the menus below.

## The Menus

The File menu shown with the Create/Edit Image Index pane contains three items:

- Store Image Index. This stores a permanent record of the Image Index that will be restored the next time the Panel Editor is opened. The Image Index will be included in the Catalog trees used by the Icon Editors.
- Open a File System Directory. This opens a file chooser dialog where you may open any directory that has image files. To open the directory, select any image file contained in it and a pane will attempt to display all the image files found in that directory. See Icon Editors for more details on this menu item.
  The icons displayed in the "preview" panel of any directory window opened from this menu item can be added to the Image Index. How to do this is described below.
- Search File System for Icons. Opens a file chooser dialog to start a search for image files. A panel filled with all found image files is shown as the search finishes.
  Drag one of the found icons to your Catalog.

The Edit menu has three items:

- Add Node. First select a node in the Image Index tree. Then, use this menu item to add a sub-node the selected node. A "sub-node" is a node that branches from under the selected node.
- Delete Node. First select a node in the Image Index tree. Then, use this menu item to delete the node. Since this will also delete the nodes and icon references that branch off from under this node, a confirmation dialog is opened with the total of all the items that will be deleted.
- Rename Node. First select a node in the Image Index tree. Then, use this menu item to change the name of the node.

## Adding Icons to the Image Index

Use "Drag and Drop" to copy an icon from either the Catalog pane (left pane) or a File Directory window. Press the mouse button down on any icon appearing in the "preview" panel of either of these windows to "drag" the icon to a node of the Image Index tree (right pane). (Dragging means holding the mouse button down as you move the mouse pointer to a node of the Image Index tree.) Actually, it is only the reference to the location of the icon that is saved by the Image Index. As long the file remains in place, it will be displayed by the Catalog, the Image Index and your Panel (if you have installed it there).

## Deleting and Renaming icons in the Image Index

Pressing and releasing (clicking) the mouse button over an icon in the preview pane of the Image Index activatea a "pop-up" menu. Pop-Up menus display the name and reference location of the icon. The pop-up also provides items to modify icons in the Image Index.

- Rename Icon opens a dialog box where a new name can be entered.
- Delete Icon removes the icon from the Image Index node.

- Note: the "preview" pane will only show these changes after leaving the node and then returning to the node.