use of edu.mit.csail.sdg.alloy4.A4Preferences.BooleanPref in project org.alloytools.alloy by AlloyTools.
the class SimpleGUI method addToMenu.
/**
* Creates menu items from boolean preferences (<code>prefs</code>) and adds
* them to a given parent menu (<code>parent</code>).
*/
private void addToMenu(JMenu parent, BooleanPref... prefs) {
for (BooleanPref pref : prefs) {
Action action = pref.getTitleAction();
Object name = action.getValue(Action.NAME);
menuItem(parent, name + ": " + (pref.get() ? "Yes" : "No"), action);
}
}
Aggregations