use of javafx.scene.control.CheckMenuItem in project FXGL by AlmasB.
the class DeveloperMenuBarController method onShowBBox.
public void onShowBBox(ActionEvent event) {
CheckMenuItem item = (CheckMenuItem) event.getSource();
FXGL.setProperty("dev.showbbox", item.isSelected());
app.getGameWorld().getEntitiesByComponent(ViewComponent.class).forEach(e -> {
e.getComponent(ViewComponent.class).turnOnDebugBBox(item.isSelected());
});
}
use of javafx.scene.control.CheckMenuItem in project jvarkit by lindenb.
the class BamStage method makeFlagPredicate.
/**
* build a Predicate for filtering on SAM FLAG using the checkboxes
*/
private Predicate<SAMRecord> makeFlagPredicate() {
java.util.function.Predicate<SAMRecord> recFilter = x -> true;
for (final SAMFlag flag : this.flag2filterInMenuItem.keySet()) {
CheckMenuItem cbox = this.flag2filterInMenuItem.get(flag);
if (!cbox.isSelected())
continue;
recFilter = recFilter.and(R -> flag.isSet(R.getFlags()));
}
for (final SAMFlag flag : this.flag2filterOutMenuItem.keySet()) {
CheckMenuItem cbox = this.flag2filterOutMenuItem.get(flag);
if (!cbox.isSelected())
continue;
recFilter = recFilter.and(R -> !flag.isSet(R.getFlags()));
}
return recFilter;
}
Aggregations