mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-14 09:37:36 -05:00
Spectrum/Waterfall display zoom feature - work in progress (issue #33)
Implements zoom in/out by mouse scroll wheel and by right-click context menu. Still have to add ability to drag spectrum left/right when zoomed in.
This commit is contained in:
@@ -5,24 +5,24 @@ import java.awt.event.ActionListener;
|
||||
|
||||
import javax.swing.JCheckBoxMenuItem;
|
||||
|
||||
import spectrum.DFTProcessor;
|
||||
import spectrum.FFTWidth;
|
||||
import spectrum.DFTSize;
|
||||
import spectrum.IDFTWidthChangeProcessor;
|
||||
|
||||
public class FFTWidthItem extends JCheckBoxMenuItem
|
||||
public class DFTSizeItem extends JCheckBoxMenuItem
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private DFTProcessor mDFTProcessor;
|
||||
private FFTWidth mFFTWidth;
|
||||
private IDFTWidthChangeProcessor mDFTProcessor;
|
||||
private DFTSize mDFTSize;
|
||||
|
||||
public FFTWidthItem( DFTProcessor processor, FFTWidth width )
|
||||
public DFTSizeItem( IDFTWidthChangeProcessor processor, DFTSize size )
|
||||
{
|
||||
super( width.getLabel() );
|
||||
super( size.getLabel() );
|
||||
|
||||
mDFTProcessor = processor;
|
||||
mFFTWidth = width;
|
||||
mDFTSize = size;
|
||||
|
||||
if( processor.getFFTWidth() == mFFTWidth )
|
||||
if( processor.getDFTSize() == mDFTSize )
|
||||
{
|
||||
setSelected( true );
|
||||
}
|
||||
@@ -32,7 +32,7 @@ public class FFTWidthItem extends JCheckBoxMenuItem
|
||||
@Override
|
||||
public void actionPerformed( ActionEvent arg0 )
|
||||
{
|
||||
mDFTProcessor.setFFTSize( mFFTWidth );
|
||||
mDFTProcessor.setDFTSize( mDFTSize );
|
||||
}
|
||||
} );
|
||||
}
|
||||
Reference in New Issue
Block a user