code: private int getDatastreamPaneIndex(String id) {
          int index = -1;
          for (int i=0; i < m_datastreamPanes.length; i++)
          {
              if(m_datastreamPanes[i].getItemId().equals(id)){
                  index = i;
                  break;
              }
          }
          return index;
      }
docs: Gets the index of the pane containing the
  datastream with the given id.
  @return index, or -1 if index is not found