@Override @NotNull public NewColorAndFontPanel createPanel(@NotNull ColorAndFontOptions options) { final DiffOptionsPanel optionsPanel = new DiffOptionsPanel(options); SchemesPanel schemesPanel = new SchemesPanel(options); PreviewPanel previewPanel; try { final DiffPreviewPanel diffPreviewPanel = new DiffPreviewPanel(myDisposable); diffPreviewPanel.setMergeRequest(null); schemesPanel.addListener( new ColorAndFontSettingsListener.Abstract() { @Override public void schemeChanged(final Object source) { diffPreviewPanel.setColorScheme(getSelectedScheme()); optionsPanel.updateOptionsList(); diffPreviewPanel.updateView(); } }); previewPanel = diffPreviewPanel; } catch (FilesTooBigForDiffException e) { LOG.info(e); previewPanel = new PreviewPanel.Empty(); } return new NewColorAndFontPanel( schemesPanel, optionsPanel, previewPanel, DIFF_GROUP, null, null); }
private void ensureSchemesPanel() { if (myRootSchemesPanel == null) { myRootSchemesPanel = new SchemesPanel(this); myRootSchemesPanel.addListener( new ColorAndFontSettingsListener.Abstract() { @Override public void schemeChanged(final Object source) { if (!myIsReset) { resetSchemesCombo(source); } } }); } }