mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
Resolves #123 - adds channel details tab to display: System, Site and Channel name, and the complete Activity Summary
This commit is contained in:
@@ -72,6 +72,25 @@ public class ChannelModel extends AbstractTableModel implements IChannelEventBro
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the channel identified by the id argument
|
||||
*/
|
||||
public Channel getChannelFromChannelID(Integer id)
|
||||
{
|
||||
if(id != null)
|
||||
{
|
||||
for(Channel channel: mChannels)
|
||||
{
|
||||
if(channel.getChannelID() == id)
|
||||
{
|
||||
return channel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of unique system values from across the channel set
|
||||
*/
|
||||
|
||||
@@ -109,6 +109,35 @@ public class ChannelProcessingManager implements ChannelEventListener
|
||||
return mProcessingChains.get(channel.getChannelID());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the channel associated with the processing chain
|
||||
* @param processingChain
|
||||
* @return channel associated with the processing chain or null
|
||||
*/
|
||||
public Channel getChannel(ProcessingChain processingChain)
|
||||
{
|
||||
return mChannelModel.getChannelFromChannelID(getChannelID(processingChain));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the channel ID associated with the processing chain
|
||||
*/
|
||||
private Integer getChannelID(ProcessingChain processingChain)
|
||||
{
|
||||
if(processingChain != null)
|
||||
{
|
||||
for(Map.Entry<Integer,ProcessingChain> entry: mProcessingChains.entrySet())
|
||||
{
|
||||
if(entry.getValue() == processingChain)
|
||||
{
|
||||
return entry.getKey();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void channelChanged(ChannelEvent event)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user