/** Creates new form TrainDetailsJPanel */
  public TrainDetailsJPanel(ModelRoot mr, GUIRoot gr) {
    modelRoot = mr;
    guiRoot = gr;
    initComponents();
    statusJButton.setIcon(standardIcon);
    statusJButton.addActionListener(statusButtonListener);

    ModdableResourceFinder mrf = guiRoot.getGraphicsResourceFinder();
    stoppedIcon = new ImageIcon(mrf.getURLForReading("toolbar/stop.png"));
    slowIcon = new ImageIcon(mrf.getURLForReading("toolbar/slow.png"));
    standardIcon = new ImageIcon(mrf.getURLForReading("toolbar/standard.png"));
    expressIcon = new ImageIcon(mrf.getURLForReading("toolbar/express.png"));
    outOfWaterIcon = new ImageIcon(mrf.getURLForReading("toolbar/out_of_water.png"));
    blockedIcon = new ImageIcon(mrf.getURLForReading("toolbar/yielding.png"));
    loadingIcon = new ImageIcon(mrf.getURLForReading("toolbar/loading.png"));
    unloadingIcon = new ImageIcon(mrf.getURLForReading("toolbar/unloading.png"));
    noRouteIcon = new ImageIcon(mrf.getURLForReading("toolbar/no_route.png"));
  }
  public void setup() {
    ReadOnlyWorld w = modelRoot.getWorld();
    this.w = w;
    trainModelViewer = new TrainModelViewer(w);

    org.railz.client.renderer.ViewLists vl = modelRoot.getViewLists();
    trainViewJPanel1 = new TrainViewJPanel(modelRoot);
    trainViewJPanel1.setHeight(20);
    trainViewJPanel1.setCenterTrain(true);
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.weightx = 1.0;
    gbc.gridx = 0;
    gbc.gridy = 2;
    gbc.gridwidth = 2;
    add(trainViewJPanel1, gbc);

    modelRoot.getMoveChainFork().addListListener(this);
    guiRoot.addRefreshListener(this);
  }