Felipe Aumann
unread,Sep 16, 2021, 12:41:31 AM9/16/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ControlsFX
As far as I can tell, the only way populate an ActionGroup is hard coding every item in it:
private Collection<? extends Action> action = Arrays.asList(
new ActionGroup("Group 1",
new DummyAction("Action 1")),
new DummyAction("Action 2"),
new DummyAction("Action 3"))
);
private static class DummyAction extends Action{
public DummyAction(String name){
super(name);
}
}
}
It would be great if I could place items from a List into an ActionGroup, something like that:
List<String> list = new ArrayList<>();
list.add("Action1");
list.add("Action2");
list.add("Action3");
private Collection<? extends Action> action = Arrays.asList(
new ActionGroup("Group 1", new DummyAction(list)));
There are no resources suggesting whether it is possible or not, at least I couldn't find it in any forum or even in the FXSampler project (which has all ControlsFX content samples).
Any thoughts?