protected void selectValue(int value){
  if (value > 256) {
    log.error("Saw unreasonable internal value: " + value);
  }
  for (int i=0; i < _valueArray.length; i++) {
    if (_valueArray[i] == value) {
      _value.setSelectedIndex(i);
      return;
    }
  }
  log.debug("Create new item with value " + value + " count was "+ _value.getItemCount()+ " in "+ label());
  _value.addItem("Reserved value " + value);
  int[] oldArray=_valueArray;
  _valueArray=new int[oldArray.length + 1];
  for (int i=0; i < oldArray.length; i++) {
    _valueArray[i]=oldArray[i];
  }
  _valueArray[oldArray.length]=value;
  _value.setSelectedItem("Reserved value " + value);
}

protected void selectValue ( int value ) { if ( value > 256 ) { log . error ( "Saw unreasonable internal value: " + value ) ; } for ( int i = 0 ; i < _valueArray . length ; i ++ ) { if ( _valueArray [ i ] == value ) { _value . setSelectedIndex ( i ) ; return ; } } log . debug ( "Create new item with value " + value + " count was " + _value . getItemCount ( ) + " in " + label ( ) ) ; _value . addItem ( "Reserved value " + value ) ; int [ ] oldArray = _valueArray ; _valueArray = new int [ oldArray . length + 1 ] ; for ( int i = 0 ; i < oldArray . length ; i ++ ) { _valueArray [ i ] = oldArray [ i ] ; } _valueArray [ oldArray . length ] = value ; _value . setSelectedItem ( "Reserved value " + value ) ; }
set to a specific value . this searches for the displayed value , and sets the enum to that particular one . if the value is larger than any defined , a new one is created .
