当前位置: 首页>>代码示例>>Java>>正文


Java Builder类代码示例

本文整理汇总了Java中org.apache.commons.lang3.builder.Builder的典型用法代码示例。如果您正苦于以下问题:Java Builder类的具体用法?Java Builder怎么用?Java Builder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Builder类属于org.apache.commons.lang3.builder包,在下文中一共展示了Builder类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initModuleSettingsPanel

import org.apache.commons.lang3.builder.Builder; //导入依赖的package包/类
protected final void initModuleSettingsPanel(VBox panel) {
    panel.getStyleClass().addAll(Style.DEAULT_CONTAINER.css());
    panel.getStyleClass().addAll(Style.MODULE_CONTAINER.css());
    panel.getChildren().add(footer);

    footer.runButton().setOnAction(event -> {
        ErrorTracker errorTracker = new ErrorTracker();
        Builder<? extends AbstractParameters> builder = getBuilder(errorTracker
                .andThen(s -> eventStudio().broadcast(new AddNotificationRequestEvent(NotificationType.ERROR, s,
                        DefaultI18nContext.getInstance().i18n("Invalid parameters")))));
        if (!errorTracker.errorOnBuild) {
            eventStudio().broadcast(new TaskExecutionRequestEvent(id(), builder.build()));
        }
    });
    modulePanel.setCenter(panel);
    eventStudio().addAnnotatedListeners(this);
}
 
开发者ID:torakiki,项目名称:pdfsam,代码行数:18,代码来源:BaseTaskExecutionModule.java

示例2: onCreateDialog

import org.apache.commons.lang3.builder.Builder; //导入依赖的package包/类
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
	final int resTitleId = getArguments().getInt(PARAM_RESOURCE_TITLE);
	final int resTextId = getArguments().getInt(PARAM_RESOURCE_TEXT);
	final String additionalMessage = getArguments().getString(PARAM_ADDITIONAL_MESSAGE);
	final Intent intent = getArguments().getParcelable(PARAM_INTENT);

	MaterialDialog.Builder builder = new MaterialDialog.Builder(getActivity())
					.title(resTitleId)
					.positiveText(R.string.button_ok);

	if (resTextId != 0) {
		builder.content(getString(resTextId, StringUtils.defaultString(additionalMessage)));
	} else {
		builder.content(StringUtils.defaultString(additionalMessage));
	}

	builder.callback(new MaterialDialog.ButtonCallback() {
		@Override
		public void onPositive(MaterialDialog dialog) {
			if (intent != null) {
				getActivity().startActivity(intent);
			}
			getActivity().finish();
		}
	});

	return builder.build();
}
 
开发者ID:arcao,项目名称:Trackables,代码行数:31,代码来源:ErrorActivity.java

示例3: getBuilder

import org.apache.commons.lang3.builder.Builder; //导入依赖的package包/类
@Override
protected Builder<SplitBySizeParameters> getBuilder(Consumer<String> onError) {
    SplitBySizeParametersBuilder builder = new SplitBySizeParametersBuilder();
    splitOptions.apply(builder, onError);
    selectionPane.apply(builder, onError);
    destinationDirectoryField.apply(builder, onError);
    destinationPane.apply(builder, onError);
    prefix.apply(builder, onError);
    return builder;
}
 
开发者ID:torakiki,项目名称:pdfsam,代码行数:11,代码来源:SplitBySizeModule.java

示例4: getBuilder

import org.apache.commons.lang3.builder.Builder; //导入依赖的package包/类
@Override
protected Builder<SplitByOutlineLevelParameters> getBuilder(Consumer<String> onError) {
    SplitByOutlineLevelParametersBuilder builder = new SplitByOutlineLevelParametersBuilder();
    splitOptions.apply(builder, onError);
    selectionPane.apply(builder, onError);
    destinationDirectoryField.apply(builder, onError);
    destinationPane.apply(builder, onError);
    prefix.apply(builder, onError);
    return builder;
}
 
开发者ID:torakiki,项目名称:pdfsam,代码行数:11,代码来源:SplitByBookmarksModule.java

示例5: getBuilder

import org.apache.commons.lang3.builder.Builder; //导入依赖的package包/类
@Override
protected Builder<? extends AbstractSplitByPageParameters> getBuilder(Consumer<String> onError) {
    Optional<SinglePdfSourceMultipleOutputParametersBuilder<? extends AbstractSplitByPageParameters>> builder = Optional
            .ofNullable(splitOptions.getBuilder(onError));
    builder.ifPresent(b -> {
        selectionPane.apply(b, onError);
        destinationDirectoryField.apply(b, onError);
        destinationPane.apply(b, onError);
        prefix.apply(b, onError);
    });
    return builder.orElse(null);
}
 
开发者ID:torakiki,项目名称:pdfsam,代码行数:13,代码来源:SplitModule.java

示例6: getBuilder

import org.apache.commons.lang3.builder.Builder; //导入依赖的package包/类
/**
 * @param onError
 *            function to be called in case of error while building the task parameters
 * @return a {@link Builder} for the parameters to be used to perform a pdf manipulation
 */
protected abstract Builder<? extends AbstractParameters> getBuilder(Consumer<String> onError);
 
开发者ID:torakiki,项目名称:pdfsam,代码行数:7,代码来源:BaseTaskExecutionModule.java


注:本文中的org.apache.commons.lang3.builder.Builder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。