mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-16 18:47:33 -05:00
More updates
This commit is contained in:
@@ -792,7 +792,6 @@ public class Channel extends Configuration
|
|||||||
|
|
||||||
private void setupLogging()
|
private void setupLogging()
|
||||||
{
|
{
|
||||||
mLog.debug( "Setting up logging ..." );
|
|
||||||
if( mProcessingChain != null )
|
if( mProcessingChain != null )
|
||||||
{
|
{
|
||||||
String channelName = getChannelName();
|
String channelName = getChannelName();
|
||||||
@@ -800,9 +799,6 @@ public class Channel extends Configuration
|
|||||||
List<Module> loggers = mResourceManager.getEventLogManager()
|
List<Module> loggers = mResourceManager.getEventLogManager()
|
||||||
.getLoggers( mEventLogConfiguration, channelName );
|
.getLoggers( mEventLogConfiguration, channelName );
|
||||||
|
|
||||||
mLog.debug( "Created [" + loggers.size() + "] loggers for [" +
|
|
||||||
channelName + "]" );
|
|
||||||
|
|
||||||
if( !loggers.isEmpty() )
|
if( !loggers.isEmpty() )
|
||||||
{
|
{
|
||||||
mProcessingChain.addModules( loggers );
|
mProcessingChain.addModules( loggers );
|
||||||
|
|||||||
@@ -120,16 +120,28 @@ public class MPT1327DecoderPanel extends DecoderPanel
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setAliasLabel( final JLabel label, final Alias alias )
|
private void setAliasLabel( final JLabel label, final Alias alias )
|
||||||
|
{
|
||||||
|
setAliasLabel( label, alias, true );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setAliasLabel( final JLabel label, final Alias alias, boolean includeIcon )
|
||||||
{
|
{
|
||||||
if( alias != null )
|
if( alias != null )
|
||||||
{
|
{
|
||||||
label.setText( alias.getName() );
|
label.setText( alias.getName() );
|
||||||
|
|
||||||
String iconName = alias.getIconName();
|
if( includeIcon )
|
||||||
|
|
||||||
if( iconName != null )
|
|
||||||
{
|
{
|
||||||
label.setIcon( mSettingsManager.getImageIcon( iconName, 12 ) );
|
String iconName = alias.getIconName();
|
||||||
|
|
||||||
|
if( iconName != null )
|
||||||
|
{
|
||||||
|
label.setIcon( mSettingsManager.getImageIcon( iconName, 12 ) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
label.setIcon( null );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -157,7 +169,7 @@ public class MPT1327DecoderPanel extends DecoderPanel
|
|||||||
{
|
{
|
||||||
case CHANNEL_SITE_NUMBER:
|
case CHANNEL_SITE_NUMBER:
|
||||||
mSiteOrToTalkgroup.setText( String.valueOf( state.getSite() ) );
|
mSiteOrToTalkgroup.setText( String.valueOf( state.getSite() ) );
|
||||||
setAliasLabel( mSiteOrToTalkgroupAlias, state.getSiteAlias() );
|
setAliasLabel( mSiteOrToTalkgroupAlias, state.getSiteAlias(), false );
|
||||||
repaint();
|
repaint();
|
||||||
break;
|
break;
|
||||||
case TO_TALKGROUP:
|
case TO_TALKGROUP:
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import playlist.PlaylistManager;
|
import playlist.PlaylistManager;
|
||||||
|
import record.RecorderType;
|
||||||
|
import record.config.RecordConfiguration;
|
||||||
import sample.Listener;
|
import sample.Listener;
|
||||||
import settings.ColorSetting;
|
import settings.ColorSetting;
|
||||||
import settings.ColorSetting.ColorSettingName;
|
import settings.ColorSetting.ColorSettingName;
|
||||||
@@ -69,6 +71,10 @@ public class ChannelStatePanel extends JPanel
|
|||||||
|
|
||||||
private JLabel mStateLabel;
|
private JLabel mStateLabel;
|
||||||
private JLabel mSourceLabel;
|
private JLabel mSourceLabel;
|
||||||
|
private JLabel mOptionsLabel;
|
||||||
|
|
||||||
|
private JLabel mSystemLabel;
|
||||||
|
private JLabel mSiteLabel;
|
||||||
private JLabel mChannelLabel;
|
private JLabel mChannelLabel;
|
||||||
|
|
||||||
private PlaylistManager mPlaylistManager;
|
private PlaylistManager mPlaylistManager;
|
||||||
@@ -109,7 +115,22 @@ public class ChannelStatePanel extends JPanel
|
|||||||
{
|
{
|
||||||
getColors();
|
getColors();
|
||||||
|
|
||||||
setLayout( new MigLayout( "insets 3 2 2 2", "[grow,fill]", "[]0[]0[]") );
|
setLayout( new MigLayout( "insets 1 1 1 1", "[grow,fill]", "[]0[]0[]") );
|
||||||
|
|
||||||
|
mSystemLabel = new JLabel( mChannel.getSystem().getName() );
|
||||||
|
mSystemLabel.setFont( mFontDetails );
|
||||||
|
mSystemLabel.setForeground( mColorLabelDetails );
|
||||||
|
add( mSystemLabel );
|
||||||
|
|
||||||
|
mSiteLabel = new JLabel( mChannel.getSite().getName() );
|
||||||
|
mSiteLabel.setFont( mFontDetails );
|
||||||
|
mSiteLabel.setForeground( mColorLabelDetails );
|
||||||
|
add( mSiteLabel );
|
||||||
|
|
||||||
|
mChannelLabel = new JLabel( mChannel.getName() );
|
||||||
|
mChannelLabel.setFont( mFontDetails );
|
||||||
|
mChannelLabel.setForeground( mColorLabelDetails );
|
||||||
|
add( mChannelLabel, "wrap" );
|
||||||
|
|
||||||
mStateLabel = new JLabel( mChannel.getChannelState().getState()
|
mStateLabel = new JLabel( mChannel.getChannelState().getState()
|
||||||
.getDisplayValue() );
|
.getDisplayValue() );
|
||||||
@@ -122,10 +143,32 @@ public class ChannelStatePanel extends JPanel
|
|||||||
mSourceLabel.setForeground( mColorLabelDetails );
|
mSourceLabel.setForeground( mColorLabelDetails );
|
||||||
add( mSourceLabel );
|
add( mSourceLabel );
|
||||||
|
|
||||||
mChannelLabel = new JLabel( mChannel.getChannelDisplayName() );
|
StringBuilder sb = new StringBuilder();
|
||||||
mChannelLabel.setFont( mFontDetails );
|
|
||||||
mChannelLabel.setForeground( mColorLabelDetails );
|
if( !mChannel.getEventLogConfiguration().getLoggers().isEmpty() )
|
||||||
add( mChannelLabel, "wrap" );
|
{
|
||||||
|
sb.append( "LOG " );
|
||||||
|
}
|
||||||
|
|
||||||
|
RecordConfiguration recordConfig = mChannel.getRecordConfiguration();
|
||||||
|
|
||||||
|
if( recordConfig.getRecorders().contains( RecorderType.AUDIO ) )
|
||||||
|
{
|
||||||
|
sb.append( "AUDIO " );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( recordConfig.getRecorders().contains( RecorderType.BASEBAND ) ||
|
||||||
|
recordConfig.getRecorders().contains( RecorderType.TRAFFIC_BASEBAND ) )
|
||||||
|
{
|
||||||
|
sb.append( "BASEBAND" );
|
||||||
|
}
|
||||||
|
|
||||||
|
mOptionsLabel = new JLabel( sb.toString() );
|
||||||
|
mOptionsLabel.setFont( mFontDetails );
|
||||||
|
mOptionsLabel.setForeground( mColorLabelAuxDecoder );
|
||||||
|
add( mOptionsLabel, "wrap" );
|
||||||
|
|
||||||
|
// add( new JSeparator( JSeparator.HORIZONTAL ), "span,growx" );
|
||||||
}
|
}
|
||||||
|
|
||||||
public Channel getChannel()
|
public Channel getChannel()
|
||||||
|
|||||||
Reference in New Issue
Block a user