SRT works ; adds support for export/import ass

This commit is contained in:
Guillaume Tâche
2024-08-24 20:52:01 +02:00
parent d14e32bfd0
commit 728b563d8b
37 changed files with 552 additions and 145 deletions

View File

@@ -1,16 +0,0 @@
package com.github.gtache.autosubtitle.modules.gui.impl;
import javax.inject.Qualifier;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Qualifier
@Documented
@Retention(RUNTIME)
@Target({ElementType.PARAMETER, ElementType.METHOD, ElementType.FIELD})
public @interface FontFamily {
}

View File

@@ -1,16 +0,0 @@
package com.github.gtache.autosubtitle.modules.gui.impl;
import javax.inject.Qualifier;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Qualifier
@Documented
@Retention(RUNTIME)
@Target({ElementType.PARAMETER, ElementType.METHOD, ElementType.FIELD})
public @interface FontSize {
}

View File

@@ -46,16 +46,4 @@ public final class GuiCoreModule {
throw new UncheckedIOException(e);
}
}
@Provides
@FontFamily
static String providesFontFamily() {
return "Arial";
}
@Provides
@FontSize
static int providesFontSize() {
return 12;
}
}

View File

@@ -3,7 +3,8 @@ package com.github.gtache.autosubtitle.modules.gui.impl;
import com.github.gtache.autosubtitle.gui.impl.CombinedResourceBundle;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
import static org.junit.jupiter.api.Assertions.assertTrue;
class TestGuiCoreModule {
@@ -21,14 +22,4 @@ class TestGuiCoreModule {
void testPauseImage() {
assertTrue(GuiCoreModule.providesPauseImage().length > 0);
}
@Test
void testFontFamily() {
assertEquals("Arial", GuiCoreModule.providesFontFamily());
}
@Test
void testFontSize() {
assertEquals(12, GuiCoreModule.providesFontSize());
}
}