本文整理汇总了Java中org.sejda.model.parameter.SimpleSplitParameters.setOutput方法的典型用法代码示例。如果您正苦于以下问题:Java SimpleSplitParameters.setOutput方法的具体用法?Java SimpleSplitParameters.setOutput怎么用?Java SimpleSplitParameters.setOutput使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.sejda.model.parameter.SimpleSplitParameters
的用法示例。
在下文中一共展示了SimpleSplitParameters.setOutput方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: directoryIsEmpty
import org.sejda.model.parameter.SimpleSplitParameters; //导入方法依赖的package包/类
@Test
public void directoryIsEmpty() {
SimpleSplitParameters parameters = new SimpleSplitParameters(PredefinedSetOfPages.ALL_PAGES);
parameters.setExistingOutputPolicy(ExistingOutputPolicy.FAIL);
FileOrDirectoryTaskOutput output = mock(FileOrDirectoryTaskOutput.class);
File file = mock(File.class);
when(file.listFiles()).thenReturn(new File[0]);
when(output.getDestination()).thenReturn(file);
parameters.setOutput(output);
injector.instance(OverwriteDialogController.class).request(new TaskExecutionRequestEvent("id", parameters));
OverwriteConfirmationDialog dialog = injector.instance(OverwriteConfirmationDialog.class);
verify(dialog, never()).title(anyString());
verify(dialog, never()).messageContent(anyString());
verify(dialog, never()).messageTitle(anyString());
verify(dialog, never()).response();
}
示例2: setUpParameters
import org.sejda.model.parameter.SimpleSplitParameters; //导入方法依赖的package包/类
/**
* Set up of the set page labels parameters
*
*/
private void setUpParameters(PredefinedSetOfPages type) {
parameters = new SimpleSplitParameters(type);
parameters.setCompress(true);
parameters.setVersion(PdfVersion.VERSION_1_6);
parameters.setSource(getSource());
parameters.setOverwrite(true);
parameters.setOutput(getOutput());
}
示例3: build
import org.sejda.model.parameter.SimpleSplitParameters; //导入方法依赖的package包/类
@Override
public SimpleSplitParameters build() {
SimpleSplitParameters params = new SimpleSplitParameters(pages);
params.setCompress(isCompress());
params.setExistingOutputPolicy(existingOutput());
params.setVersion(getVersion());
params.setOutput(getOutput());
params.setOutputPrefix(getPrefix());
params.addSource(getSource());
params.setOptimizationPolicy(getOptimizationPolicy());
params.discardOutline(isDiscardBookmarks());
return params;
}
示例4: cancelOnNotEmptyDir
import org.sejda.model.parameter.SimpleSplitParameters; //导入方法依赖的package包/类
@Test
public void cancelOnNotEmptyDir() throws IOException {
SimpleSplitParameters parameters = new SimpleSplitParameters(PredefinedSetOfPages.ALL_PAGES);
parameters.setExistingOutputPolicy(ExistingOutputPolicy.FAIL);
folder.newFile();
parameters.setOutput(FileOrDirectoryTaskOutput.directory(folder.getRoot()));
Button button = find("show");
button.setOnAction(a -> eventStudio().broadcast(new TaskExecutionRequestEvent("id", parameters)));
click("show");
click(DefaultI18nContext.getInstance().i18n("Cancel"));
assertEquals(ExistingOutputPolicy.FAIL, parameters.getExistingOutputPolicy());
}
示例5: overwriteOnNotEmptyDir
import org.sejda.model.parameter.SimpleSplitParameters; //导入方法依赖的package包/类
@Test
public void overwriteOnNotEmptyDir() throws IOException {
SimpleSplitParameters parameters = new SimpleSplitParameters(PredefinedSetOfPages.ALL_PAGES);
parameters.setExistingOutputPolicy(ExistingOutputPolicy.FAIL);
folder.newFile();
parameters.setOutput(FileOrDirectoryTaskOutput.directory(folder.getRoot()));
Button button = find("show");
button.setOnAction(a -> eventStudio().broadcast(new TaskExecutionRequestEvent("id", parameters)));
click("show");
click(DefaultI18nContext.getInstance().i18n("Overwrite"));
assertEquals(ExistingOutputPolicy.OVERWRITE, parameters.getExistingOutputPolicy());
}