Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
170b9bd
update to java 21
Oct 22, 2023
50c698a
changes
Jun 1, 2024
3a7aa89
changes
Jun 1, 2024
c443123
changes
Jun 1, 2024
0e3ba93
changes
Jun 1, 2024
5205f6b
changes
Jun 2, 2024
897046c
changes
Jun 2, 2024
7dcd91e
formatting
Jun 2, 2024
b5bf73b
remove obsolete file
Jun 2, 2024
307c7a3
formatting
Jun 2, 2024
794910e
changes
Jun 2, 2024
ce81857
changes
Jun 2, 2024
edd5351
changes
Jun 2, 2024
4f9a2a8
changes
Jun 2, 2024
b9268cd
changes
Jun 2, 2024
255b048
changes
Jun 3, 2024
0760225
small change
Jun 5, 2024
012081f
changes
Dec 6, 2024
a57ee61
changes
Dec 6, 2024
0466ea1
changes
Dec 6, 2024
f105ad2
changes
Dec 6, 2024
21d22b8
changes
Dec 6, 2024
b607834
changes
Dec 6, 2024
4f437e0
changes
Dec 6, 2024
84005c8
changes
Dec 6, 2024
61965f8
changes
Dec 6, 2024
86218a6
fix
Dec 6, 2024
4047f7b
changes
Dec 6, 2024
83fed07
update gestdown json
Dec 6, 2024
4bd28da
changes
Dec 6, 2024
a773604
changes
Dec 6, 2024
533941a
changes
Dec 6, 2024
0323fff
changes
Dec 6, 2024
830aeab
changes
Dec 6, 2024
cb7f315
changes
Dec 6, 2024
d262561
opensubtitle api update
Dec 6, 2024
c72df65
changes
Dec 6, 2024
afa8d12
changes
Dec 6, 2024
2808769
Replace MyComboBox with extension
Dec 7, 2024
98e1074
changes
Dec 7, 2024
54bcc4c
changes
Dec 7, 2024
6d51724
changes
Dec 7, 2024
576826b
dependency update
Dec 14, 2024
4ade476
small changes
Dec 14, 2024
50ff94e
changes
Dec 15, 2024
b25020e
changes
Dec 15, 2024
473f03f
changes
Dec 15, 2024
38069d6
changes
Dec 15, 2024
69fd8f4
changes
Dec 15, 2024
2595d6d
changes
Dec 18, 2024
ada06d0
fix
Dec 18, 2024
9d4aea7
fix
Dec 18, 2024
4bc2baf
fix
Dec 18, 2024
944aa2c
cleanup
Dec 18, 2024
f3fb06a
Merge branch 'master' into changes
EotT123 Dec 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
107 changes: 86 additions & 21 deletions MultiSubDownloader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,12 @@
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>multisubdownloader</artifactId>
<name>MultiSubDownloader</name>
<artifactId>multisubdownloader</artifactId>
<name>MultiSubDownloader</name>

<repositories>
<repository>
<id>d-maven</id>
<url>http://d-maven.googlecode.com/svn/trunk/repo</url>
</repository>
</repositories>

<properties>
<build.timestamp>${maven.build.timestamp}</build.timestamp>
</properties>
<properties>
<build.timestamp>${maven.build.timestamp}</build.timestamp>
</properties>

<dependencies>
<dependency>
Expand Down Expand Up @@ -62,6 +55,14 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>systems.manifold</groupId>
<artifactId>manifold-ext-rt</artifactId>
</dependency>
<dependency>
<groupId>systems.manifold</groupId>
<artifactId>manifold-props-rt</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
Expand Down Expand Up @@ -109,11 +110,52 @@
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<id>add-generated-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-source/openapi/src/main/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgs combine.children="append">
<arg>-Xplugin:Manifold</arg>
</compilerArgs>
<annotationProcessorPaths combine.children="append">
<path>
<groupId>systems.manifold</groupId>
<artifactId>manifold-ext</artifactId>
<version>${manifold.version}</version>
</path>
<path>
<groupId>systems.manifold</groupId>
<artifactId>manifold-props</artifactId>
<version>${manifold.version}</version>
</path>
<path>
<groupId>systems.manifold</groupId>
<artifactId>manifold-strings</artifactId>
<version>${manifold.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down Expand Up @@ -159,15 +201,12 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<executions>
<execution>
<id>gestdown</id>
<goals>
<goal>generate</goal>
</goals>
Expand Down Expand Up @@ -203,7 +242,33 @@
<importMapping>java.time.OffsetDateTime=java.time.Instant</importMapping>
<importMapping>java.time.LocalDateTime=java.time.Instant</importMapping>
</importMappings>

</configuration>
</execution>
<execution>
<id>opensubtitles</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<generatorName>java</generatorName>
<inputSpec>${project.basedir}/src/main/resources/opensubtitles/open-api.json</inputSpec>
<output>${project.build.directory}/generated-source/openapi</output>
<modelPackage>org.opensubtitles.model</modelPackage>
<apiPackage>org.opensubtitles.api</apiPackage>
<invokerPackage>org.opensubtitles.invoker</invokerPackage>
<packageName>org.opensubtitles</packageName>
<!--<language>java</language>-->
<!--<skipValidateSpec>true</skipValidateSpec>-->
<apisToGenerate>Authentication,Download,Subtitles</apisToGenerate>
<generateModelTests>false</generateModelTests>
<configOptions>
<typeMappings>integer=int,int=int</typeMappings>
<useSwaggerAnnotations>false</useSwaggerAnnotations>
<serializableModel>true</serializableModel>
<booleanGetterPrefix>is</booleanGetterPrefix>
<disallowAdditionalPropertiesIfNotPresent>false</disallowAdditionalPropertiesIfNotPresent>
<!--<sourceFolder>src/gen/java</sourceFolder>-->
</configOptions>
</configuration>
</execution>
</executions>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
package extensions.java.awt.Component;

import java.awt.*;
import java.awt.event.MouseListener;
import java.util.function.Consumer;
import java.util.function.Predicate;

import lombok.experimental.UtilityClass;
import manifold.ext.rt.api.Extension;
import manifold.ext.rt.api.Self;
import manifold.ext.rt.api.This;
import org.jetbrains.annotations.Nullable;

@UtilityClass
@Extension
public class ComponentExt {

public static void setRecursive(@This Component component, Consumer<Component> consumer) {
setRecursive(component, consumer, _ -> true);
}

public static void setRecursive(@This Component component, Consumer<Component> consumer,
Predicate<Container> condition) {
if (component != null) {
consumer.accept(component);
if (component instanceof Container container && condition.test(container)) {
container.getComponents().forEach(child -> setRecursive(child, consumer, condition));
}
}
}

public static @Self Component mouseListener(@This Component component, @Nullable MouseListener listener) {
component.addMouseListener(listener);
return component;
}

public static @Self Component addTo(@This Component child, Container parent) {
parent.addComponent(child);
return child;
}

public static @Self Component addTo(@This Component child, Container parent, Object constraints) {
parent.addComponent(child, constraints);
return child;
}

public static @Self Component withSize(@This Component component, Dimension size) {
component.size = size;
component.minimumSize = size;
component.maximumSize = size;
component.preferredSize = size;
return component;
}

public static @Self Component minSize(@This Component component, Dimension minSize) {
component.minimumSize = minSize;
return component;
}

public static @Self Component minSize(@This Component component, int minWidth, int minHeight) {
return component.minSize(new Dimension(minWidth, minHeight));
}

public static @Self Component maxSize(@This Component component, Dimension maximumSize) {
component.maximumSize = maximumSize;
return component;
}

public static @Self Component maxSize(@This Component component, int maxWidth, int maxHeight) {
return component.maxSize(new Dimension(maxWidth, maxHeight));
}

public static @Self Component font(@This Component component, Font font) {
component.setFont(font);
return component;
}

public static @Self Component focusable(@This Component component, boolean focusable) {
component.setFocusable(focusable);
return component;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package extensions.java.awt.Container;

import java.awt.*;

import lombok.experimental.UtilityClass;
import manifold.ext.rt.api.Extension;
import manifold.ext.rt.api.Self;
import manifold.ext.rt.api.This;

@UtilityClass
@Extension
public class ContainerExt {

public static @Self Container addComponent(@This Container component, Component child) {
component.add(child);
return component;
}

public static @Self Container addComponent(@This Container component, Component child, Object constraints) {
component.add(child, constraints);
return component;
}

public static @Self Container addComponent(@This Container component, Object constraints, Component child) {
component.add(child, constraints);
return component;
}

public static @Self Container layout(@This Container container, LayoutManager mgr) {
container.setLayout(mgr);
return container;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package extensions.javax.swing.AbstractButton;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionListener;
import java.util.function.Consumer;

import lombok.experimental.UtilityClass;
import manifold.ext.rt.api.Extension;
import manifold.ext.rt.api.Self;
import manifold.ext.rt.api.This;
import org.lodder.subtools.sublibrary.util.BooleanConsumer;

@UtilityClass
@Extension
public class AbstractButtonExt {

public static @Self AbstractButton actionListener(@This AbstractButton abstractButton, ActionListener listener) {
abstractButton.addActionListener(listener);
return abstractButton;
}

public static @Self AbstractButton actionListener(@This AbstractButton abstractButton, Runnable listener) {
return abstractButton.actionListener(_ -> listener.run());
}

public static @Self AbstractButton actionListenerSelf(@This AbstractButton abstractButton,
Consumer<AbstractButton> selfConsumerListener) {
return abstractButton.actionListener(_ -> selfConsumerListener.accept(abstractButton));
}

public static @Self AbstractButton selectedListener(@This AbstractButton abstractButton,
BooleanConsumer selectedConsumer) {
return abstractButton.actionListener(_ -> selectedConsumer.accept(abstractButton.isSelected()));
}

public static @Self AbstractButton actionCommand(@This AbstractButton abstractButton, String actionCommand) {
abstractButton.setActionCommand(actionCommand);
return abstractButton;
}

public static @Self AbstractButton withMargin(@This AbstractButton abstractButton, Insets insets) {
abstractButton.setMargin(insets);
return abstractButton;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package extensions.javax.swing.JButton;

import javax.swing.*;

import lombok.experimental.UtilityClass;
import manifold.ext.rt.api.Extension;
import manifold.ext.rt.api.Self;
import manifold.ext.rt.api.This;

@UtilityClass
@Extension
public class JButtonExt {

public static @Self JButton defaultButtonFor(@This JButton abstractButton, JRootPane rootPane) {
rootPane.setDefaultButton(abstractButton);
return abstractButton;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package extensions.javax.swing.JCheckBox;

import javax.swing.*;

import lombok.experimental.UtilityClass;
import manifold.ext.rt.api.Extension;
import manifold.ext.rt.api.Self;
import manifold.ext.rt.api.This;
import org.lodder.subtools.sublibrary.util.BooleanConsumer;

@Extension
@UtilityClass
public class JCheckBoxExt {

public static @Self JCheckBox addCheckedChangeListener(@This JCheckBox checkBox, BooleanConsumer... listeners) {
checkBox.addItemListener(e -> listeners.forEach(lis -> lis.accept(((JCheckBox) e.getSource()).isSelected())));
return checkBox;
}

public static @Self JCheckBox visible(@This JCheckBox checkBox, boolean visible) {
checkBox.setVisible(visible);
return checkBox;
}

public static @Self JCheckBox selected(@This JCheckBox checkBox, boolean selected) {
checkBox.setSelected(selected);
return checkBox;
}
}
Loading
Loading