mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
485 Upgrade Project and Build to Java 11 (#496)
* Updates gradle to 5.1.1 * Updated to run application from intellij using installed Java 11. Resolves issues with Java 9 deprecations. * Updates gradle build dependencies and other deprecation issues. * Updates gradle to produce OS-specific builds. * Updates the beryx runtime plugin to 1.1.1 to resolve issue with zipping each of the target distributions. * Import cleanup * Resolves issue with Look and Feel error on Max OSX Resolves issue with building OSX package Resolves issue with excessive logging about JMBE library.
This commit is contained in:
@@ -1,18 +1,22 @@
|
||||
/*******************************************************************************
|
||||
* sdr-trunk
|
||||
* Copyright (C) 2014-2018 Dennis Sheirer
|
||||
/*
|
||||
* ******************************************************************************
|
||||
* 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.
|
||||
* 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.
|
||||
* 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/>
|
||||
*
|
||||
******************************************************************************/
|
||||
* 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.spectrum;
|
||||
|
||||
import io.github.dsheirer.controller.channel.Channel;
|
||||
@@ -145,8 +149,8 @@ public class ChannelSpectrumPanel extends JPanel implements ChannelEventListener
|
||||
mOverlayPanel.addMouseListener(mouser);
|
||||
mOverlayPanel.addMouseMotionListener(mouser);
|
||||
|
||||
mLayeredPane.add(mSpectrumPanel, new Integer(0), 0);
|
||||
mLayeredPane.add(mOverlayPanel, new Integer(1), 0);
|
||||
mLayeredPane.add(mSpectrumPanel, 0, 0);
|
||||
mLayeredPane.add(mOverlayPanel, 1, 0);
|
||||
|
||||
add(mLayeredPane);
|
||||
}
|
||||
|
||||
@@ -365,8 +365,8 @@ public class SpectralDisplayPanel extends JPanel implements Listener<ReusableCom
|
||||
mOverlayPanel.addMouseWheelListener(mouser);
|
||||
|
||||
//Add the spectrum and channel panels to the layered panel
|
||||
mLayeredPanel.add(mSpectrumPanel, new Integer(0), 0);
|
||||
mLayeredPanel.add(mOverlayPanel, new Integer(1), 0);
|
||||
mLayeredPanel.add(mSpectrumPanel, 0, 0);
|
||||
mLayeredPanel.add(mOverlayPanel, 1, 0);
|
||||
|
||||
//Create the waterfall
|
||||
mWaterfallPanel.addMouseListener(mouser);
|
||||
@@ -878,13 +878,13 @@ public class SpectralDisplayPanel extends JPanel implements Listener<ReusableCom
|
||||
mWindowOffset = windowOffset;
|
||||
|
||||
Hashtable<Integer,JComponent> labels = new Hashtable<>();
|
||||
labels.put(new Integer(0), new JLabel("1x"));
|
||||
labels.put(new Integer(1), new JLabel("2x"));
|
||||
labels.put(new Integer(2), new JLabel("4x"));
|
||||
labels.put(new Integer(3), new JLabel("8x"));
|
||||
labels.put(new Integer(4), new JLabel("16x"));
|
||||
labels.put(new Integer(5), new JLabel("32x"));
|
||||
labels.put(new Integer(6), new JLabel("64x"));
|
||||
labels.put(0, new JLabel("1x"));
|
||||
labels.put(1, new JLabel("2x"));
|
||||
labels.put(2, new JLabel("4x"));
|
||||
labels.put(3, new JLabel("8x"));
|
||||
labels.put(4, new JLabel("16x"));
|
||||
labels.put(5, new JLabel("32x"));
|
||||
labels.put(6, new JLabel("64x"));
|
||||
|
||||
setLabelTable(labels);
|
||||
|
||||
|
||||
@@ -1,9 +1,30 @@
|
||||
/*
|
||||
* ******************************************************************************
|
||||
* 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.
|
||||
*
|
||||
* 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.spectrum.menu;
|
||||
|
||||
import io.github.dsheirer.dsp.filter.smoothing.SmoothingFilter;
|
||||
import io.github.dsheirer.spectrum.SpectralDisplayAdjuster;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JSlider;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
import java.awt.event.MouseEvent;
|
||||
@@ -16,60 +37,71 @@ public class SmoothingItem extends JSlider implements ChangeListener
|
||||
|
||||
private SpectralDisplayAdjuster mAdjuster;
|
||||
private int mDefaultValue;
|
||||
|
||||
public SmoothingItem( SpectralDisplayAdjuster adjuster, int defaultValue )
|
||||
{
|
||||
super( JSlider.HORIZONTAL,
|
||||
SmoothingFilter.SMOOTHING_MINIMUM,
|
||||
SmoothingFilter.SMOOTHING_MAXIMUM,
|
||||
adjuster.getSmoothing() );
|
||||
|
||||
mDefaultValue = defaultValue;
|
||||
mAdjuster = adjuster;
|
||||
|
||||
setSnapToTicks( true );
|
||||
setMajorTickSpacing( 6 );
|
||||
setMinorTickSpacing( 2 );
|
||||
setPaintTicks( true );
|
||||
setPaintLabels( true );
|
||||
|
||||
Hashtable<Integer,JLabel> labels = new Hashtable<>();
|
||||
labels.put( new Integer( 3 ), new JLabel( "3" ) );
|
||||
labels.put( new Integer( 9 ), new JLabel( "9" ) );
|
||||
labels.put( new Integer( 15 ), new JLabel( "15" ) );
|
||||
labels.put( new Integer( 21 ), new JLabel( "21" ) );
|
||||
labels.put( new Integer( 27 ), new JLabel( "27" ) );
|
||||
|
||||
setLabelTable( labels );
|
||||
|
||||
addChangeListener( this );
|
||||
|
||||
addMouseListener( new MouseListener()
|
||||
{
|
||||
@Override
|
||||
public void mouseClicked( MouseEvent event )
|
||||
{
|
||||
if( event.getClickCount() == 2 )
|
||||
{
|
||||
SmoothingItem.this.setValue( mDefaultValue );
|
||||
}
|
||||
}
|
||||
|
||||
public void mouseReleased( MouseEvent arg0 ) {}
|
||||
public void mousePressed( MouseEvent arg0 ) {}
|
||||
public void mouseExited( MouseEvent arg0 ) {}
|
||||
public void mouseEntered( MouseEvent arg0 ) {}
|
||||
} );
|
||||
public SmoothingItem(SpectralDisplayAdjuster adjuster, int defaultValue)
|
||||
{
|
||||
super(JSlider.HORIZONTAL,
|
||||
SmoothingFilter.SMOOTHING_MINIMUM,
|
||||
SmoothingFilter.SMOOTHING_MAXIMUM,
|
||||
adjuster.getSmoothing());
|
||||
|
||||
mDefaultValue = defaultValue;
|
||||
mAdjuster = adjuster;
|
||||
|
||||
setSnapToTicks(true);
|
||||
setMajorTickSpacing(6);
|
||||
setMinorTickSpacing(2);
|
||||
setPaintTicks(true);
|
||||
setPaintLabels(true);
|
||||
|
||||
Hashtable<Integer,JLabel> labels = new Hashtable<>();
|
||||
labels.put(3, new JLabel("3"));
|
||||
labels.put(9, new JLabel("9"));
|
||||
labels.put(15, new JLabel("15"));
|
||||
labels.put(21, new JLabel("21"));
|
||||
labels.put(27, new JLabel("27"));
|
||||
|
||||
setLabelTable(labels);
|
||||
|
||||
addChangeListener(this);
|
||||
|
||||
addMouseListener(new MouseListener()
|
||||
{
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent event)
|
||||
{
|
||||
if(event.getClickCount() == 2)
|
||||
{
|
||||
SmoothingItem.this.setValue(mDefaultValue);
|
||||
}
|
||||
}
|
||||
|
||||
public void mouseReleased(MouseEvent arg0)
|
||||
{
|
||||
}
|
||||
|
||||
public void mousePressed(MouseEvent arg0)
|
||||
{
|
||||
}
|
||||
|
||||
public void mouseExited(MouseEvent arg0)
|
||||
{
|
||||
}
|
||||
|
||||
public void mouseEntered(MouseEvent arg0)
|
||||
{
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stateChanged( ChangeEvent event )
|
||||
@Override
|
||||
public void stateChanged(ChangeEvent event)
|
||||
{
|
||||
int value = ((JSlider)event.getSource()).getValue();
|
||||
int value = ((JSlider)event.getSource()).getValue();
|
||||
|
||||
if( value % 2 == 1 )
|
||||
{
|
||||
mAdjuster.setSmoothing( value );
|
||||
}
|
||||
if(value % 2 == 1)
|
||||
{
|
||||
mAdjuster.setSmoothing(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user