@Override @SuppressWarnings("incomplete-switch") public void channelChanged(ChannelEvent event){
  Channel channel=event.getChannel();
switch (event.getEvent()) {
case NOTIFICATION_ADD:
case NOTIFICATION_PROCESSING_START:
    if (!mVisibleChannels.contains(channel) && channel.isWithin(getMinFrequency(),getMaxFrequency())) {
      mVisibleChannels.add(channel);
    }
  break;
case NOTIFICATION_DELETE:
mVisibleChannels.remove(channel);
break;
case NOTIFICATION_PROCESSING_STOP:
if (channel.getChannelType() == ChannelType.TRAFFIC) {
mVisibleChannels.remove(channel);
}
break;
case NOTIFICATION_CONFIGURATION_CHANGE:
if (mVisibleChannels.contains(channel) && !channel.isWithin(getMinFrequency(),getMaxFrequency())) {
mVisibleChannels.remove(channel);
}
if (!mVisibleChannels.contains(channel) && channel.isWithin(getMinFrequency(),getMaxFrequency())) {
mVisibleChannels.add(channel);
}
break;
default :
break;
}
repaint();
}

@ Override @ SuppressWarnings ( "incomplete-switch" ) public void channelChanged ( ChannelEvent event ) { Channel channel = event . getChannel ( ) ; switch ( event . getEvent ( ) ) { case NOTIFICATION_ADD : case NOTIFICATION_PROCESSING_START : if ( ! mVisibleChannels . contains ( channel ) && channel . isWithin ( getMinFrequency ( ) , getMaxFrequency ( ) ) ) { mVisibleChannels . add ( channel ) ; } break ; case NOTIFICATION_DELETE : mVisibleChannels . remove ( channel ) ; break ; case NOTIFICATION_PROCESSING_STOP : if ( channel . getChannelType ( ) == ChannelType . TRAFFIC ) { mVisibleChannels . remove ( channel ) ; } break ; case NOTIFICATION_CONFIGURATION_CHANGE : if ( mVisibleChannels . contains ( channel ) && ! channel . isWithin ( getMinFrequency ( ) , getMaxFrequency ( ) ) ) { mVisibleChannels . remove ( channel ) ; } if ( ! mVisibleChannels . contains ( channel ) && channel . isWithin ( getMinFrequency ( ) , getMaxFrequency ( ) ) ) { mVisibleChannels . add ( channel ) ; } break ; default : break ; } repaint ( ) ; }
channel change event handler
