| 1 | package com.rox.video; | |
| 2 | ||
| 3 | /** | |
| 4 | * One item in a menu filled as it opens - see {@link SwingVideoOutput#fillMenuOnOpen}. | |
| 5 | * | |
| 6 | * @param action what choosing it does, or {@code null} for an item shown greyed out | |
| 7 | */ | |
| 8 | public record MenuEntry(String label, Runnable action) { | |
| 9 | /** A dividing line. */ | |
| 10 | public static final MenuEntry SEPARATOR = new MenuEntry(null, null); | |
| 11 | ||
| 12 | /** Shown, but greyed out - e.g. to say a list is empty. */ | |
| 13 | public static MenuEntry disabled(final String label){ | |
| 14 |
1
1. disabled : replaced return value with null for com/rox/video/MenuEntry::disabled → KILLED |
return new MenuEntry(label, null); |
| 15 | } | |
| 16 | } | |
Mutations | ||
| 14 |
1.1 |