Package org.cafesip.gwtcomp.client.ui

Examples of org.cafesip.gwtcomp.client.ui.PopupMenu


        });
    }

    private PopupMenu createConnectorsContextMenu()
    {
        PopupMenu menu = new PopupMenu();

        HTML refresh = new HTML(HTMLHelper.imageWithText(GWT.getModuleBaseURL()
                + "gwtcomp-icons/reload.png", "Refresh"));
        ClickListener listener = new ConnectorOperationListener(
                ConnectorOperationListener.CONNECTORS_REFRESH);
        refresh
                .addClickListener(new TreeContextMenuItemListener(menu,
                        listener));
        menu.addMenuItem(refresh);

        menu.addSeparator();

        HTML list = new HTML(HTMLHelper.imageWithText(GWT.getModuleBaseURL()
                + "gwtcomp-icons/view_tree.png", "List Connectors")); // icon?
        listener = new ConnectorOperationListener(
                ConnectorOperationListener.CONNECTORS_LIST);
        list.addClickListener(new TreeContextMenuItemListener(menu, listener));
        menu.addMenuItem(list);

        return menu;
    }
View Full Code Here


        return menu;
    }

    private PopupMenu createContextsContextMenu()
    {
        PopupMenu menu = new PopupMenu();

        HTML refresh = new HTML(HTMLHelper.imageWithText(GWT.getModuleBaseURL()
                + "gwtcomp-icons/reload.png", "Refresh"));
        ClickListener listener = new ContextOperationListener(
                ContextOperationListener.CONTEXTS_REFRESH);
        refresh
                .addClickListener(new TreeContextMenuItemListener(menu,
                        listener));
        menu.addMenuItem(refresh);

        HTML list = new HTML(HTMLHelper.imageWithText(GWT.getModuleBaseURL()
                + "gwtcomp-icons/view_tree.png", "List Contexts"));
        listener = new ContextOperationListener(
                ContextOperationListener.CONTEXTS_LIST);
        list.addClickListener(new TreeContextMenuItemListener(menu, listener));
        menu.addMenuItem(list);

        HTML create = new HTML(HTMLHelper.imageWithText(GWT.getModuleBaseURL()
                + "gwtcomp-icons/edit_add.png", "Add a Context"));
        listener = new ContextOperationListener(
                ContextOperationListener.CONTEXT_ADD);
        create
                .addClickListener(new TreeContextMenuItemListener(menu,
                        listener));
        menu.addMenuItem(create);

        return menu;
    }
View Full Code Here

    }

    private PopupMenu createContextContextMenu(String contextName,
            SuperTreeItem contextItem)
    {
        PopupMenu menu = new PopupMenu();

        HTML refresh = new HTML(HTMLHelper.imageWithText(GWT.getModuleBaseURL()
                + "gwtcomp-icons/reload.png", "Refresh"));
        ClickListener listener = new ContextOperationListener(
                ContextOperationListener.CONTEXT_JIPLETS_REFRESH, contextName,
                contextItem);
        refresh
                .addClickListener(new TreeContextMenuItemListener(menu,
                        listener));
        menu.addMenuItem(refresh);

        HTML view = new HTML(HTMLHelper.imageWithText(GWT.getModuleBaseURL()
                + "gwtcomp-icons/view_detailed.png", "View Properties"));
        listener = new ContextOperationListener(
                ContextOperationListener.CONTEXT_VIEW_PROPERTIES, contextName);
        view.addClickListener(new TreeContextMenuItemListener(menu, listener));
        menu.addMenuItem(view);

        HTML delete = new HTML(HTMLHelper.imageWithText(GWT.getModuleBaseURL()
                + "gwtcomp-icons/editdelete.png", "Remove the Context"));
        listener = new ContextOperationListener(
                ContextOperationListener.CONTEXT_DELETE, contextName);
        delete
                .addClickListener(new TreeContextMenuItemListener(menu,
                        listener));
        menu.addMenuItem(delete);

        return menu;
    }
View Full Code Here

        return menu;
    }

    private PopupMenu createRealmsContextMenu()
    {
        PopupMenu menu = new PopupMenu();

        HTML refresh = new HTML(HTMLHelper.imageWithText(GWT.getModuleBaseURL()
                + "gwtcomp-icons/reload.png", "Refresh"));
        ClickListener listener = new RealmOperationListener(
                RealmOperationListener.REALMS_REFRESH);
        refresh
                .addClickListener(new TreeContextMenuItemListener(menu,
                        listener));
        menu.addMenuItem(refresh);

        menu.addSeparator();

        HTML list = new HTML(HTMLHelper.imageWithText(GWT.getModuleBaseURL()
                + "gwtcomp-icons/view_tree.png", "List Realms")); // icon?
        listener = new RealmOperationListener(
                RealmOperationListener.REALMS_LIST);
        list.addClickListener(new TreeContextMenuItemListener(menu, listener));
        menu.addMenuItem(list);

        HTML create = new HTML(HTMLHelper.imageWithText(GWT.getModuleBaseURL()
                + "gwtcomp-icons/edit_add.png", "Add a Realm"));
        listener = new RealmOperationListener(RealmOperationListener.REALM_ADD);
        create
                .addClickListener(new TreeContextMenuItemListener(menu,
                        listener));
        menu.addMenuItem(create);

        return menu;
    }
View Full Code Here

        return menu;
    }

    private PopupMenu createRealmContextMenu(String realm)
    {
        PopupMenu menu = new PopupMenu();

        HTML view = new HTML(HTMLHelper.imageWithText(GWT.getModuleBaseURL()
                + "gwtcomp-icons/view_detailed.png", "View Properties"));
        ClickListener listener = new RealmOperationListener(
                RealmOperationListener.REALM_VIEW_PROPERTIES, realm);
        view.addClickListener(new TreeContextMenuItemListener(menu, listener));
        menu.addMenuItem(view);

        HTML manage = new HTML(HTMLHelper.imageWithText(GWT.getModuleBaseURL()
                + "gwtcomp-icons/kuser.png", "Manage Users"));
        listener = new RealmOperationListener(
                RealmOperationListener.REALM_USER_MANAGE, realm);
        manage
                .addClickListener(new TreeContextMenuItemListener(menu,
                        listener));
        menu.addMenuItem(manage);

        HTML delete = new HTML(HTMLHelper.imageWithText(GWT.getModuleBaseURL()
                + "gwtcomp-icons/editdelete.png", "Remove the Realm"));
        listener = new RealmOperationListener(
                RealmOperationListener.REALM_DELETE, realm);
        delete
                .addClickListener(new TreeContextMenuItemListener(menu,
                        listener));
        menu.addMenuItem(delete);

        return menu;
    }
View Full Code Here

TOP

Related Classes of org.cafesip.gwtcomp.client.ui.PopupMenu

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.