(int direction)
| 2008 | //#endif |
| 2009 | |
| 2010 | private int searchGroup(int direction) { |
| 2011 | int newpos = -1; |
| 2012 | synchronized (itemsList) { |
| 2013 | int size = itemsList.size(); |
| 2014 | int pos = cursor; |
| 2015 | int count = size; |
| 2016 | try { |
| 2017 | while (count > 0) { |
| 2018 | pos += direction; |
| 2019 | if (pos < 0) { |
| 2020 | pos = size - 1; |
| 2021 | } |
| 2022 | if (pos >= size) { |
| 2023 | pos = 0; |
| 2024 | } |
| 2025 | if (itemsList.elementAt(pos) instanceof Group) { |
| 2026 | break; |
| 2027 | } |
| 2028 | } |
| 2029 | } catch (Exception e) { |
| 2030 | } |
| 2031 | newpos = pos; |
| 2032 | } |
| 2033 | return newpos; |
| 2034 | } |
| 2035 | |
| 2036 | public void searchActiveContact(int direction) { |
| 2037 | Vector activeContacts = new Vector(); |