code: public void insertRoadmapItem(int Index, boolean _bEnabled, String _sLabel, int _ID) {
          try {
              // a roadmap is a SingleServiceFactory that can only create roadmapitems that are the only possible
              // element types of the container
              Object oRoadmapItem = m_xSSFRoadmap.createInstance();
              XPropertySet xRMItemPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oRoadmapItem);
              xRMItemPSet.setPropertyValue("Label", _sLabel);
              // sometimes steps are supposed to be set disabled depending on the program logic...
              xRMItemPSet.setPropertyValue("Enabled", new Boolean(_bEnabled));
              // in this context the "ID" is meant to refer to a step of the dialog
              xRMItemPSet.setPropertyValue("ID", new Integer(_ID));
              m_xRMIndexCont.insertByIndex(Index, oRoadmapItem);
          } catch (com.sun.star.uno.Exception exception) {
              exception.printStackTrace(System.out);
          }
      }
docs: To fully understand the example one has to be aware that the passed ???Index??? parameter
  refers to the position of the roadmap item in the roadmapmodel container
  whereas the variable ???_ID??? directyl references to a certain step of dialog.