Skip to content

Commit 63cf7e7

Browse files
committed
Display detector and tracker icons on the tabbed pane.
1 parent d7d973c commit 63cf7e7

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

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

Lines changed: 10 additions & 3 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>.
@@ -23,17 +23,24 @@
2323

2424
import java.util.Map;
2525

26+
import javax.swing.ImageIcon;
27+
2628
import fiji.plugin.trackmate.TrackMateModule;
2729
import fiji.plugin.trackmate.helper.model.parameter.AbstractParamSweepModel;
2830

2931
public abstract class AbstractSweepModel< F extends TrackMateModule > extends AbstractSweepModelBase
3032
{
3133

3234
protected final F factory;
33-
35+
3436
protected AbstractSweepModel( final String name, final Map< String, AbstractParamSweepModel< ? > > models, final F factory )
3537
{
3638
super( name, models );
3739
this.factory = factory;
3840
}
41+
42+
public ImageIcon getIcon()
43+
{
44+
return factory.getIcon();
45+
}
3946
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ public void mouseClicked( final java.awt.event.MouseEvent e )
274274
final ActionListener al = l -> {
275275
if ( chkbox.isSelected() )
276276
{
277-
tabbedPane.addTab( name, null, panel, null );
277+
tabbedPane.addTab( name, dm.getIcon(), panel, null );
278278
model.setActive( name, true );
279279
}
280280
else
@@ -319,7 +319,7 @@ public void mouseClicked( final java.awt.event.MouseEvent e )
319319
final ActionListener al = e -> {
320320
if ( chkbox.isSelected() )
321321
{
322-
tabbedPane.addTab( name, null, panel, null );
322+
tabbedPane.addTab( name, tm.getIcon(), panel, null );
323323
model.setActive( name, true );
324324
}
325325
else

0 commit comments

Comments
 (0)