Package org.wiztools.restclient.ui.component

Examples of org.wiztools.restclient.ui.component.BodyPopupMenu


            @Override
            public void onMessage(String msg) {
                view.setStatusMessage(msg);
            }
        };
        final BodyPopupMenu bpm = new BodyPopupMenu(se_response, listener, true);
        this.bodyPopupMenu = bpm;
       
        // Attach popup menu
        if (se_response.getEditorComponent() instanceof RSyntaxTextArea) {
            se_response.getEditorComponent().addMouseListener(new MouseAdapter() {
                @Override
                public void mousePressed(MouseEvent e) {
                    showPopup(e);
                }

                @Override
                public void mouseReleased(MouseEvent e) {
                    showPopup(e);
                }
                private void showPopup(final MouseEvent e) {
                    if("".equals(se_response.getText().trim())){
                        // No response body
                        return;
                    }
                    if (e.isPopupTrigger()) {
                        bpm.show(e.getComponent(), e.getX(), e.getY());
                    }
                }
            });
        }
       
View Full Code Here


            @Override
            public void onMessage(String msg) {
                view.setStatusMessage(msg);
            }
        };
        final BodyPopupMenu bpm = new BodyPopupMenu(se_req_body, listener, false);
        se_req_body.setPopupMenu(bpm);
       
        /*
         * Following code is written becuase of what seems to be a bug in
         * RSyntaxTextArea module: what happens is every time the popup
         * is displayed, the control is disabled by default. The following
         * code enables it.
         */
        se_req_body.getEditorComponent().addMouseListener(new MouseAdapter() {
            private void eEnable() {
                if(se_req_body.getEditorComponent().isEnabled()) {
                    Component[] components = bpm.getComponents();
                    for(Component c: components) {
                        if(!c.isEnabled()) {
                            c.setEnabled(true);
                        }
                    }
View Full Code Here

TOP

Related Classes of org.wiztools.restclient.ui.component.BodyPopupMenu

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.