Java Code Examples for com.intellij.openapi.ui.FrameWrapper#setComponent()

The following examples show how to use com.intellij.openapi.ui.FrameWrapper#setComponent() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DiffUtil.java    From consulo with Apache License 2.0 5 votes vote down vote up
public static void initDiffFrame(Project project, @Nonnull FrameWrapper frameWrapper, @Nonnull final DiffViewer diffPanel, final JComponent mainComponent) {
  frameWrapper.setComponent(mainComponent);
  frameWrapper.setProject(project);
  frameWrapper.setImage(ImageLoader.loadFromResource("/diff/Diff.png"));
  frameWrapper.setPreferredFocusedComponent(diffPanel.getPreferredFocusedComponent());
  frameWrapper.closeOnEsc();
}
 
Example 2
Source File: MergeTool.java    From consulo with Apache License 2.0 5 votes vote down vote up
public void show(DiffRequest data) {
  if (data instanceof MergeRequestImpl) {
    showDialog((MergeRequestImpl)data);
    return;
  }
  FrameWrapper frameWrapper = new FrameWrapper(data.getProject(), data.getGroupKey());
  DiffViewer mergePanel = createMergeComponent(data, null, frameWrapper);
  frameWrapper.setComponent(mergePanel.getComponent());
  frameWrapper.setPreferredFocusedComponent(mergePanel.getPreferredFocusedComponent());
  frameWrapper.closeOnEsc();
  frameWrapper.setTitle(data.getWindowTitle());
  frameWrapper.setProject(data.getProject());
  frameWrapper.show();
}