Skip to main content
The Panel Editor
A panel is a set of icons representing various components of a layout.
Some of the icons available in JMRI include turnouts, signals, and
sensors. You can also include a background icon for your panel.
Creating a panel
These are made with the Panel Editor, which allows you to place images
to represent turnouts, signals, sensors, trackwork, etc.
If you'd like to see animated clinics that show how each of these
things are actually done on the computer screen, please see Dick
Bronson's clinics page.
Contents of the Panel Editor
Starting from the top:
- Two text fields specifying where (in pixels) new components
will be inserted on the panel. You can generally ignore these, as once
the components has been inserted you can drag it around by holding the
meta (Apple, command; Linux & Windows, right button) key down.
- A button to pick a background image. The editor's drawing
capability is rudimentary and likely to stay that way for a long time.
To create CTC panels, complex track diagrams, etc, it may be easier to draw
them in some other program and insert them as the background image for
a JMRI control panel. (see below for more information)
- A button to add a text label. Put the desired text in the
field and click the button. You can slide the label around after
inserting it, but you currently can't edit the text later.
- A button to add an icon as a label. This is a way to add track
symbols, etc. To change the icon, click the "Change icon" button to
activate the Change Icon panel. The current icon is shown at the top.
To change it, use the tree in the the window to find a new one. The new
icon will be shown at the bottom of the window. To use the new icon,
click on the icon at the top of the Change Icon panel to load the
selected icon. This is a general mechanism: Any icon in an Change Icon
window can be replaced by selecting the desired new one and clicking on
the icon to be replaced.
- Two sections for adding left- and right-bound turnouts. These
actually work the same way, only with different icons to represent the
states of the turnouts. Enter the turnout number (e.g. 23) and click
"Add turnout:". If you'd prefer a different graphic for the closed and
thrown states, you can change their icons as described above.
- A section for adding a sensor. Type the sensor number (e.g.
74) in the field and click "Add sensor:".
- A section for adding a signal head. You should define your
signal heads by using the signal head table before attempting to add
them to your panel. Then type in the signal head number in the field
and click "Add signal head:".
Control Checkboxes
- Panel items popup menu active. When checked a small popup menu
will appear when you right click an icon. Most icons allow you to
rotate and remove the icon. There are other options depending on the
type of icon, for example, you can disable a turnout so it doesn't
actually control anything.
The popup menu may also change if the configuration of an item
is changed. For example, if you add feedback to a turnout, the popup
menu includes a new item choice called "Tristate". Tristate allows you
to use the inconsistent icon, which is one of the four possible icons
available for a turnout. Normally when you first click on a turnout
icon it commands the layout to change the state of the turnout. If you
use feedback for a particular turnout, the icon display will wait to
hear from the layout before modifying the turnout icon to the closed or
thrown icon. By using Tristate, the icon will change immediately to the
inconsistent icon when the turnout is clicked. Inconsistent in this
case means that I've commanded the turnout to change and now we're
waiting to hear if it actually happened. If and when the layout returns
the actual or "known state" of the turnout, the icon will change to
that state. If you don't use Tristate, when you click on the icon, it
may take some time (milliseconds to seconds depending on the system)
before the icon responds with the known state of the turnout.
- All panel items can be repositioned. When checked you can move
items in your panel by selecting and dragging them with the meta key.
Linux and Windows users can hold the right click down and drag. By default new
items can be repositoned even if this box isn't checked.
- Show item's coordinates in popup menu. When checked, the
item's popup menu will include the item's X and Y coordinates. This can
help you better position your icons in the panel.
- Panel items control layout. Normally you want to control your
layout, so leave this box checked. Otherwise, uncheck the box if you
don't want your panel to send commands to your layout.
- Panel has menu. Once you don't need to change or edit your
layout, you can disable the ability to use the panel editor. The only
way to re-enable the editor is to edit the panel file. Using a simple
editor (Notepad for Window users will work) or XML editor, open your
panel and find panelmenu="no" and change "no" to "yes" and save the
file. The panel will now show the menu the next time you load the panel
in PanelPro.
After getting the panel the way you want, you need to use the "Store
panels..." entry in the "Panels" menu to write it to an XML file.
Available Icons
The JMRI library contains lots of contributed icons for representing CTC
panels, LEDs, etc. You can browse through them using the file tree in
the Change Icon frame.
You can also create your own icons. Create a new folder named "resources" in
your JMRI Preferences directory. Add your new icons to that folder. This will prevent any
possible conflicts or loss of data during an upgrade. These new items will automatically
appear under "files" in the icon selections.
Other types of panels
Because this is icon-based, you can create panels that look any way you
want. For example, instead of using track-schematic icons for turnouts,
you could use small images of the levers and plates on CTC machine. This
would give you "mechanical" levers you can flip back and forth with a
click.
It's also possible to create a panel where the "track" lines
change color to indicate whether the track is occupied. The procedure
for doing that is described on a separate
page.
Manipulating Icons
To move an icon around on the panel, you "meta-drag" it. On a Mac,
that's "hold the cmd key and drag with the cursor"; on Linux or Windows, "hold the
right mouse click and drag with the cursor".
There's also a pop-up menu (ctrl-click on a Mac; right-click on Linux or
Windows) that will provide various ways to manipulate the icon. It will let
you rotate the icon so that it points in whatever direction you want.
Text labels can have their font, size and color changed. You can also
remove icons from the panel with the popup menu.
Multi Slice Backgrounds
For users that need to build a classic US&S panel there are several options. The first is to
simply select the 15 position panel background from icons/USS/background/uss-15.gif. Another
option is to use a pixel based image editor to create your own background image. Save the
image as a .gif or similar file. (see info above on where to store new images)
Yet another option is to create the background image from multiple
slices of the whole panel. JMRI supports using multiple background images so, by simply
positioning each image properly, a complete panel of any reasonable size may be created.
Currently there are two sets of image 'slices' available. One set is 718 pixels high, and the second set is
900 pixles high. Choose the set that best fits your display. These 'slices' are located
at icons/USS/background/. The 900 pixel high images include a "-9" in their names. The left and right
edge images are each 12 pixels wide. The main panel 'slices' are 65 pixels wide. This allows you to
precisely position each slice simply by changing the x: and y: coordinates in the Panel Editor.
The advantages of building backgrounds with slices are that you can make virtually any length
of panel that is required, and the plates will be precisely located automatically.
First set the coordinates to x:0, y:0 and select icons/USS/background/Panel-left.gif.
(or icons/USS/background/Panel-left-9.gif) This gives you the left edge of the panel. Change
the coordinates to x:12 y:0 and choose the next slice. It may be blank, include a switch
plate, include a signal plate, or include both plates. Only the "x:" coordinate needs to be changed
as you continue to add additional panel sections. The 'slices' are each 65 pixles wide,
so simply add 65 to the x: value for each
additional slice. For example; to build up a 15 position panel from slices, use x:0 for the left side, then
x:12, x:77, x:142, x:207, x:272, x:337, x:402, x:467, x:532, x:597, x:662, x:727, x:792,
x:857, and x:922 for the individual slices. Finally set x:987
and complete the panel with icons/USS/background/Panel-right.gif.
To change the style of any individual slice (e.g. to add a new plate to your panel)
first check the "Show item's
coordinates in popup menu" check box in the editor window. Next, right click in a blank area of
the old slice to raise the pop up information including the coordinates of that slice. Put those numbers
in the editor's coordinates, then remove the slice. Finally, choose a new slice and it will
appear where the old one was.
Communicating with Multiple Systems
PanelPro can communicate with more than one layout control system. For
example, the Cornwall Railroad uses C/MRI hardware for sensing the
status of blocks and turnouts on the layout, but drives turnout
positions through a Digitrax DCC system.
To configure the program to talk to multiple systems, select them
in the preferences panel. (Edit->Preferences) Check the "Show Advanced
Preferences" and under "Aux layout connection:" enter the system
information for your second connection.
If you add a turnout, sensor or signal to a panel using just a
number, e.g. "23", it will be assigned to the first system on the
preference panel. To access the second system, you have to use JMRI system names. For
example, if the second attachment is to a LocoNet system, you'd refer to
a LocoNet Turnout as LT13; a LocoNet sensor as LS21, etc.