Code cleanup for waterfall and overlay panels

This commit is contained in:
Denny
2016-05-30 07:30:17 -04:00
parent 8fec7c7314
commit 61d9698ca5
2 changed files with 5 additions and 7 deletions

View File

@@ -96,9 +96,6 @@ public class OverlayPanel extends JPanel
private Color mColorSpectrumCursor;
private Color mColorSpectrumLine;
// //All channels
// private List<Channel> mChannels = new ArrayList<Channel>();
//
//Currently visible/displayable channels
private CopyOnWriteArrayList<Channel> mVisibleChannels = new CopyOnWriteArrayList<Channel>();
private ChannelDisplay mChannelDisplay = ChannelDisplay.ALL;

View File

@@ -278,26 +278,27 @@ public class WaterfallPanel extends JPanel implements DFTResultsListener,
{
return ( (double)getWidth() * (double)multiplier ) / (double)mDFTSize;
}
/**
* Renders the screen at each refresh
*/
public void paintComponent( Graphics g )
{
super.paintComponent( g );
int multiplier = getZoomMultiplier();
double binPixelWidth = getBinPixelWidth( multiplier );
int offset = (int)( getPixelOffset( multiplier ) - binPixelWidth );
g.drawImage( mWaterfallImage,
offset,
0,
( getWidth() * multiplier ) + (int)binPixelWidth,
mImageHeight,
mImageHeight,
this );
Graphics2D graphics = (Graphics2D) g;
graphics.setColor( mColorSpectrumCursor );