Skip to content

Commit

Permalink
Detection preview panel tweak.
Browse files Browse the repository at this point in the history
Make sure the detection preview panel is slanted at the bottom of its display.
  • Loading branch information
tinevez committed Jul 9, 2024
1 parent 0bd86ec commit d6fdfb5
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import java.util.function.DoubleConsumer;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

import fiji.plugin.trackmate.Logger;
Expand Down Expand Up @@ -67,18 +68,20 @@ public DetectionPreviewPanel( final DoubleConsumer thresholdUpdater, final Strin
{
final GridBagLayout gridBagLayout = new GridBagLayout();
gridBagLayout.columnWeights = new double[] { 1.0, 0.0 };
gridBagLayout.rowWeights = new double[] { 0., 0. };
gridBagLayout.rowHeights = new int[] { 120, 20 };
gridBagLayout.rowWeights = new double[] { 1., 0., 0. };
gridBagLayout.rowHeights = new int[] { 0, 120, 20 };

setLayout( gridBagLayout );

add( new JLabel() );

this.chart = new QualityHistogramChart( thresholdUpdater, axisLabel );
final GridBagConstraints gbcHistogram = new GridBagConstraints();
gbcHistogram.gridwidth = 2;
gbcHistogram.insets = new Insets( 0, 0, 5, 0 );
gbcHistogram.fill = GridBagConstraints.BOTH;
gbcHistogram.gridx = 0;
gbcHistogram.gridy = 0;
gbcHistogram.gridy = 1;
add( chart, gbcHistogram );

final JLabelLogger labelLogger = new JLabelLogger();
Expand All @@ -87,7 +90,7 @@ public DetectionPreviewPanel( final DoubleConsumer thresholdUpdater, final Strin
gbcLabelLogger.insets = new Insets( 5, 5, 0, 5 );
gbcLabelLogger.fill = GridBagConstraints.BOTH;
gbcLabelLogger.gridx = 0;
gbcLabelLogger.gridy = 1;
gbcLabelLogger.gridy = 2;
add( labelLogger, gbcLabelLogger );
this.logger = labelLogger.getLogger();

Expand All @@ -107,7 +110,7 @@ public DetectionPreviewPanel( final DoubleConsumer thresholdUpdater, final Strin
gbcBtnPreview.anchor = GridBagConstraints.NORTHEAST;
gbcBtnPreview.insets = new Insets( 5, 5, 0, 0 );
gbcBtnPreview.gridx = 1;
gbcBtnPreview.gridy = 1;
gbcBtnPreview.gridy = 2;
this.add( btnPanel, gbcBtnPreview );

setPreferredSize( new Dimension( 240, 100 ) );
Expand Down

0 comments on commit d6fdfb5

Please sign in to comment.