Create new ButtonGroup class that implements org.apache.pivot.collections.Group 
and Iterable<Button>
----------------------------------------------------------------------------------------------------

                 Key: PIVOT-292
                 URL: https://issues.apache.org/jira/browse/PIVOT-292
             Project: Pivot
          Issue Type: Improvement
          Components: wtk
            Reporter: Greg Brown
            Priority: Minor
             Fix For: 1.3.1


Move Button.Group out into its own top-level class that implements 
org.apache.pivot.collections.Group. Currently, there is no way to enumerate a 
group's contents, and it seems like there should be (Swing's ButtonGroup class 
does support this).

We'd end up with something along these lines:

ButtonGroup : Group, Iterable<Button> {
   add(Button):void
   remove(Button):boolean

   getSelection():Button
   setSelection(Button):void
}

ButtonGroupListener {
   selectionChanged(previousSelection:Button):void
}

Button {
   ...

   getGroup():ButtonGroup
   setGroup(ButtonGroup):void
}

ButtonGroup#add() and remove() would call Button#setGroup(), and vice versa. 
Similarly, ButtonGroup#setSelection() would call Button#setSelected(), and vice 
versa. We'd also move the named group dictionary to ButtonGroup.

As part of this change, the existing Button.Group class would be deprecated and 
slated for removal in Pivot 1.4.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to