/
aleksandrazimut
/
TimerCountdownDesktop
Обзор
Документация
Войти
/
aleksandrazimut
/
TimerCountdownDesktop
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/main/java/com/timerapp/model/Theme.java
77 строк
3 KB
Aleksandr Azimut
init commit
17 дек 2025, 21:59
17 дек 2025, 21:59
3c602f1
Код
Авторство
О чём код?
package com.timerapp.model; /** * Тема оформления таймера * Каждая тема содержит фон, звук, цветовую схему и иконку */ public class Theme { private final String name; // Название темы private final String backgroundPath; // Путь к фону главного окна private final String alarmBackgroundPath; // Путь к фону окна Alarm private final String soundPath; // Путь к звуку private final ThemeColors colors; // Цветовая схема private final String iconPath; // Путь к иконке public Theme(String name, String backgroundPath, String alarmBackgroundPath, String soundPath, ThemeColors colors, String iconPath) { this.name = name; this.backgroundPath = backgroundPath; this.alarmBackgroundPath = alarmBackgroundPath; this.soundPath = soundPath; this.colors = colors; this.iconPath = iconPath; } public String getName() { return name; } public String getBackgroundPath() { return backgroundPath; } public String getAlarmBackgroundPath() { return alarmBackgroundPath; } public String getSoundPath() { return soundPath; } public ThemeColors getColors() { return colors; } public String getIconPath() { return iconPath; } /** * Возвращает массив предустановленных тем */ public static Theme[] getDefaultThemes() { return new Theme[] { new Theme("Simple", "/img/bg_simple.jpg", "/img/BG01.jpg", "/sounds/alarm1.mp3", ThemeColors.Presets.SIMPLE, "/img/icon_stopwatch.png"), new Theme("Fallout", "/img/bg_fallout_2.jpg", "/img/fall.jpg", "/sounds/mr_stranger.mp3", ThemeColors.Presets.FALLOUT, "/img/icon_cowboy_hat.png"), new Theme("London", "/img/bg_london.jpg", "/img/BG03.jpg", "/sounds/bigban.mp3", ThemeColors.Presets.LONDON, "/img/icon_bus.png"), new Theme("Pokemon", "/img/bg_game.jpg", "/img/BG04.jpg", "/sounds/pika_pika.mp3", ThemeColors.Presets.POKEMON, "/img/icon_game.png"), new Theme("Vader", "/img/bg_vader.jpg", "/img/BG05.jpg", "/sounds/vader.mp3", ThemeColors.Presets.VADER, "/img/icon_helmet.png"), new Theme("R2D2", "/img/bg_r2d2.jpg", "/img/BG06.jpg", "/sounds/r2d2.mp3", ThemeColors.Presets.R2D2, "/img/icon_r2d2.png") }; } @Override public String toString() { return name; } }