@@ -221,7 +221,7 @@ public class Weka_Segmentation implements PlugIn
221221 private JButton [] addExampleButton = null ;
222222 private JButton [] addExampleExtras = null ; // consider JideSplitButton?
223223 private final JPopupMenu addExampleMenu = new JPopupMenu ();
224- private final JMenuItem exampleColor = new JMenuItem (new AbstractAction ("🎨 Change color…" ) {
224+ private final JMenuItem exampleColor = new JMenuItem (new AbstractAction ("Change color…" , new SymbolIcon ( "🎨" ) ) {
225225 private static final long serialVersionUID = 1L ;
226226 {
227227 putValue (Action .SHORT_DESCRIPTION , "Change class and traces color" );
@@ -239,7 +239,7 @@ public void actionPerformed(ActionEvent e) {
239239 IJ .showMessage ("Failed to look up class " + label + " for color change" );
240240 }
241241 });
242- private final JMenuItem exampleRename = new JMenuItem (new AbstractAction ("✎ Rename class…" ) {
242+ private final JMenuItem exampleRename = new JMenuItem (new AbstractAction ("Rename class…" , new SymbolIcon ( "✎" ) ) {
243243 private static final long serialVersionUID = 1L ;
244244 {
245245 putValue (Action .SHORT_DESCRIPTION , "Change class label" );
@@ -259,7 +259,7 @@ public void actionPerformed(ActionEvent e) {
259259 IJ .showMessage ("Failed to look up class " + label + " for label change" );
260260 }
261261 });
262- private final JMenuItem exampleRemove = new JMenuItem (new AbstractAction ("✘ Remove class" ) {
262+ private final JMenuItem exampleRemove = new JMenuItem (new AbstractAction ("Remove class" , new SymbolIcon ( "✘" ) ) {
263263 private static final long serialVersionUID = 1L ;
264264 {
265265 putValue (Action .SHORT_DESCRIPTION , "Remove class and all associated traces" );
@@ -285,7 +285,7 @@ public void actionPerformed(ActionEvent e) {
285285 });
286286 /** Tag for class label name in addExampleExtras' client property bag */
287287 private final Object labelTag = new Object ();
288- private final JButton saveExamplesButton = new JButton (new AbstractAction ("💾 Save…" ) {
288+ private final JButton saveExamplesButton = new JButton (new AbstractAction ("Save…" , new SymbolIcon ( "💾" ) ) {
289289 private static final long serialVersionUID = 1L ;
290290 {
291291 putValue (Action .SHORT_DESCRIPTION , "Save example ROI traces" );
@@ -298,7 +298,7 @@ public void actionPerformed(ActionEvent e) {
298298 }
299299
300300 });
301- private final JButton loadExamplesButton = new JButton (new AbstractAction ("📂 Load…" ) {
301+ private final JButton loadExamplesButton = new JButton (new AbstractAction ("Load…" , new SymbolIcon ( "📂" ) ) {
302302 private static final long serialVersionUID = 1L ;
303303 {
304304 putValue (Action .SHORT_DESCRIPTION , "Load example ROI traces" );
@@ -798,13 +798,6 @@ private class CustomWindow extends StackWindow
798798
799799 setTitle ( Weka_Segmentation .PLUGIN_NAME + " " + Weka_Segmentation .PLUGIN_VERSION );
800800
801- // remove space for a menu item icon in default look and feel
802- // https://stackoverflow.com/a/64590818/673826
803- // https://github.com/JFormDesigner/FlatLaf/issues/328
804- final Insets insets = new Insets (2 , -8 , 2 , 2 );
805- exampleColor .setMargin (insets );
806- exampleRename .setMargin (insets );
807- exampleRemove .setMargin (insets );
808801 addExampleMenu .add (exampleColor );
809802 addExampleMenu .add (exampleRename );
810803 addExampleMenu .addSeparator ();
0 commit comments