Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

Make HTML preview pane detachable

AuthorDaveJarvis <email>
Date2020-10-28 23:17:31 GMT-0700
Commit44851a829fd036fa1d5d1216a7ef9c2cfdbb61a3
Parentc7993f0
Delta15 lines added, 15 lines removed
src/main/java/com/keenwrite/processors/HtmlPreviewProcessor.java
package com.keenwrite.processors;
-import com.keenwrite.preview.HTMLPreviewPane;
+import com.keenwrite.preview.HtmlPreview;
/**
// There is only one preview panel.
- private static HTMLPreviewPane sHtmlPreviewPane;
+ private static HtmlPreview sHtmlPreviewPane;
/**
* Constructs the end of a processing chain.
*
* @param htmlPreviewPane The pane to update with the post-processed document.
*/
- public HtmlPreviewProcessor( final HTMLPreviewPane htmlPreviewPane ) {
+ public HtmlPreviewProcessor( final HtmlPreview htmlPreviewPane ) {
sHtmlPreviewPane = htmlPreviewPane;
}
}
- private HTMLPreviewPane getHtmlPreviewPane() {
+ private HtmlPreview getHtmlPreviewPane() {
return sHtmlPreviewPane;
}
src/main/java/com/keenwrite/processors/ProcessorContext.java
import com.keenwrite.FileEditorTab;
import com.keenwrite.FileType;
-import com.keenwrite.preview.HTMLPreviewPane;
+import com.keenwrite.preview.HtmlPreview;
import com.keenwrite.processors.markdown.CaretPosition;
*/
public class ProcessorContext {
- private final HTMLPreviewPane mPreviewPane;
+ private final HtmlPreview mHtmlPreview;
private final Map<String, String> mResolvedMap;
private final ExportFormat mExportFormat;
* all parameters.
*
- * @param previewPane Where to display the final (HTML) output.
+ * @param htmlPreview Where to display the final (HTML) output.
* @param resolvedMap Fully expanded interpolated strings.
* @param tab Tab containing path to the document to process.
* @param format Indicate configuration options for export format.
*/
public ProcessorContext(
- final HTMLPreviewPane previewPane,
+ final HtmlPreview htmlPreview,
final Map<String, String> resolvedMap,
final FileEditorTab tab,
final ExportFormat format ) {
- assert previewPane != null;
+ assert htmlPreview != null;
assert resolvedMap != null;
assert tab != null;
assert format != null;
- mPreviewPane = previewPane;
+ mHtmlPreview = htmlPreview;
mResolvedMap = resolvedMap;
mTab = tab;
}
- HTMLPreviewPane getPreviewPane() {
- return mPreviewPane;
+ HtmlPreview getPreview() {
+ return mHtmlPreview;
}
src/main/java/com/keenwrite/processors/ProcessorFactory.java
import com.keenwrite.AbstractFileFactory;
-import com.keenwrite.preview.HTMLPreviewPane;
+import com.keenwrite.preview.HtmlPreview;
import com.keenwrite.processors.markdown.MarkdownProcessor;
}
- private HTMLPreviewPane getPreviewPane() {
- return getProcessorContext().getPreviewPane();
+ private HtmlPreview getPreviewPane() {
+ return getProcessorContext().getPreview();
}