mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
Rebase channel/alias model redesign branch on current master
(v0.2.0.beta5)
This commit is contained in:
@@ -64,7 +64,6 @@ public class ConfigurationControllerModel extends DefaultTreeModel
|
||||
private PlaylistManager mPlaylistManager;
|
||||
private SettingsManager mSettingsManager;
|
||||
private SourceManager mSourceManager;
|
||||
private ChannelModel mChannelModel;
|
||||
|
||||
/**
|
||||
* Implements a merged system controller and (tree) model. The user will
|
||||
@@ -80,8 +79,6 @@ public class ConfigurationControllerModel extends DefaultTreeModel
|
||||
{
|
||||
super( new BaseNode( null ) );
|
||||
|
||||
mChannelModel = channelModel;
|
||||
|
||||
mChannelModel = channelModel;
|
||||
mChannelProcessingManager = channelProcessingManager;
|
||||
mPlaylistManager = playlistManager;
|
||||
|
||||
@@ -74,11 +74,13 @@ public class ThreadPoolManager
|
||||
mExecutor.schedule( command, delay, unit );
|
||||
}
|
||||
|
||||
public void cancel( ScheduledFuture<?> task )
|
||||
public boolean cancel( ScheduledFuture<?> task )
|
||||
{
|
||||
task.cancel( true );
|
||||
boolean success = task.cancel( true );
|
||||
|
||||
mTasks.remove( task );
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
public int getTaskCount( ThreadType type )
|
||||
|
||||
@@ -78,14 +78,13 @@ public class Channel extends Configuration implements IFrequencyChangeProcessor
|
||||
|
||||
private boolean mEnabled;
|
||||
private boolean mSelected;
|
||||
|
||||
private TunerChannel mTunerChannel = null;
|
||||
|
||||
private ChannelType mChannelType = ChannelType.STANDARD;
|
||||
|
||||
private int mChannelID;
|
||||
private int mChannelFrequencyCorrection = 0;
|
||||
|
||||
|
||||
/**
|
||||
* Channel represents a complete set of configurations needed to setup and
|
||||
* manage a processing chain and/or manage as a set of business objects that
|
||||
@@ -112,8 +111,6 @@ public class Channel extends Configuration implements IFrequencyChangeProcessor
|
||||
/**
|
||||
* Constructs a new standard channel with a default name of "Channel"
|
||||
*/
|
||||
|
||||
//TODO: remove this
|
||||
public Channel()
|
||||
{
|
||||
mChannelID = UNIQUE_ID++;
|
||||
@@ -163,7 +160,6 @@ public class Channel extends Configuration implements IFrequencyChangeProcessor
|
||||
return channel;
|
||||
}
|
||||
|
||||
//TODO: remove this
|
||||
/**
|
||||
* Unique identifier for this channel. Value is transient (not persisted).
|
||||
*/
|
||||
@@ -442,4 +438,25 @@ public class Channel extends Configuration implements IFrequencyChangeProcessor
|
||||
return tunerChannel != null &&
|
||||
tunerChannel.overlaps( minimum, maximum );
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience method to make the current channel frequency correction value
|
||||
* available for use outside of a constructed processing chain while maintaining
|
||||
* linkage to the source channel. This hack allows the correction value to
|
||||
* be used to visually show in the spectral display.
|
||||
*/
|
||||
@Override
|
||||
public void frequencyChanged( FrequencyChangeEvent event )
|
||||
{
|
||||
if( event.getEvent() == Event.NOTIFICATION_CHANNEL_FREQUENCY_CORRECTION_CHANGE )
|
||||
{
|
||||
mChannelFrequencyCorrection = event.getValue().intValue();
|
||||
}
|
||||
}
|
||||
|
||||
@XmlTransient
|
||||
public int getChannelFrequencyCorrection()
|
||||
{
|
||||
return mChannelFrequencyCorrection;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user