public void valueChanged(ListSelectionEvent e){
  if (_addButton == null) {
    return;
  }
  int numTurnouts=2;
  if ((doubleSlip == SlipTurnoutIcon.SCISSOR) && (lowerWestToLowerEastButton.isSelected())) {
    numTurnouts=4;
  }
  if (_turnoutMap.size() == numTurnouts) {
    _addButton.setEnabled(true);
    _addButton.setToolTipText(null);
  }
 else {
    _addButton.setEnabled(false);
    _addButton.setToolTipText(Bundle.getMessage("ToolTipAssignTurnouts"));
  }
}

public void valueChanged ( ListSelectionEvent e ) { if ( _addButton == null ) { return ; } int numTurnouts = 2 ; if ( ( doubleSlip == SlipTurnoutIcon . SCISSOR ) && ( lowerWestToLowerEastButton . isSelected ( ) ) ) { numTurnouts = 4 ; } if ( _turnoutMap . size ( ) == numTurnouts ) { _addButton . setEnabled ( true ) ; _addButton . setToolTipText ( null ) ; } else { _addButton . setEnabled ( false ) ; _addButton . setToolTipText ( Bundle . getMessage ( "ToolTipAssignTurnouts" ) ) ; } }
override . activate add to panel button when all icons are assigned sensors .
