mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-14 17:47:32 -05:00
Updated R820T configuration editor gui layout.
This commit is contained in:
@@ -92,9 +92,7 @@ public class R820TTunerConfigurationPanel extends JPanel
|
|||||||
*/
|
*/
|
||||||
private void init()
|
private void init()
|
||||||
{
|
{
|
||||||
setLayout( new MigLayout( "", "[grow,fill]", "[grow,fill]" ) );
|
setLayout( new MigLayout( "fill,wrap 2", "[grow,right][grow]", "[][][][][][][grow]" ) );
|
||||||
|
|
||||||
setBorder( BorderFactory.createTitledBorder( "Tuner Configuration" ) );
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tuner configuration selector
|
* Tuner configuration selector
|
||||||
@@ -144,7 +142,8 @@ public class R820TTunerConfigurationPanel extends JPanel
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
add( mComboConfigurations, "span 2,wrap" );
|
add( new JLabel( "Config:" ) );
|
||||||
|
add( mComboConfigurations, "growx,push" );
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -165,8 +164,8 @@ public class R820TTunerConfigurationPanel extends JPanel
|
|||||||
public void focusGained( FocusEvent e ) {}
|
public void focusGained( FocusEvent e ) {}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
add( mName );
|
add( new JLabel( "Name:" ) );
|
||||||
add( new JLabel( "Name" ), "wrap" );
|
add( mName, "growx,push" );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Frequency Correction
|
* Frequency Correction
|
||||||
@@ -224,8 +223,8 @@ public class R820TTunerConfigurationPanel extends JPanel
|
|||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
add( mFrequencyCorrection );
|
add( new JLabel( "Correction PPM:" ) );
|
||||||
add( new JLabel( "Frequency Correction (ppm)" ), "wrap" );
|
add( mFrequencyCorrection, "growx,push" );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sample Rate
|
* Sample Rate
|
||||||
@@ -261,8 +260,8 @@ public class R820TTunerConfigurationPanel extends JPanel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
add( mComboSampleRate );
|
add( new JLabel( "Sample Rate:" ) );
|
||||||
add( new JLabel( "Sample Rate" ), "wrap" );
|
add( mComboSampleRate, "growx,push" );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gain Controls
|
* Gain Controls
|
||||||
@@ -329,8 +328,8 @@ public class R820TTunerConfigurationPanel extends JPanel
|
|||||||
+ "<i>Mixer</i>, <i>LNA</i> and <i>Enhance</i> gain<br>"
|
+ "<i>Mixer</i>, <i>LNA</i> and <i>Enhance</i> gain<br>"
|
||||||
+ "settings, or one of the individual gain settings for<br>"
|
+ "settings, or one of the individual gain settings for<br>"
|
||||||
+ "semi-manual gain control</html>" );
|
+ "semi-manual gain control</html>" );
|
||||||
|
gainPanel.add( new JLabel( "Master" ) );
|
||||||
gainPanel.add( mComboMasterGain );
|
gainPanel.add( mComboMasterGain );
|
||||||
gainPanel.add( new JLabel( "Master" ), "wrap" );
|
|
||||||
|
|
||||||
/* Mixer Gain Control */
|
/* Mixer Gain Control */
|
||||||
mComboMixerGain = new JComboBox<R820TMixerGain>( R820TMixerGain.values() );
|
mComboMixerGain = new JComboBox<R820TMixerGain>( R820TMixerGain.values() );
|
||||||
@@ -380,8 +379,8 @@ public class R820TTunerConfigurationPanel extends JPanel
|
|||||||
mComboMixerGain.setToolTipText( "<html>Mixer Gain. Set master gain "
|
mComboMixerGain.setToolTipText( "<html>Mixer Gain. Set master gain "
|
||||||
+ "to <b>MASTER</b> to enable adjustment</html>" );
|
+ "to <b>MASTER</b> to enable adjustment</html>" );
|
||||||
mComboMixerGain.setEnabled( false );
|
mComboMixerGain.setEnabled( false );
|
||||||
gainPanel.add( mComboMixerGain );
|
gainPanel.add( new JLabel( "Mixer" ) );
|
||||||
gainPanel.add( new JLabel( "Mixer" ), "wrap" );
|
gainPanel.add( mComboMixerGain, "wrap" );
|
||||||
|
|
||||||
/* LNA Gain Control */
|
/* LNA Gain Control */
|
||||||
mComboLNAGain = new JComboBox<R820TLNAGain>( R820TLNAGain.values() );
|
mComboLNAGain = new JComboBox<R820TLNAGain>( R820TLNAGain.values() );
|
||||||
@@ -424,8 +423,8 @@ public class R820TTunerConfigurationPanel extends JPanel
|
|||||||
mComboLNAGain.setToolTipText( "<html>LNA Gain. Set master gain "
|
mComboLNAGain.setToolTipText( "<html>LNA Gain. Set master gain "
|
||||||
+ "to <b>MANUAL</b> to enable adjustment</html>" );
|
+ "to <b>MANUAL</b> to enable adjustment</html>" );
|
||||||
mComboLNAGain.setEnabled( false );
|
mComboLNAGain.setEnabled( false );
|
||||||
|
gainPanel.add( new JLabel( "LNA" ) );
|
||||||
gainPanel.add( mComboLNAGain );
|
gainPanel.add( mComboLNAGain );
|
||||||
gainPanel.add( new JLabel( "LNA" ), "wrap" );
|
|
||||||
|
|
||||||
/* VGA Gain Control */
|
/* VGA Gain Control */
|
||||||
mComboVGAGain = new JComboBox<R820TVGAGain>( R820TVGAGain.values() );
|
mComboVGAGain = new JComboBox<R820TVGAGain>( R820TVGAGain.values() );
|
||||||
@@ -468,8 +467,8 @@ public class R820TTunerConfigurationPanel extends JPanel
|
|||||||
mComboVGAGain.setToolTipText( "<html>VGA Gain. Set master gain "
|
mComboVGAGain.setToolTipText( "<html>VGA Gain. Set master gain "
|
||||||
+ "to <b>MANUAL</b> to enable adjustment</html>" );
|
+ "to <b>MANUAL</b> to enable adjustment</html>" );
|
||||||
mComboVGAGain.setEnabled( false );
|
mComboVGAGain.setEnabled( false );
|
||||||
gainPanel.add( mComboVGAGain );
|
gainPanel.add( new JLabel( "VGA" ) );
|
||||||
gainPanel.add( new JLabel( "VGA" ), "wrap" );
|
gainPanel.add( mComboVGAGain, "wrap" );
|
||||||
|
|
||||||
add( gainPanel, "span" );
|
add( gainPanel, "span" );
|
||||||
|
|
||||||
@@ -497,7 +496,7 @@ public class R820TTunerConfigurationPanel extends JPanel
|
|||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
add( mNewConfiguration );
|
add( mNewConfiguration, "growx,push" );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete the currently selected configuration
|
* Delete the currently selected configuration
|
||||||
@@ -537,7 +536,7 @@ public class R820TTunerConfigurationPanel extends JPanel
|
|||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
add( mDeleteConfiguration, "wrap" );
|
add( mDeleteConfiguration, "growx,push,wrap" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1224,7 +1224,6 @@ public class R820TTunerController extends RTL2832TunerController
|
|||||||
return (int)( fractional * 0x10000 ) & 0xFFFF;
|
return (int)( fractional * 0x10000 ) & 0xFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.info( "Freuqency not contained!" );
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,15 +19,21 @@ package source.tuner.rtl.r820t;
|
|||||||
|
|
||||||
import gui.control.JFrequencyControl;
|
import gui.control.JFrequencyControl;
|
||||||
|
|
||||||
|
import java.awt.Color;
|
||||||
import java.awt.EventQueue;
|
import java.awt.EventQueue;
|
||||||
|
|
||||||
import javax.swing.BorderFactory;
|
import javax.swing.BorderFactory;
|
||||||
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
|
|
||||||
|
import com.jidesoft.swing.JideTabbedPane;
|
||||||
|
|
||||||
import log.Log;
|
import log.Log;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import source.SourceException;
|
import source.SourceException;
|
||||||
import source.tuner.FrequencyChangeListener;
|
import source.tuner.FrequencyChangeListener;
|
||||||
|
import source.tuner.rtl.RTL2832InfoPanel;
|
||||||
|
import source.tuner.rtl.e4k.E4KTunerConfigurationPanel;
|
||||||
import controller.ResourceManager;
|
import controller.ResourceManager;
|
||||||
|
|
||||||
public class R820TTunerEditorPanel extends JPanel implements FrequencyChangeListener
|
public class R820TTunerEditorPanel extends JPanel implements FrequencyChangeListener
|
||||||
@@ -50,9 +56,9 @@ public class R820TTunerEditorPanel extends JPanel implements FrequencyChangeList
|
|||||||
|
|
||||||
private void initGUI()
|
private void initGUI()
|
||||||
{
|
{
|
||||||
setLayout( new MigLayout( "", "[grow,fill]", "[grow,fill]" ) );
|
setLayout( new MigLayout( "fill,wrap 2", "[right][grow]", "[][][grow]" ) );
|
||||||
|
|
||||||
setBorder( BorderFactory.createTitledBorder( "Rafael Micro R820T Tuner" ) );
|
add( new JLabel( "RTL2832 with R820T Tuner" ), "span 2, align center, wrap" );
|
||||||
|
|
||||||
mFrequencyControl = new JFrequencyControl();
|
mFrequencyControl = new JFrequencyControl();
|
||||||
|
|
||||||
@@ -60,10 +66,18 @@ public class R820TTunerEditorPanel extends JPanel implements FrequencyChangeList
|
|||||||
|
|
||||||
mFrequencyControl.setFrequency( mController.getFrequency(), false );
|
mFrequencyControl.setFrequency( mController.getFrequency(), false );
|
||||||
|
|
||||||
add( mFrequencyControl, "wrap" );
|
add( mFrequencyControl, "span 2, align center, wrap" );
|
||||||
|
|
||||||
add( new R820TTunerConfigurationPanel( mResourceManager, mController ),
|
JideTabbedPane tabs = new JideTabbedPane();
|
||||||
"wrap" );
|
tabs.setFont( this.getFont() );
|
||||||
|
tabs.setForeground( Color.BLACK );
|
||||||
|
|
||||||
|
tabs.addTab( "Configuration",
|
||||||
|
new R820TTunerConfigurationPanel( mResourceManager, mController ) );
|
||||||
|
|
||||||
|
tabs.addTab( "Info", new RTL2832InfoPanel( mController ) );
|
||||||
|
|
||||||
|
add( tabs, "grow,push,span" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user