private void ensurePresentation() { if (myCurrentHorizontal != myConfiguration.SHORT_DIFF_HORISONTALLY) { final DiffPanel panel = getCurrentPanel(); myPanel.removeAll(); myPanel.add(myTopPanel, BorderLayout.NORTH); myPanel.add(panel.getComponent(), BorderLayout.CENTER); myPanel.revalidate(); myPanel.repaint(); myCurrentHorizontal = myConfiguration.SHORT_DIFF_HORISONTALLY; } }
private void setToComponent(final JComponent cmp, final boolean requestFocus) { myMatchingCountPanel.removeAll(); myMatchingCountPanel.add(cmp, BorderLayout.CENTER); myMatchingCountPanel.revalidate(); myMatchingCountPanel.repaint(); if (requestFocus) { SwingUtilities.invokeLater( new Runnable() { public void run() { myPatternField.getTextField().requestFocusInWindow(); } }); } }
private void updateTextFieldShowing() { myTextFieldAction.update(); myNorthPanel.remove(myPathTextFieldWrapper); if (isToShowTextField()) { final ArrayList<VirtualFile> selection = new ArrayList<VirtualFile>(); if (myFileSystemTree.getSelectedFile() != null) { selection.add(myFileSystemTree.getSelectedFile()); } updatePathFromTree(selection, true); myNorthPanel.add(myPathTextFieldWrapper, BorderLayout.CENTER); } else { setErrorText(null); } myPathTextField.getField().requestFocus(); myNorthPanel.revalidate(); myNorthPanel.repaint(); }