mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
Moves audio panel into the channel state list panel so that we don't
have to use a split pane.
This commit is contained in:
@@ -4,6 +4,7 @@ import java.awt.Color;
|
||||
import java.util.List;
|
||||
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JSeparator;
|
||||
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import settings.SettingsManager;
|
||||
@@ -21,17 +22,30 @@ public class AudioChannelsPanel extends JPanel
|
||||
setBackground( Color.BLACK );
|
||||
|
||||
List<AudioOutput> outputs = controller.getAudioOutputs();
|
||||
|
||||
for( AudioOutput audioOutput: controller.getAudioOutputs() )
|
||||
|
||||
for( int x = 0; x < outputs.size(); x++ )
|
||||
{
|
||||
add( new AudioChannelPanel( settingsManager, audioOutput ), "wrap" );
|
||||
add( new AudioChannelPanel( settingsManager, outputs.get( x ) ), "wrap" );
|
||||
|
||||
if( x < outputs.size() - 1 )
|
||||
{
|
||||
addSeparator();
|
||||
}
|
||||
}
|
||||
|
||||
/* Add an empty channel panel so that the panel is sized appropriately
|
||||
* for either a single channel or two channels */
|
||||
if( outputs.size() == 1 )
|
||||
{
|
||||
addSeparator();
|
||||
add( new AudioChannelPanel( settingsManager, null ), "wrap" );
|
||||
}
|
||||
}
|
||||
|
||||
private void addSeparator()
|
||||
{
|
||||
JSeparator separator = new JSeparator( JSeparator.HORIZONTAL );
|
||||
separator.setBackground( Color.DARK_GRAY );
|
||||
add( separator, "span,growx" );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user