Package com.intellij.ui.awt

Examples of com.intellij.ui.awt.RelativePoint


        BalloonBuilder balloonBuilder = JBPopupFactory.getInstance().createHtmlTextBalloonBuilder(message, MessageType.ERROR, null);
        final Balloon balloon = balloonBuilder.setFadeoutTime(TimeUnit.SECONDS.toMillis(1)).createBalloon();
        GuiUtil.runInSwingThread(new Runnable() {
            @Override
            public void run() {
                balloon.show(new RelativePoint(JenkinsWidget.getInstance(project).getComponent(), new Point(0, 0)), Balloon.Position.above);
            }
        });
    }
View Full Code Here


                        }
                    })
                    .createPopup();

            if (e != null) {
                popup.show(new RelativePoint(e));
            } else {
                final Dimension dimension = popup.getContent().getPreferredSize();
                final Point at = new Point(-dimension.width / 2, -dimension.height);
                popup.show(new RelativePoint(myLabel, at));
            }
        }
View Full Code Here

          }
        }
      }).
      createPopup();

    popup.show(new RelativePoint(e));
  }
View Full Code Here

                        String toolTipText = rulesToolTipMap.get(ruleLabel.getRuleKey());
                        if (toolTipText != null) {
                            Balloon popup = JBPopupFactory.getInstance().createHtmlTextBalloonBuilder(toolTipText, MessageType.INFO, null)
                                    .createBalloon();
                            JComponent component = toolWindow.getComponent();
                            popup.show(new RelativePoint(component, new Point()), Balloon.Position.above);
                            return;
                        }
                    }
                    Balloon popup = JBPopupFactory.getInstance()
                            .createHtmlTextBalloonBuilder("<p>Can't show description</p><p>Check your sonar project configuration</p>", MessageType.WARNING, null)
                            .createBalloon();
                    JComponent component = toolWindow.getComponent();
                    popup.show(new RelativePoint(component, new Point()), Balloon.Position.above);
                    downloadRules();
                }
            }
        }
View Full Code Here

        public void navigate(MouseEvent e, PsiElement elt) {
            List<GotoRelatedItem>  items = this.items;
            if (items.size() == 1) {
                items.get(0).navigate();
            } else {
                NavigationUtil.getRelatedItemsPopup(items, "Go to Related Files").show(new RelativePoint(e));
            }

        }
View Full Code Here

    if (frame == null) return;
    final JComponent component = frame.getRootPane();
    if (component == null) return;
    final Rectangle rect = component.getVisibleRect();
    final Point p = new Point(rect.x + rect.width - 10, rect.y + 20);
    final RelativePoint point = new RelativePoint(component, p);

    final BalloonBuilder balloonBuilder = JBPopupFactory.getInstance().
        createHtmlTextBalloonBuilder(message, MessageType.INFO.getDefaultIcon(),
                                     MessageType.INFO.getPopupBackground(), null);
    balloonBuilder.setShowCallout(false).setCloseButtonEnabled(true)
View Full Code Here

            @Override
            public void run() {
                JBPopupFactory.getInstance().createBalloonBuilder(new JLabel(message))
                        .setFillColor(info.getPopupBackground())
                        .createBalloon()
                        .show(new RelativePoint(MongoResultPanel.this.resultTreePanel, new Point(0, 0)), Balloon.Position.above);
            }
        });
    }
View Full Code Here

        nonOpaquePanel.add(new JLabel(MessageType.ERROR.getDefaultIcon()), BorderLayout.WEST);

        JBPopupFactory.getInstance().createBalloonBuilder(nonOpaquePanel)
                .setFillColor(MessageType.ERROR.getPopupBackground())
                .createBalloon()
                .show(new RelativePoint(this.editor.getComponent(), new Point(0, 0)), Balloon.Position.above);
    }
View Full Code Here

        return clone;
    }

    public RelativePoint guessBestLocation(Editor editor) {
        VisualPosition logicalPosition = editor.getCaretModel().getVisualPosition();
        RelativePoint pointFromVisualPosition = getPointFromVisualPosition(editor, logicalPosition);
        pointFromVisualPosition.getOriginalPoint().translate(-4, -searchBox.getHeight() - editor.getLineHeight() + 2);
        return pointFromVisualPosition;
    }
View Full Code Here

        return pointFromVisualPosition;
    }

    protected RelativePoint getPointFromVisualPosition(Editor editor, VisualPosition logicalPosition) {
        Point p = editor.visualPositionToXY(new VisualPosition(logicalPosition.line + 1, logicalPosition.column));
        return new RelativePoint(editor.getContentComponent(), p);
    }
View Full Code Here

TOP

Related Classes of com.intellij.ui.awt.RelativePoint

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.