Package org.apache.pivot.collections

Examples of org.apache.pivot.collections.ArrayList


                    ListItem item = new ListItem(type);
                    item.setUserData(type);
                    typeSet.add(item);
                }
            }
            List<ListItem> typeList = new ArrayList(typeSet.toArray());
            list1Button.setListData(typeList);
            list2Button.setListData(typeList);
            list3Button.setListData(typeList);

            int genreIndex = -1;
            int artistIndex = -1;
            int releaseIndex = -1;
            for (int i = 0; i < typeList.getLength(); i++) {
                if (typeList.get(i).getText().equals("Genre")) {
                    genreIndex = i;
                } else if (typeList.get(i).getText().equals("Release")) {
                    releaseIndex = i;
                } else if (typeList.get(i).getText().equals("Artist")) {
                    artistIndex = i;
                }
            }
            list1Button.getListButtonSelectionListeners().add(new ListButtonSelectionListener.Adapter() {
                public void selectedIndexChanged(ListButton listButton, int i) {
View Full Code Here


        super.open(display, owner);

        try {

            JSONArray array = Client.create().resource(HOSTURL + "/configurations").accept(MediaType.APPLICATION_JSON).get(JSONArray.class);
            List<TableViewItem> configurations = new ArrayList();
            for (int i = 0; i < array.length(); i++) {
                String name = array.getJSONObject(i).getString("id");
                String type = array.getJSONObject(i).getString("type");
                String value = array.getJSONObject(i).getString("value");
                TableViewItem item = new TableViewItem(name, type, value);
                configurations.add(item);
            }
            preferencesTableView.setTableData(configurations);
            preferencesTableView.getTableViewRowListeners().add(new TableViewRowListener.Adapter() {
                @Override
                public void rowUpdated(TableView tableView, int index) {
View Full Code Here

        } catch (SerializationException exception) {
            throw new RuntimeException(exception);
        }

        // Create the delete confirmation prompt
        ArrayList<String> options = new ArrayList(resources.get("cancel"), resources.get("ok"));
        deleteConfirmationPrompt = new Prompt(MessageType.QUESTION, (String)resources.get("confirmDelete"),
            options);

        // Attach event listeners
        expenseTableView.getTableViewSelectionListeners().add(new TableViewSelectionListener.Adapter() {
View Full Code Here

        } catch (SerializationException exception) {
            throw new RuntimeException(exception);
        }

        // Create the delete confirmation prompt
        ArrayList<String> options = new ArrayList(resources.getString("cancel"),
            resources.getString("ok"));
        deleteConfirmationPrompt = new Prompt(MessageType.QUESTION, resources.getString("confirmDelete"),
            options);

        // Attach event listener(s)
View Full Code Here

        } catch (SerializationException exception) {
            throw new RuntimeException(exception);
        }

        // Create the delete confirmation prompt
        ArrayList<String> options = new ArrayList(resources.getString("cancel"),
            resources.getString("ok"));
        deleteConfirmationPrompt = new Prompt(MessageType.QUESTION, resources.getString("confirmDelete"),
            options);

        // Attach event listener(s)
View Full Code Here

TOP

Related Classes of org.apache.pivot.collections.ArrayList

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.