Package org.apache.pivot.wtk.content

Examples of org.apache.pivot.wtk.content.ListItem


            for (int i = 0; i < array.length(); i++) {
                String type = array.getJSONObject(i).getString("id");
                if (type.contains(".")) {
                    String mainType = type.substring(0, type.indexOf("."));
                    String subType = type.substring(type.indexOf(".") + 1);
                    ListItem mainItem = new ListItem(mainType);
                    mainItem.setUserData(mainType);
                    typeSet.add(mainItem);
                    ListItem subItem = new ListItem(subType.substring(0, 1).toUpperCase() + subType.substring(1));
                    subItem.setUserData(type);
                    typeSet.add(subItem);
                } else {
                    ListItem item = new ListItem(type);
                    item.setUserData(type);
                    typeSet.add(item);
                }
            }
            List<ListItem> typeList = new ArrayList(typeSet.toArray());
            list1Button.setListData(typeList);
View Full Code Here


        // Build list of search criteras based on selected items
        List<String> searchCriterias = new ArrayList<String>();
        for (ListButton button : previousButtons) {
            if (button.getSelectedIndex() >= 0) {
                ListItem selectedItem = (ListItem) button.getSelectedItem();
                String criteriaType = selectedItem.getUserData().toString();
                TableView tableView = viewMap.get(button);
                if (tableView.getSelectedIndex() >= 0) {
                    TableViewItem selectedViewItem = (TableViewItem) tableView.getTableData().get(tableView.getSelectedIndex());
                    if (selectedViewItem.getId() != null) {
                        searchCriterias.add(criteriaType + ":" + selectedViewItem.getId());
View Full Code Here

TOP

Related Classes of org.apache.pivot.wtk.content.ListItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.