/
rgd045
/
crypt-file
Обзор
Документация
Войти
/
rgd045
/
crypt-file
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/main/java/org/cryptomator/ui/fxapp/FxApplicationModule.java
61 строка
2 KB
Jan-Peter Klein
removed unused method, del .idea/uiDesigner.xml and code cleanup
05 июл 2022, 17:17
05 июл 2022, 17:17
9e18215
Код
Авторство
О чём код?
/******************************************************************************* * Copyright (c) 2017 Skymatic UG (haftungsbeschränkt). * All rights reserved. This program and the accompanying materials * are made available under the terms of the accompanying LICENSE file. *******************************************************************************/ package org.cryptomator.ui.fxapp; import dagger.Module; import dagger.Provides; import org.apache.commons.lang3.SystemUtils; import org.cryptomator.ui.common.ErrorComponent; import org.cryptomator.ui.common.StageFactory; import org.cryptomator.ui.lock.LockComponent; import org.cryptomator.ui.mainwindow.MainWindowComponent; import org.cryptomator.ui.preferences.PreferencesComponent; import org.cryptomator.ui.quit.QuitComponent; import org.cryptomator.ui.traymenu.TrayMenuComponent; import org.cryptomator.ui.unlock.UnlockComponent; import javax.inject.Named; import javafx.scene.image.Image; import java.io.IOException; import java.io.InputStream; import java.io.UncheckedIOException; import java.util.Collections; import java.util.List; @Module(includes = {UpdateCheckerModule.class}, subcomponents = {TrayMenuComponent.class, MainWindowComponent.class, PreferencesComponent.class, UnlockComponent.class, LockComponent.class, QuitComponent.class, ErrorComponent.class}) abstract class FxApplicationModule { private static Image createImageFromResource(String resourceName) throws IOException { try (InputStream in = FxApplicationModule.class.getResourceAsStream(resourceName)) { return new Image(in); } } @Provides @FxApplicationScoped static TrayMenuComponent provideTrayMenuComponent(TrayMenuComponent.Builder builder) { return builder.build(); } @Provides @FxApplicationScoped static MainWindowComponent provideMainWindowComponent(MainWindowComponent.Builder builder) { return builder.build(); } @Provides @FxApplicationScoped static PreferencesComponent providePreferencesComponent(PreferencesComponent.Builder builder) { return builder.build(); } @Provides @FxApplicationScoped static QuitComponent provideQuitComponent(QuitComponent.Builder builder) { return builder.build(); } }