ParameterInfoComponent( Object[] objects, Editor editor, @NotNull ParameterInfoHandler handler, boolean requestFocus) { super(new BorderLayout()); myRequestFocus = requestFocus; if (!ApplicationManager.getApplication().isUnitTestMode()) { JComponent editorComponent = editor.getComponent(); JLayeredPane layeredPane = editorComponent.getRootPane().getLayeredPane(); myWidthLimit = layeredPane.getWidth(); } NORMAL_FONT = UIUtil.getLabelFont(); BOLD_FONT = NORMAL_FONT.deriveFont(Font.BOLD); myObjects = objects; setBackground(BACKGROUND_COLOR); myHandler = handler; myPanels = new OneElementComponent[myObjects.length]; final JPanel panel = new JPanel(new GridBagLayout()); for (int i = 0; i < myObjects.length; i++) { myPanels[i] = new OneElementComponent(); panel.add( myPanels[i], new GridBagConstraints( 0, i, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); } if (myRequestFocus) { AccessibleContextUtil.setName( this, "Parameter Info. Press TAB to navigate through each element. Press ESC to close."); } final JScrollPane pane = ScrollPaneFactory.createScrollPane(panel); pane.setBorder(null); pane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); add(pane, BorderLayout.CENTER); myCurrentParameterIndex = -1; }