I want disable all the buttons contained in a CommandGroup.
CommandGroup.setEnabled(false)
dont work.
I want disable all the buttons contained in a CommandGroup.
CommandGroup.setEnabled(false)
dont work.
Currently commandGroup.setEnabled(boolean) will disable all group controls that are buttons; for example, a menu or a popup pull down menu. It will not cascade enabled state to all members of the group.
The question is, does this cascade setEnabled make sense, and if so, what should be the contract for the method. Just disable the buttons associated with action command members? I think this would be good, but I don't think it should be default behaivior. The action commands really should know when they should be enabled/disabled themselves.
If I want disable all the commands in the toolbar?
I could do it rewriting setEnabled of CommandGroup
is the unique solution that see becauseCode:public void setEnabled(boolean enabled) { super.setEnabled(enabled); Iterator it = getMemberList().iterator(); while (it.hasNext()) { GroupMember gcm = (GroupMember) it .next(); gcm.setEnabled(enabled); } }
getMemberList() is protected.
Other solution?
THANKS!