popup.showInScreenCoordinates(component, point);
return popup;
}
private JBPopup createPopup() {
ComponentPopupBuilder popupBuilder = JBPopupFactory.getInstance().createComponentPopupBuilder(mainPanel, valueTextArea);
popupBuilder.setMovable(true);
popupBuilder.setResizable(true);
popupBuilder.setRequestFocus(true);
/*
popupBuilder.setCancelOnMouseOutCallback(new MouseChecker() {
@Override
public boolean check(MouseEvent event) {
return false;
}
});
*/
popupBuilder.setCancelCallback(new Computable<Boolean>() {
@Override
public Boolean compute() {
return !isPinned;
}
});
if (isLargeTextLayout) {
infoLabel.setText(contentInfoText);
//popupBuilder.setAdText(contentInfoText);
//popupBuilder.setTitle("Large value preview");
}
popup = popupBuilder.createPopup();
popup.addListener(new JBPopupAdapter() {
@Override
public void onClosed(LightweightWindowEvent event) {
dispose();
}