wip #34 - finished updating all channel configuration editors and

completed preliminary functional testing.
This commit is contained in:
denny
2016-03-25 14:26:08 -04:00
parent e89e7bd361
commit 112083a22f
32 changed files with 1328 additions and 946 deletions

View File

@@ -100,8 +100,7 @@ public class OverlayPanel extends JPanel
// private List<Channel> mChannels = new ArrayList<Channel>();
//
//Currently visible/displayable channels
private CopyOnWriteArrayList<Channel> mVisibleChannels =
new CopyOnWriteArrayList<Channel>();
private CopyOnWriteArrayList<Channel> mVisibleChannels = new CopyOnWriteArrayList<Channel>();
private ChannelDisplay mChannelDisplay = ChannelDisplay.ALL;
//Defines the offset at the bottom of the spectral display to account for
@@ -597,29 +596,24 @@ public class OverlayPanel extends JPanel
width );
//Draw the decoder label
drawLabel( graphics,
channel.getDecodeConfiguration().getDecoderType()
.getShortDisplayString(),
this.getFont(),
xAxis,
yAxis,
width );
}
long frequency = tunerChannel.getFrequency();
double frequencyAxis = getAxisFromFrequency( frequency );
drawChannelCenterLine( graphics, frequencyAxis );
/* Draw Automatic Frequency Control line */
int correction = channel.getChannelFrequencyCorrection();
if( correction != 0 )
{
long error = frequency + correction;
drawLabel( graphics, channel.getDecodeConfiguration().getDecoderType().getShortDisplayString(),
this.getFont(), xAxis, yAxis, width );
long frequency = tunerChannel.getFrequency();
drawAFC( graphics, frequencyAxis, getAxisFromFrequency( error ) );
double frequencyAxis = getAxisFromFrequency( frequency );
drawChannelCenterLine( graphics, frequencyAxis );
/* Draw Automatic Frequency Control line */
int correction = channel.getChannelFrequencyCorrection();
if( correction != 0 )
{
long error = frequency + correction;
drawAFC( graphics, frequencyAxis, getAxisFromFrequency( error ) );
}
}
}
}
@@ -725,6 +719,21 @@ public class OverlayPanel extends JPanel
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();