private int findInsertPosition(String newTabName){
  if (order == TabOrder.ALPHABETIC) {
    for (int i=0; i < tabs.getTabCount(); i++) {
      if (newTabName.compareToIgnoreCase(tabs.getTitleAt(i)) < 0) {
        return i;
      }
    }
  }
  return tabs.getTabCount();
}

private int findInsertPosition ( String newTabName ) { if ( order == TabOrder . ALPHABETIC ) { for ( int i = 0 ; i < tabs . getTabCount ( ) ; i ++ ) { if ( newTabName . compareToIgnoreCase ( tabs . getTitleAt ( i ) ) < 0 ) { return i ; } } } return tabs . getTabCount ( ) ; }
returns the index this tab should be added at , depending on the current order setting .
