protected void rebuildListModel(){
  DefaultListModel dlm=(DefaultListModel)getListModel();
  OMGraphicList list=getList();
  int[] selectedIndicies=null;
  if (list != null) {
    if (selectedTiles != null && selectedTiles.length > 0) {
      selectedIndicies=new int[selectedTiles.length];
    }
    int tileCount=0;
    int selectedIndex=0;
    if (selectedIndicies != null) {
      for (      OMGraphic omg : list) {
        ImageTile imageTile=(ImageTile)omg;
        if (imageTile.isSelected() && selectedIndex < selectedIndicies.length) {
          selectedIndicies[selectedIndex++]=tileCount;
        }
        tileCount++;
      }
    }
    dlm.clear();
    for (    OMGraphic omg : list) {
      tileCount++;
      dlm.addElement(omg);
    }
  }
  if (resultsList != null) {
    if (selectedIndicies != null) {
      resultsList.setSelectedIndices(selectedIndicies);
    }
    resultsList.repaint();
  }
}

protected void rebuildListModel ( ) { DefaultListModel dlm = ( DefaultListModel ) getListModel ( ) ; OMGraphicList list = getList ( ) ; int [ ] selectedIndicies = null ; if ( list != null ) { if ( selectedTiles != null && selectedTiles . length > 0 ) { selectedIndicies = new int [ selectedTiles . length ] ; } int tileCount = 0 ; int selectedIndex = 0 ; if ( selectedIndicies != null ) { for ( OMGraphic omg : list ) { ImageTile imageTile = ( ImageTile ) omg ; if ( imageTile . isSelected ( ) && selectedIndex < selectedIndicies . length ) { selectedIndicies [ selectedIndex ++ ] = tileCount ; } tileCount ++ ; } } dlm . clear ( ) ; for ( OMGraphic omg : list ) { tileCount ++ ; dlm . addElement ( omg ) ; } } if ( resultsList != null ) { if ( selectedIndicies != null ) { resultsList . setSelectedIndices ( selectedIndicies ) ; } resultsList . repaint ( ) ; } }
rebuild the list model contents based on the imagetiles contained on the omgraphiclist .
