public CompilePdfPreferencesPane(UIPrefs prefs,
PreferencesDialogResources res)
{
prefs_ = prefs;
res_ = res;
PreferencesDialogBaseResources baseRes = PreferencesDialogBaseResources.INSTANCE;
Label programDefaultsLabel = new Label(
"Program defaults (when not in a project)");
programDefaultsLabel.addStyleName(baseRes.styles().headerLabel());
nudgeRight(programDefaultsLabel);
add(programDefaultsLabel);
defaultSweaveEngine_ = new RnwWeaveSelectWidget();
defaultSweaveEngine_.setValue(
prefs.defaultSweaveEngine().getGlobalValue());
add(defaultSweaveEngine_);
defaultLatexProgram_ = new LatexProgramSelectWidget();
defaultLatexProgram_.setValue(
prefs.defaultLatexProgram().getGlobalValue());
add(defaultLatexProgram_);
Label perProjectLabel = new Label(
"NOTE: The Rnw weave and LaTeX compilation options are also set on a " +
"per-project (and optionally per-file) basis. Click the help " +
"icons above for more details.");
perProjectLabel.addStyleName(baseRes.styles().infoLabel());
nudgeRight(perProjectLabel);
spaced(perProjectLabel);
add(perProjectLabel);
Label compilationOptionsLabel = new Label("LaTeX editing and compilation");
compilationOptionsLabel.addStyleName(baseRes.styles().headerLabel());
nudgeRight(compilationOptionsLabel);
add(compilationOptionsLabel);
chkCleanTexi2DviOutput_ = new CheckBox(
"Clean auxiliary output after compile");
spaced(chkCleanTexi2DviOutput_);
add(chkCleanTexi2DviOutput_);
chkEnableShellEscape_ = new CheckBox("Enable shell escape commands");
spaced(chkEnableShellEscape_);
add(chkEnableShellEscape_);
CheckBox chkNumberedSections = checkboxPref(
"Insert numbered sections and subsections",
prefs_.insertNumberedLatexSections());
spaced(chkNumberedSections);
add(chkNumberedSections);
Label previwingOptionsLabel = new Label("PDF preview");
previwingOptionsLabel.addStyleName(baseRes.styles().headerLabel());
previwingOptionsLabel.getElement().getStyle().setMarginTop(8, Unit.PX);
nudgeRight(previwingOptionsLabel);
add(previwingOptionsLabel);
pdfPreview_ = new PdfPreviewSelectWidget();