mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
P25 Phase 2 Decoder implementation.
This commit is contained in:
@@ -1,21 +1,23 @@
|
||||
/*
|
||||
* ******************************************************************************
|
||||
* sdrtrunk
|
||||
* Copyright (C) 2014-2019 Dennis Sheirer
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* * ******************************************************************************
|
||||
* * Copyright (C) 2014-2019 Dennis Sheirer
|
||||
* *
|
||||
* * This program is free software: you can redistribute it and/or modify
|
||||
* * it under the terms of the GNU General Public License as published by
|
||||
* * the Free Software Foundation, either version 3 of the License, or
|
||||
* * (at your option) any later version.
|
||||
* *
|
||||
* * This program is distributed in the hope that it will be useful,
|
||||
* * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* * GNU General Public License for more details.
|
||||
* *
|
||||
* * You should have received a copy of the GNU General Public License
|
||||
* * along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
* * *****************************************************************************
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
* *****************************************************************************
|
||||
*/
|
||||
|
||||
package io.github.dsheirer.source.tuner;
|
||||
@@ -23,12 +25,15 @@ package io.github.dsheirer.source.tuner;
|
||||
import com.jidesoft.swing.JideSplitPane;
|
||||
import io.github.dsheirer.preference.UserPreferences;
|
||||
import io.github.dsheirer.preference.swing.JTableColumnWidthMonitor;
|
||||
import io.github.dsheirer.record.RecorderManager;
|
||||
import io.github.dsheirer.sample.Listener;
|
||||
import io.github.dsheirer.source.tuner.TunerEvent.Event;
|
||||
import io.github.dsheirer.source.tuner.recording.RecordingTuner;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
@@ -44,6 +49,8 @@ import javax.swing.table.TableRowSorter;
|
||||
import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.util.ArrayList;
|
||||
@@ -63,10 +70,10 @@ public class TunerViewPanel extends JPanel
|
||||
private TunerEditor mTunerEditor;
|
||||
private UserPreferences mUserPreferences;
|
||||
|
||||
public TunerViewPanel(TunerModel tunerModel, UserPreferences userPreferences)
|
||||
public TunerViewPanel(TunerModel tunerModel, UserPreferences userPreferences, RecorderManager recorderManager)
|
||||
{
|
||||
mTunerModel = tunerModel;
|
||||
mTunerEditor = new TunerEditor(mTunerModel.getTunerConfigurationModel());
|
||||
mTunerEditor = new TunerEditor(mTunerModel.getTunerConfigurationModel(), recorderManager);
|
||||
mUserPreferences = userPreferences;
|
||||
|
||||
init();
|
||||
@@ -158,15 +165,36 @@ public class TunerViewPanel extends JPanel
|
||||
mTunerTable.getColumnModel().getColumn(TunerModel.SPECTRAL_DISPLAY_NEW).setCellRenderer(renderer);
|
||||
|
||||
mColumnWidthMonitor = new JTableColumnWidthMonitor(mUserPreferences, mTunerTable, TABLE_PREFERENCE_KEY);
|
||||
JScrollPane listScroller = new JScrollPane(mTunerTable);
|
||||
listScroller.setPreferredSize(new Dimension(400, 20));
|
||||
JScrollPane tunerTableScroller = new JScrollPane(mTunerTable);
|
||||
tunerTableScroller.setPreferredSize(new Dimension(400, 20));
|
||||
|
||||
JPanel tunerTablePanel = new JPanel();
|
||||
tunerTablePanel.setLayout(new MigLayout("insets 0 0 0 0", "[fill,grow][]", "[fill,grow][]"));
|
||||
tunerTablePanel.add(tunerTableScroller, "span");
|
||||
|
||||
tunerTablePanel.add(new JLabel("")); //Empty spacer
|
||||
JButton addRecordingTunerButton = new JButton("Add Recording Tuner");
|
||||
addRecordingTunerButton.setEnabled(mTunerModel.canAddRecordingTuner());
|
||||
addRecordingTunerButton.addActionListener(new ActionListener()
|
||||
{
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e)
|
||||
{
|
||||
RecordingTuner recordingTuner = new RecordingTuner(mUserPreferences);
|
||||
mTunerModel.addTuner(recordingTuner);
|
||||
addRecordingTunerButton.setEnabled(mTunerModel.canAddRecordingTuner());
|
||||
}
|
||||
});
|
||||
tunerTablePanel.add(addRecordingTunerButton);
|
||||
|
||||
tunerTablePanel.add(addRecordingTunerButton);
|
||||
|
||||
JScrollPane editorScroller = new JScrollPane(mTunerEditor);
|
||||
editorScroller.setPreferredSize(new Dimension(400, 80));
|
||||
|
||||
mSplitPane = new JideSplitPane();
|
||||
mSplitPane.setOrientation(JideSplitPane.VERTICAL_SPLIT);
|
||||
mSplitPane.add(listScroller);
|
||||
mSplitPane.add(tunerTablePanel);
|
||||
mSplitPane.add(editorScroller);
|
||||
|
||||
add(mSplitPane);
|
||||
|
||||
Reference in New Issue
Block a user