本文整理了Java中org.sejda.injector.Auto
类的一些代码示例,展示了Auto
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Auto
类的具体详情如下:
包路径:org.sejda.injector.Auto
类名称:Auto
暂无
代码示例来源:origin: torakiki/pdfsam
/**
* Main panel containing menu, banner and the content area
*
* @author Andrea Vacondio
*
*/
@Auto
public class MainPane extends VBox {
@Inject
public MainPane(ContentPane mainPane, BannerPane banner) {
VBox.setVgrow(mainPane, Priority.ALWAYS);
this.setId("pdfsam-main-pane");
getChildren().addAll(banner, mainPane);
}
}
代码示例来源:origin: torakiki/pdfsam
/**
* Controller receiving notifications of input PDF files as application arguments and asking the user which module should be used to open them
*
* @author Andrea Vacondio
*/
@Auto
public class OpenWithDialogController {
private OpenWithDialog dialog;
@Inject
public OpenWithDialogController(OpenWithDialog dialog) {
this.dialog = dialog;
eventStudio().addAnnotatedListeners(this);
}
@EventListener
public void on(InputPdfArgumentsLoadRequest event) {
if (nonNull(event)) {
dialog.initFor(event).showAndWait();
}
}
}
代码示例来源:origin: torakiki/pdfsam
/**
* Controller for the {@link StageService}
*
* @author Andrea Vacondio
*
*/
@Auto
public class StageServiceController {
private static final Logger LOG = LoggerFactory.getLogger(ClearUsageController.class);
private StageService service;
@Inject
public StageServiceController(StageService service) {
this.service = service;
eventStudio().addAnnotatedListeners(this);
}
@EventListener
public void requestStageStatus(SetLatestStageStatusRequest event) {
LOG.debug("Setting latest statge status to: {}", event.getStatus());
service.save(event.getStatus());
}
}
代码示例来源:origin: torakiki/pdfsam
/**
* Controller receiving requests to open a file with the default system application
*
* @author Andrea Vacondio
*
*/
@Auto
class OpenFileController {
private static final Logger LOG = LoggerFactory.getLogger(OpenFileController.class);
OpenFileController() {
eventStudio().addAnnotatedListeners(this);
}
@EventListener
public void openPath(OpenFileRequest event) {
EventQueue.invokeLater(() -> doOpen(event));
}
private void doOpen(OpenFileRequest event) {
if (Desktop.isDesktopSupported()) {
try {
Desktop.getDesktop().open(event.getFile());
} catch (IOException e) {
LOG.error(String.format("Unable to open '%s'", event.getFile().getAbsoluteFile()), e);
}
}
}
}
代码示例来源:origin: torakiki/pdfsam
@Auto
public class CreateOutputDirectoryDialogController {
代码示例来源:origin: torakiki/pdfsam
@Auto
public class PremiumModulesController {
private static final Logger LOG = LoggerFactory.getLogger(PremiumModulesController.class);
代码示例来源:origin: torakiki/pdfsam
/**
* Component listening for a request to clean the modules usage statistics and performing the clean
*
* @author Andrea Vacondio
*
*/
@Auto
public class ClearUsageController {
private static final Logger LOG = LoggerFactory.getLogger(ClearUsageController.class);
private UsageService service;
@Inject
public ClearUsageController(UsageService service) {
this.service = service;
eventStudio().addAnnotatedListeners(this);
}
/**
* Request to clear the modules usage stats
*
* @param event
*/
@EventListener(priority = Integer.MIN_VALUE)
public void request(ClearUsageRequestEvent event) {
LOG.debug("Clearing usage statistics");
service.clear();
}
}
代码示例来源:origin: torakiki/pdfsam
/**
* Controller displaying the InfoStage when required
*
* @author Andrea Vacondio
*
*/
@Auto
public class InfoStageController {
private Provider<InfoStage> stageProvider;
@Inject
InfoStageController(Provider<InfoStage> stageProvider) {
this.stageProvider = stageProvider;
eventStudio().addAnnotatedListeners(this);
}
@EventListener(priority = Integer.MAX_VALUE)
@SuppressWarnings("unused")
void requestShow(ShowPdfDescriptorRequest event) {
InfoStage stage = stageProvider.get();
if (!stage.isShowing()) {
stage.centerOnScreen();
stage.show();
}
stage.requestFocus();
}
}
代码示例来源:origin: torakiki/pdfsam
@Auto
class ModulesDashboardItem implements DashboardItem {
代码示例来源:origin: torakiki/pdfsam
@Auto
class AboutDashboadItem implements DashboardItem {
代码示例来源:origin: torakiki/pdfsam
@Auto
public class PdfLoadController {
代码示例来源:origin: torakiki/pdfsam
@Auto
public class LenientTaskExecutionDialogController {
private static final Logger LOG = LoggerFactory.getLogger(LenientTaskExecutionDialogController.class);
代码示例来源:origin: torakiki/pdfsam
@Auto
public class UpdatesController {
private static final Logger LOG = LoggerFactory.getLogger(UpdatesController.class);
代码示例来源:origin: torakiki/pdfsam
@Auto
public class PlaySoundController {
private UserContext userContext;
代码示例来源:origin: torakiki/pdfsam
@Auto
public class PreferencesDashboardItem implements DashboardItem {
代码示例来源:origin: torakiki/pdfsam
@Auto
public class LatestNewsController {
private static final Logger LOG = LoggerFactory.getLogger(LatestNewsController.class);
代码示例来源:origin: torakiki/pdfsam
@Auto
class WindowStatusController {
private static final Logger LOG = LoggerFactory.getLogger(WindowStatusController.class);
代码示例来源:origin: torakiki/pdfsam
@Auto
public class TaskExecutionController {
private static final Logger LOG = LoggerFactory.getLogger(TaskExecutionController.class);
代码示例来源:origin: torakiki/pdfsam
@Auto
public class OverwriteDialogController {
private static final Logger LOG = LoggerFactory.getLogger(OverwriteDialogController.class);
代码示例来源:origin: torakiki/pdfsam
@Auto
public class WorkspaceController {
private static final Logger LOG = LoggerFactory.getLogger(WorkspaceController.class);
内容来源于网络,如有侵权,请联系作者删除!