Empyreus / lanterna

Automatically exported from code.google.com/p/lanterna
GNU Lesser General Public License v3.0
0 stars 0 forks source link

AbstractListBox methods low access level #126

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I was trying to use RadioBoxList control from gui2 package but was unable to 
invoke addItem() and getItems(). I believe making these methods public in 
AbstractListBox would give more flexibility in usage.

Original issue reported on code.google.com by dharmara...@gmail.com on 3 Mar 2015 at 3:20

GoogleCodeExporter commented 9 years ago
Yes, addItem() should have been public. getItems() is still package private 
since it's not supposed to be accessible from the outside (it exposes internal 
state) but I've added a method that returns a copy of the internal array and 
exposes it as an Iterable so you can use it in for-each loops.

Original comment by mab...@gmail.com on 8 Mar 2015 at 5:18