Skip to content

Commit 69304d4

Browse files
committed
Use the helper icon everywhere we can.
1 parent be3609e commit 69304d4

4 files changed

Lines changed: 17 additions & 15 deletions

File tree

src/main/java/fiji/plugin/trackmate/helper/TrackMateParameterSweepResultsPlugin.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
* it under the terms of the GNU General Public License as
99
* published by the Free Software Foundation, either version 3 of the
1010
* License, or (at your option) any later version.
11-
*
11+
*
1212
* This program is distributed in the hope that it will be useful,
1313
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1515
* GNU General Public License for more details.
16-
*
16+
*
1717
* You should have received a copy of the GNU General Public
1818
* License along with this program. If not, see
1919
* <http://www.gnu.org/licenses/gpl-3.0.html>.
@@ -31,10 +31,10 @@
3131

3232
import fiji.plugin.trackmate.Logger;
3333
import fiji.plugin.trackmate.gui.Fonts;
34-
import fiji.plugin.trackmate.gui.Icons;
3534
import fiji.plugin.trackmate.helper.ctc.CTCTrackingMetricsType;
3635
import fiji.plugin.trackmate.helper.spt.SPTTrackingMetricsType;
3736
import fiji.plugin.trackmate.helper.ui.CrawlerResultsPanel;
37+
import fiji.plugin.trackmate.helper.ui.components.GuiUtils;
3838
import fiji.plugin.trackmate.util.TMUtils;
3939
import fiji.util.gui.GenericDialogPlus;
4040
import ij.IJ;
@@ -51,9 +51,9 @@ public class TrackMateParameterSweepResultsPlugin implements PlugIn
5151
public void run( final String arg )
5252
{
5353
final GenericDialogPlus dialog = new GenericDialogPlus( "TrackMate-Helper results inspector" );
54-
dialog.setIconImage( Icons.TRACKMATE_ICON.getImage() );
54+
dialog.setIconImage( GuiUtils.HELPER_ICON_BIG.getImage() );
5555

56-
dialog.addImage( Icons.TRACKMATE_ICON );
56+
dialog.addImage( GuiUtils.HELPER_ICON );
5757
dialog.addToSameRow();
5858
dialog.addMessage( "TrackMate-Helper results inspector", Fonts.BIG_FONT );
5959
dialog.addMessage( "v" + VersionUtils.getVersion( TrackMateParameterSweepPlugin.class ), Fonts.SMALL_FONT );
@@ -122,7 +122,7 @@ public void windowClosing( final java.awt.event.WindowEvent e )
122122
crawler.stopWatching();
123123
}
124124
} );
125-
frame.setIconImage( Icons.TRACKMATE_ICON.getImage() );
125+
frame.setIconImage( GuiUtils.HELPER_ICON_BIG.getImage() );
126126
frame.getContentPane().add( panel );
127127
frame.setSize( 800, 400 );
128128
frame.setLocationRelativeTo( null );

src/main/java/fiji/plugin/trackmate/helper/model/ParameterSweepModelIO.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@
4747
import com.google.gson.JsonSerializer;
4848

4949
import fiji.plugin.trackmate.detection.SpotDetectorFactoryBase;
50-
import fiji.plugin.trackmate.gui.Icons;
5150
import fiji.plugin.trackmate.helper.model.detector.DetectorSweepModel;
5251
import fiji.plugin.trackmate.helper.model.parameter.AbstractArrayParamSweepModel.ArrayRangeType;
5352
import fiji.plugin.trackmate.helper.model.parameter.AbstractParamSweepModel;
5453
import fiji.plugin.trackmate.helper.model.parameter.AbstractParamSweepModelIO;
5554
import fiji.plugin.trackmate.helper.model.parameter.EnumParamSweepModel;
5655
import fiji.plugin.trackmate.helper.model.parameter.InfoParamSweepModel;
5756
import fiji.plugin.trackmate.helper.model.tracker.TrackerSweepModel;
57+
import fiji.plugin.trackmate.helper.ui.components.GuiUtils;
5858
import fiji.plugin.trackmate.providers.DetectorProvider;
5959
import fiji.plugin.trackmate.providers.TrackerProvider;
6060
import fiji.plugin.trackmate.tracking.SpotTrackerFactory;
@@ -131,7 +131,7 @@ public static ParameterSweepModel readFrom( final File modelFile )
131131
+ " "
132132
+ modelFile;
133133
final String title = "TrackMate-Helper error";
134-
JOptionPane.showMessageDialog( null, msg, title, JOptionPane.ERROR_MESSAGE, Icons.TRACKMATE_ICON );
134+
JOptionPane.showMessageDialog( null, msg, title, JOptionPane.ERROR_MESSAGE, GuiUtils.HELPER_ICON );
135135
e.printStackTrace();
136136
}
137137
catch ( final FileNotFoundException e )

src/main/java/fiji/plugin/trackmate/helper/ui/ParameterSweepController.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
* it under the terms of the GNU General Public License as
99
* published by the Free Software Foundation, either version 3 of the
1010
* License, or (at your option) any later version.
11-
*
11+
*
1212
* This program is distributed in the hope that it will be useful,
1313
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1515
* GNU General Public License for more details.
16-
*
16+
*
1717
* You should have received a copy of the GNU General Public
1818
* License along with this program. If not, see
1919
* <http://www.gnu.org/licenses/gpl-3.0.html>.
@@ -29,12 +29,12 @@
2929

3030
import org.scijava.Cancelable;
3131

32-
import fiji.plugin.trackmate.gui.Icons;
3332
import fiji.plugin.trackmate.helper.HelperRunner;
3433
import fiji.plugin.trackmate.helper.HelperRunner.Builder;
3534
import fiji.plugin.trackmate.helper.ResultsCrawler;
3635
import fiji.plugin.trackmate.helper.model.ParameterSweepModel;
3736
import fiji.plugin.trackmate.helper.model.ParameterSweepModelIO;
37+
import fiji.plugin.trackmate.helper.ui.components.GuiUtils;
3838
import fiji.plugin.trackmate.util.EverythingDisablerAndReenabler;
3939
import ij.ImagePlus;
4040

@@ -79,7 +79,7 @@ public void windowClosing( final java.awt.event.WindowEvent e )
7979
crawler.stopWatching();
8080
}
8181
} );
82-
frame.setIconImage( Icons.TRACKMATE_ICON.getImage() );
82+
frame.setIconImage( GuiUtils.HELPER_ICON_BIG.getImage() );
8383
frame.getContentPane().add( gui );
8484
frame.setSize( 600, 700 );
8585
frame.setLocationRelativeTo( null );
@@ -97,7 +97,7 @@ private void resetParameters()
9797
+ "<p>"
9898
+ "and relaunching this user interface. Are you sure?";
9999
final String title = "Reset parameters";
100-
final int answer = JOptionPane.showConfirmDialog( frame, toHtml( msg ), title, JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, Icons.TRACKMATE_ICON );
100+
final int answer = JOptionPane.showConfirmDialog( frame, toHtml( msg ), title, JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, GuiUtils.HELPER_ICON );
101101
if ( answer != JOptionPane.YES_OPTION )
102102
return;
103103

@@ -108,7 +108,7 @@ private void resetParameters()
108108
if ( file.exists() )
109109
{
110110
final String msg2 = "Could not delete the file: " + file;
111-
JOptionPane.showMessageDialog( frame, toHtml( msg2 ), title, JOptionPane.ERROR_MESSAGE, Icons.TRACKMATE_ICON );
111+
JOptionPane.showMessageDialog( frame, toHtml( msg2 ), title, JOptionPane.ERROR_MESSAGE, GuiUtils.HELPER_ICON );
112112
return;
113113
}
114114

@@ -132,7 +132,7 @@ private void resetParameters()
132132
if ( newRunner == null )
133133
{
134134
final String msg3 = builder.getErrorMessage();
135-
JOptionPane.showMessageDialog( frame, toHtml( msg3 ), title, JOptionPane.ERROR_MESSAGE, Icons.TRACKMATE_ICON );
135+
JOptionPane.showMessageDialog( frame, toHtml( msg3 ), title, JOptionPane.ERROR_MESSAGE, GuiUtils.HELPER_ICON );
136136
return;
137137
}
138138

src/main/java/fiji/plugin/trackmate/helper/ui/components/GuiUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ public class GuiUtils
3232

3333
public static final ImageIcon HELPER_ICON = new ImageIcon( GuiUtils.class.getResource( "/images/TrackMate-Helper-logo-64px.png" ) );
3434

35+
public static final ImageIcon HELPER_ICON_BIG = new ImageIcon( GuiUtils.class.getResource( "/images/TrackMate-Helper-logo.png" ) );
36+
3537
public static void changeFont( final Component component, final Font font )
3638
{
3739
component.setFont( font );

0 commit comments

Comments
 (0)