mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
* WIP - Adds support for aliasing P25 Phase 2 tones.Playlist editor - adds editor support for alias actions * Playlist editor implementation and integration into application is complete. Adds JavaFX window monitoring to persist window size/location across application runs. Co-authored-by: Denny <denny@denny-desktop>
This commit is contained in:
@@ -627,6 +627,11 @@ public class OverlayPanel extends JPanel implements Listener<ChannelEvent>, ISou
|
||||
{
|
||||
FontMetrics fontMetrics = graphics.getFontMetrics(font);
|
||||
|
||||
if(text == null || text.isEmpty())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Rectangle2D label = fontMetrics.getStringBounds(text, graphics);
|
||||
|
||||
double offset = label.getWidth() / 2.0d;
|
||||
|
||||
@@ -28,6 +28,7 @@ import io.github.dsheirer.controller.channel.ChannelProcessingManager;
|
||||
import io.github.dsheirer.controller.channel.ChannelUtils;
|
||||
import io.github.dsheirer.dsp.filter.Window.WindowType;
|
||||
import io.github.dsheirer.dsp.filter.smoothing.SmoothingFilter.SmoothingType;
|
||||
import io.github.dsheirer.playlist.PlaylistManager;
|
||||
import io.github.dsheirer.properties.SystemProperties;
|
||||
import io.github.dsheirer.sample.Listener;
|
||||
import io.github.dsheirer.sample.SampleType;
|
||||
@@ -122,13 +123,10 @@ public class SpectralDisplayPanel extends JPanel implements Listener<ReusableCom
|
||||
* the DFT is translated to decibels for display in the spectrum and
|
||||
* waterfall components.
|
||||
*/
|
||||
public SpectralDisplayPanel(ChannelModel channelModel,
|
||||
ChannelProcessingManager channelProcessingManager,
|
||||
SettingsManager settingsManager,
|
||||
TunerModel tunerModel)
|
||||
public SpectralDisplayPanel(PlaylistManager playlistManager, SettingsManager settingsManager, TunerModel tunerModel)
|
||||
{
|
||||
mChannelModel = channelModel;
|
||||
mChannelProcessingManager = channelProcessingManager;
|
||||
mChannelModel = playlistManager.getChannelModel();
|
||||
mChannelProcessingManager = playlistManager.getChannelProcessingManager();
|
||||
mSettingsManager = settingsManager;
|
||||
mTunerModel = tunerModel;
|
||||
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
******************************************************************************/
|
||||
package io.github.dsheirer.spectrum;
|
||||
|
||||
import io.github.dsheirer.controller.channel.ChannelModel;
|
||||
import io.github.dsheirer.controller.channel.ChannelProcessingManager;
|
||||
import io.github.dsheirer.playlist.PlaylistManager;
|
||||
import io.github.dsheirer.settings.SettingsManager;
|
||||
import io.github.dsheirer.source.tuner.Tuner;
|
||||
import io.github.dsheirer.source.tuner.TunerModel;
|
||||
@@ -33,11 +32,7 @@ public class SpectrumFrame extends JFrame implements WindowListener
|
||||
|
||||
private SpectralDisplayPanel mSpectralDisplayPanel;
|
||||
|
||||
public SpectrumFrame(ChannelModel channelModel,
|
||||
ChannelProcessingManager channelProcessingManager,
|
||||
SettingsManager settingsManager,
|
||||
TunerModel tunerModel,
|
||||
Tuner tuner)
|
||||
public SpectrumFrame(PlaylistManager playlistManager, SettingsManager settingsManager, TunerModel tunerModel, Tuner tuner)
|
||||
{
|
||||
setTitle("SDRTRunk [" + tuner.getName() + "]");
|
||||
setBounds(100, 100, 1280, 600);
|
||||
@@ -45,8 +40,7 @@ public class SpectrumFrame extends JFrame implements WindowListener
|
||||
|
||||
setLayout(new MigLayout("insets 0 0 0 0", "[grow]", "[grow]"));
|
||||
|
||||
mSpectralDisplayPanel = new SpectralDisplayPanel(channelModel,
|
||||
channelProcessingManager, settingsManager, tunerModel);
|
||||
mSpectralDisplayPanel = new SpectralDisplayPanel(playlistManager, settingsManager, tunerModel);
|
||||
|
||||
mSpectralDisplayPanel.showTuner(tuner);
|
||||
add(mSpectralDisplayPanel, "grow");
|
||||
|
||||
Reference in New Issue
Block a user