Example usage for com.intellij.openapi.ui.popup ComponentPopupBuilder setResizable

List of usage examples for com.intellij.openapi.ui.popup ComponentPopupBuilder setResizable

Introduction

In this page you can find the example usage for com.intellij.openapi.ui.popup ComponentPopupBuilder setResizable.

Prototype

@NotNull
    ComponentPopupBuilder setResizable(boolean forceResizable);

Source Link

Usage

From source file:com.intellij.xdebugger.impl.ui.DebuggerUIUtil.java

License:Apache License

public static JBPopup createValuePopup(Project project, JComponent component,
        @Nullable final FullValueEvaluationCallbackImpl callback) {
    ComponentPopupBuilder builder = JBPopupFactory.getInstance().createComponentPopupBuilder(component, null);
    builder.setResizable(true).setMovable(true)
            .setDimensionServiceKey(project, FULL_VALUE_POPUP_DIMENSION_KEY, false).setRequestFocus(false);
    if (callback != null) {
        builder.setCancelCallback(new Computable<Boolean>() {
            @Override/* w  ww  .  j a  v a2 s  .  com*/
            public Boolean compute() {
                callback.setObsolete();
                return true;
            }
        });
    }
    return builder.createPopup();
}

From source file:com.urswolfer.intellij.plugin.gerrit.ui.diff.CommentBalloonBuilder.java

License:Apache License

public JBPopup getNewCommentBalloon(final CommentForm balloonContent, @NotNull final String title) {
    final ComponentPopupBuilder builder = jbPopupFactory.createComponentPopupBuilder(balloonContent,
            balloonContent);//  www .  j  a  v a2s. co m
    builder.setAdText("Hit Ctrl+Enter to create comment. It will be published once you post your review.");
    builder.setTitle(title);
    builder.setResizable(true);
    builder.setMovable(true);
    builder.setRequestFocus(true);
    builder.setCancelOnClickOutside(false);
    builder.setCancelOnWindowDeactivation(false);
    return builder.createPopup();
}