Package com.intellij.openapi.ui.popup

Examples of com.intellij.openapi.ui.popup.JBPopup.addListener()


        Dimension dimension = EditorUtil.calculatePreferredSize(viewer);
        //Dimension dimension = ((EditorImpl) viewer).getPreferredSize();
        dimension.setSize(Math.min(dimension.getWidth() + 20, 1000), Math.min(dimension.getHeight() + 70, 800) );
        popup.setSize(dimension);

        popup.addListener(new JBPopupAdapter() {
            @Override
            public void onClosed(LightweightWindowEvent event) {
                dispose();
            }
        });
View Full Code Here


      public void actionPerformed(ActionEvent e) {
        final JTextField content = new JTextField();
        content.setText(displayedSettings.getName());
        JBPopup balloon = PopupFactoryImpl.getInstance().createComponentPopupBuilder(content, content).createPopup();
        balloon.setMinimumSize(new Dimension(200, 20));
        balloon.addListener(new JBPopupListener() {
          @Override
          public void beforeShown(LightweightWindowEvent event) {
          }

          @Override
View Full Code Here

    private void addVersionedComment(final Project project) {
        if (editor == null || filePath == null) return;

        final CommentForm commentForm = new CommentForm(project, editor, filePath, commentSide, commentToEdit);
        final JBPopup balloon = commentBalloonBuilder.getNewCommentBalloon(commentForm, "Comment");
        balloon.addListener(new JBPopupAdapter() {
            @Override
            public void onClosed(LightweightWindowEvent event) {
                DraftInput comment = commentForm.getComment();
                if (comment != null) {
                    handleComment(comment, project);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.