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>.
2626import static fiji .plugin .trackmate .gui .Fonts .FONT ;
2727import static fiji .plugin .trackmate .gui .Fonts .SMALL_FONT ;
2828import static fiji .plugin .trackmate .gui .Icons .MAGNIFIER_ICON ;
29+ import static fiji .plugin .trackmate .weka .WekaDetectorFactory .ICON ;
2930import static fiji .plugin .trackmate .weka .WekaDetectorFactory .KEY_CLASSIFIER_FILEPATH ;
3031import static fiji .plugin .trackmate .weka .WekaDetectorFactory .KEY_CLASS_INDEX ;
3132import static fiji .plugin .trackmate .weka .WekaDetectorFactory .KEY_PROBA_THRESHOLD ;
3637import java .awt .Insets ;
3738import java .beans .PropertyChangeListener ;
3839import java .io .File ;
39- import java .net .URL ;
4040import java .text .DecimalFormat ;
4141import java .text .NumberFormat ;
4242import java .util .Arrays ;
4646import java .util .Vector ;
4747
4848import javax .swing .DefaultComboBoxModel ;
49- import javax .swing .ImageIcon ;
5049import javax .swing .JButton ;
5150import javax .swing .JComboBox ;
5251import javax .swing .JFormattedTextField ;
@@ -80,8 +79,6 @@ public class WekaDetectorConfigurationPanel extends ConfigurationPanel
8079
8180 private static final NumberFormat THRESHOLD_FORMAT = new DecimalFormat ( "#.##" );
8281
83- protected static final ImageIcon ICON = new ImageIcon ( getResource ( "images/TrackMateWeka-logo-100px.png" ) );
84-
8582 private static final String TITLE = WekaDetectorFactory .NAME ;
8683
8784 private static final FileFilter fileFilter = new FileNameExtensionFilter ( "Weka classifier files." , "model" );
@@ -114,9 +111,8 @@ public WekaDetectorConfigurationPanel( final Settings settings, final Model mode
114111
115112 final GridBagLayout gridBagLayout = new GridBagLayout ();
116113 gridBagLayout .columnWidths = new int [] { 144 , 0 , 32 };
117- gridBagLayout .rowHeights = new int [] { 0 , 84 , 0 , 27 , 0 , 0 , 0 , 0 , 37 , 23 };
114+ gridBagLayout .rowHeights = new int [] { 0 , 0 , 0 , 27 , 0 , 0 , 0 , 0 , 150 };
118115 gridBagLayout .columnWeights = new double [] { 0.0 , 1.0 , 0.0 };
119- gridBagLayout .rowWeights = new double [] { 0. , 1. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. };
120116 setLayout ( gridBagLayout );
121117
122118 final JLabel lblDetector = new JLabel ( TITLE , ICON , JLabel .RIGHT );
@@ -140,7 +136,13 @@ public WekaDetectorConfigurationPanel( final Settings settings, final Model mode
140136 gbcLblHelptext .insets = new Insets ( 5 , 10 , 5 , 10 );
141137 gbcLblHelptext .gridx = 0 ;
142138 gbcLblHelptext .gridy = 1 ;
143- add ( GuiUtils .textInScrollPanel ( GuiUtils .infoDisplay ( WekaDetectorFactory .INFO_TEXT ) ), gbcLblHelptext );
139+ gbcLblHelptext .weighty = 1. ;
140+ add ( GuiUtils .textInScrollPanel ( GuiUtils .infoDisplay (
141+ "<html>Online documentation: <br/>"
142+ + "<a href='" + WekaDetectorFactory .DOC_URL + "'>"
143+ + WekaDetectorFactory .DOC_URL
144+ + "</a></html>" ) ),
145+ gbcLblHelptext );
144146
145147 /*
146148 * Channel selector.
@@ -433,9 +435,4 @@ public void run()
433435 }
434436 }.start ();
435437 }
436-
437- protected static URL getResource ( final String name )
438- {
439- return WekaDetectorFactory .class .getClassLoader ().getResource ( name );
440- }
441438}
0 commit comments