-
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
259cebc
commit a48ac5b
Showing
12 changed files
with
893 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/main/java/mediathek/gui/actions/MergeSubtitleWithVideoAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright (c) 2024 derreisende77. | ||
* This code was developed as part of the MediathekView project https://github.com/mediathekview/MediathekView | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package mediathek.gui.actions; | ||
|
||
import mediathek.gui.dialog.subripmerge.MergeSubripVideoDialog; | ||
import mediathek.mainwindow.MediathekGui; | ||
|
||
import javax.swing.*; | ||
import java.awt.event.ActionEvent; | ||
|
||
public class MergeSubtitleWithVideoAction extends AbstractAction { | ||
private final MediathekGui ui; | ||
|
||
public MergeSubtitleWithVideoAction(MediathekGui mediathekGui) { | ||
this.ui = mediathekGui; | ||
putValue(NAME, "Untertiteldatei zu Video hinzufügen..."); | ||
} | ||
|
||
@Override | ||
public void actionPerformed(ActionEvent e) { | ||
MergeSubripVideoDialog dlg = new MergeSubripVideoDialog(ui); | ||
dlg.setVisible(true); | ||
} | ||
} |
364 changes: 364 additions & 0 deletions
364
src/main/java/mediathek/gui/dialog/subripmerge/MergeSubripVideoDialog.java
Large diffs are not rendered by default.
Oops, something went wrong.
130 changes: 130 additions & 0 deletions
130
src/main/java/mediathek/gui/dialog/subripmerge/MergeSubripVideoDialog.jfd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
JFDML JFormDesigner: "8.2.4.0.393" Java: "21.0.4" encoding: "UTF-8" | ||
|
||
new FormModel { | ||
contentType: "form/swing" | ||
root: new FormRoot { | ||
add( new FormWindow( "javax.swing.JDialog", new FormLayoutManager( class java.awt.BorderLayout ) ) { | ||
name: "this" | ||
"defaultCloseOperation": 2 | ||
"modal": true | ||
"title": "Untertitel zu Video hinzufügen" | ||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) { | ||
name: "dialogPane" | ||
"border": new javax.swing.border.EmptyBorder( 12, 12, 12, 12 ) | ||
auxiliary() { | ||
"JavaCodeGenerator.variableLocal": true | ||
} | ||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class org.jdesktop.layout.GroupLayout ) { | ||
"$horizontalGroup": "par l {seq l {space :::p, par l {seq l {par t:::p {comp label2::::104:x, comp label3::t:p:98:p, comp label1::::104:x}, space :::p, par l {seq l {comp tfVideoFilePath:::::x, space :::p, comp btnSelectInputVideo:::p:33:p}, seq {comp tfSubripFilePath:::::x, space :::p, comp btnSelectInputSubrip:::p:33:p}, seq {comp cbLanguage:::p:155:p, space :0:0:x}}}, seq t {par t {seq {comp label4:::p:104:p, space :6:6:p, comp tfVideoOutputPath:::p:368:p}, seq l {space :p:20:p, comp busyLabel:::p::p}}, space :6:6:p, comp btnSelectVideoOutputPath:::p:33:p}}, space :::p}}" | ||
"$verticalGroup": "par l {seq l {space :::p, par b {comp btnSelectInputSubrip::b:p::p, comp tfSubripFilePath::b:p::p, comp label1::b:p::p}, space :::p, par b {comp label3::b:p::p, comp cbLanguage::b:p::p}, space :::p, par b {comp btnSelectInputVideo::b:p::p, comp label2::b:p::p, comp tfVideoFilePath::b:p::p}, space s:::p, par l {seq l {space :7:7:p, comp label4:::p::p}, comp tfVideoOutputPath:::p::p, comp btnSelectVideoOutputPath:::p::p}, space s:::p, comp busyLabel:::p::p, space :::x}}" | ||
} ) { | ||
name: "contentPanel" | ||
auxiliary() { | ||
"JavaCodeGenerator.variableLocal": true | ||
} | ||
add( new FormComponent( "javax.swing.JLabel" ) { | ||
name: "label1" | ||
"text": "Untertitel-Datei:" | ||
"horizontalAlignment": 4 | ||
auxiliary() { | ||
"JavaCodeGenerator.variableLocal": true | ||
} | ||
} ) | ||
add( new FormComponent( "javax.swing.JTextField" ) { | ||
name: "tfSubripFilePath" | ||
} ) | ||
add( new FormComponent( "javax.swing.JButton" ) { | ||
name: "btnSelectInputSubrip" | ||
"text": "..." | ||
} ) | ||
add( new FormComponent( "javax.swing.JLabel" ) { | ||
name: "label2" | ||
"text": "Video-Datei:" | ||
"horizontalAlignment": 4 | ||
auxiliary() { | ||
"JavaCodeGenerator.variableLocal": true | ||
} | ||
} ) | ||
add( new FormComponent( "javax.swing.JTextField" ) { | ||
name: "tfVideoFilePath" | ||
} ) | ||
add( new FormComponent( "javax.swing.JButton" ) { | ||
name: "btnSelectInputVideo" | ||
"text": "..." | ||
} ) | ||
add( new FormComponent( "javax.swing.JLabel" ) { | ||
name: "label3" | ||
"text": "Sprache:" | ||
"horizontalAlignment": 4 | ||
auxiliary() { | ||
"JavaCodeGenerator.variableLocal": true | ||
} | ||
} ) | ||
add( new FormComponent( "javax.swing.JComboBox" ) { | ||
name: "cbLanguage" | ||
"toolTipText": "Sprache der Untertitel" | ||
auxiliary() { | ||
"JavaCodeGenerator.typeParameters": "String" | ||
} | ||
} ) | ||
add( new FormComponent( "javax.swing.JLabel" ) { | ||
name: "label4" | ||
"text": "Zieldatei:" | ||
"horizontalAlignment": 4 | ||
auxiliary() { | ||
"JavaCodeGenerator.variableLocal": true | ||
} | ||
} ) | ||
add( new FormComponent( "javax.swing.JTextField" ) { | ||
name: "tfVideoOutputPath" | ||
} ) | ||
add( new FormComponent( "javax.swing.JButton" ) { | ||
name: "btnSelectVideoOutputPath" | ||
"text": "..." | ||
} ) | ||
add( new FormComponent( "org.jdesktop.swingx.JXBusyLabel" ) { | ||
name: "busyLabel" | ||
"text": "Führe Video und Untertitel zusammen" | ||
} ) | ||
}, new FormLayoutConstraints( class java.lang.String ) { | ||
"value": "Center" | ||
} ) | ||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.GridBagLayout ) { | ||
"$columnSpecs": "0:1.0, 0, 80" | ||
"$rowSpecs": "0" | ||
"$hGap": 5 | ||
"$vGap": 5 | ||
} ) { | ||
name: "buttonBar" | ||
"border": new javax.swing.border.EmptyBorder( 12, 0, 0, 0 ) | ||
auxiliary() { | ||
"JavaCodeGenerator.variableLocal": true | ||
} | ||
add( new FormComponent( "javax.swing.JButton" ) { | ||
name: "btnCancel" | ||
"text": "Abbrechen" | ||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.GridBagConstraintsEx ) { | ||
"gridx": 1 | ||
} ) | ||
add( new FormComponent( "javax.swing.JButton" ) { | ||
name: "btnClose" | ||
"text": "Zusammenführen" | ||
auxiliary() { | ||
"JavaCodeGenerator.variableName": "btnMerge" | ||
} | ||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.GridBagConstraintsEx ) { | ||
"gridy": 0 | ||
"gridx": 2 | ||
} ) | ||
}, new FormLayoutConstraints( class java.lang.String ) { | ||
"value": "South" | ||
} ) | ||
}, new FormLayoutConstraints( class java.lang.String ) { | ||
"value": "Center" | ||
} ) | ||
}, new FormLayoutConstraints( null ) { | ||
"location": new java.awt.Point( 0, 0 ) | ||
"size": new java.awt.Dimension( 555, 295 ) | ||
} ) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.