Package autotest.common.table.DynamicTable

Examples of autotest.common.table.DynamicTable.DynamicTableListener


    public void initialize() {
        recurringTable = new RecurringTable();
       
        recurringTable.setRowsPerPage(RECURRINGRUN_PER_PAGE);
        recurringTable.setClickable(true);
        recurringTable.addListener(new DynamicTableListener() {
            public void onRowClicked(int rowIndex, JSONObject row, boolean isRightClick) {
                JSONObject job = row.get("job").isObject();
                int jobId = (int) job.get("id").isNumber().doubleValue();
                selectListener.onRecurringSelected(jobId);
            }
View Full Code Here


        availableDecorator.aclFilter.setActive(true);
        availableDecorator.excludeAtomicGroupsFilter.setActive(true);
        availableSelection = availableDecorator.addSelectionManager(false);
        availableDecorator.addSelectionPanel(true);

        availableTable.addListener(new DynamicTableListener() {
            public void onRowClicked(int rowIndex, JSONObject row, boolean isRightClick) {
                availableSelection.toggleSelected(row);
            }

            public void onTableRefreshed() {}
        });

        availableSelection.addListener(new SelectionListener() {
            public void onAdd(Collection<JSONObject> objects) {
                for (JSONObject row : objects) {
                    selectRow(row);
                }
                selectionRefresh();
            }

            public void onRemove(Collection<JSONObject> objects) {
                for (JSONObject row : objects) {
                    deselectRow(row);
                }
                selectionRefresh();
            }

            public void onClick(JSONValue id, String profile) {
                for (JSONObject row : selectedHostData.getItems()) {
                    if (row.get("id").equals(id)) {
                        selectedHostData.removeItem(row);
                        row.put("profile", new JSONString(profile));
                        selectedHostData.addItem(row);
                        break;
                    }
                }
            }
        });

        selectedTable.addListener(new DynamicTableListener() {
            public void onRowClicked(int rowIndex, JSONObject row, boolean isRightClick) {
                if (isMetaEntry(row) || isOneTimeHost(row)) {
                    deselectRow(row);
                    selectionRefresh();
                } else {
View Full Code Here

    public void initialize() {
        super.initialize();

        jobsTable.setRowsPerPage(JOBS_PER_PAGE);
        jobsTable.setClickable(true);
        jobsTable.addListener(new DynamicTableListener() {
            public void onRowClicked(int rowIndex, JSONObject row, boolean isRightClick) {
                if (isJobRow(row)) {
                    JSONObject job = row.get("job").isObject();
                    int jobId = (int) job.get("id").isNumber().doubleValue();
                    hostDetailListener.onJobSelected(jobId);
View Full Code Here

    public void initialize() {
        super.initialize();
        jobTable = new JobTable();
        jobTable.setRowsPerPage(JOBS_PER_PAGE);
        jobTable.setClickable(true);
        jobTable.addListener(new DynamicTableListener() {
            public void onRowClicked(int rowIndex, JSONObject row, boolean isRightClick) {
                int jobId = (int) row.get("id").isNumber().doubleValue();
                selectListener.onJobSelected(jobId);
            }
           
View Full Code Here

        idInput.setVisibleLength(5);

        hostsTable.setRowsPerPage(HOSTS_PER_PAGE);
        hostsTable.setClickable(true);
        hostsTable.addListener(new DynamicTableListener() {
            public void onRowClicked(int rowIndex, JSONObject row, boolean isRightClick) {
                JSONObject host = row.get("host").isObject();
                String hostname = host.get("hostname").isString().stringValue();
                listener.onHostSelected(hostname);
            }
View Full Code Here

        selectionManager = hostTableDecorator.addSelectionManager(false);
        table.setWidgetFactory(selectionManager);
        hostTableDecorator.addTableActionsPanel(this, true);

        table.setClickable(true);
        table.addListener(new DynamicTableListener() {
            public void onRowClicked(int rowIndex, JSONObject row, boolean isRightClick) {
                String hostname = row.get("hostname").isString().stringValue();
                hostListListener.onHostSelected(hostname);
            }
View Full Code Here

TOP

Related Classes of autotest.common.table.DynamicTable.DynamicTableListener

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.