diff --git a/.gitignore b/.gitignore index 62751cbb..03639d29 100644 --- a/.gitignore +++ b/.gitignore @@ -46,9 +46,14 @@ ClipCornDB/ ClipCornDB*/ data/ jClipCorn_backup/ +build/ +javadoc/ +jClipCorn_backup/ + +DerbManager*.jar *.bat -*.jar + *.log *jClipCorn.properties *.lnk diff --git a/lib/DdlUtils-1.0.jar b/lib/DdlUtils-1.0.jar new file mode 100644 index 00000000..34f6b555 Binary files /dev/null and b/lib/DdlUtils-1.0.jar differ diff --git a/lib/Fast-MD5.jar b/lib/Fast-MD5.jar new file mode 100644 index 00000000..ac8541db Binary files /dev/null and b/lib/Fast-MD5.jar differ diff --git a/lib/commons-beanutils-1.8.3.jar b/lib/commons-beanutils-1.8.3.jar new file mode 100644 index 00000000..218510bc Binary files /dev/null and b/lib/commons-beanutils-1.8.3.jar differ diff --git a/lib/commons-betwixt-0.8.jar b/lib/commons-betwixt-0.8.jar new file mode 100644 index 00000000..ab00040b Binary files /dev/null and b/lib/commons-betwixt-0.8.jar differ diff --git a/lib/commons-collections-3.2.1.jar b/lib/commons-collections-3.2.1.jar new file mode 100644 index 00000000..c35fa1fe Binary files /dev/null and b/lib/commons-collections-3.2.1.jar differ diff --git a/lib/commons-digester-2.1.jar b/lib/commons-digester-2.1.jar new file mode 100644 index 00000000..a07cfa8e Binary files /dev/null and b/lib/commons-digester-2.1.jar differ diff --git a/lib/commons-lang-2.6.jar b/lib/commons-lang-2.6.jar new file mode 100644 index 00000000..98467d3a Binary files /dev/null and b/lib/commons-lang-2.6.jar differ diff --git a/lib/commons-logging-1.1.1.jar b/lib/commons-logging-1.1.1.jar new file mode 100644 index 00000000..8758a96b Binary files /dev/null and b/lib/commons-logging-1.1.1.jar differ diff --git a/lib/derby-10.9.1.0.jar b/lib/derby-10.9.1.0.jar new file mode 100644 index 00000000..26feece9 Binary files /dev/null and b/lib/derby-10.9.1.0.jar differ diff --git a/lib/forms-1.3.jar b/lib/forms-1.3.jar new file mode 100644 index 00000000..05c9ae65 Binary files /dev/null and b/lib/forms-1.3.jar differ diff --git a/lib/jdom-2.0.4.jar b/lib/jdom-2.0.4.jar new file mode 100644 index 00000000..19cafb86 Binary files /dev/null and b/lib/jdom-2.0.4.jar differ diff --git a/lib/json.jar b/lib/json.jar new file mode 100644 index 00000000..4855ab6d Binary files /dev/null and b/lib/json.jar differ diff --git a/lib/laf-plugin-7.2.1.jar b/lib/laf-plugin-7.2.1.jar new file mode 100644 index 00000000..82b02527 Binary files /dev/null and b/lib/laf-plugin-7.2.1.jar differ diff --git a/lib/laf-widget-7.2.1.jar b/lib/laf-widget-7.2.1.jar new file mode 100644 index 00000000..0371eb1b Binary files /dev/null and b/lib/laf-widget-7.2.1.jar differ diff --git a/lib/substance-7.2.1.jar b/lib/substance-7.2.1.jar new file mode 100644 index 00000000..20428dd9 Binary files /dev/null and b/lib/substance-7.2.1.jar differ diff --git a/lib/trident-7.2.1.jar b/lib/trident-7.2.1.jar new file mode 100644 index 00000000..54fb6147 Binary files /dev/null and b/lib/trident-7.2.1.jar differ diff --git a/res/icons/toolbar/balance_unbalance.png b/res/icons/toolbar/balance_unbalance.png new file mode 100644 index 00000000..976a7932 Binary files /dev/null and b/res/icons/toolbar/balance_unbalance.png differ diff --git a/res/icons/toolbar/recycle.png b/res/icons/toolbar/recycle.png index 16200427..251b2ee6 100644 Binary files a/res/icons/toolbar/recycle.png and b/res/icons/toolbar/recycle.png differ diff --git a/src/de/jClipCorn/Main.java b/src/de/jClipCorn/Main.java index 9a5d4c1e..38abd367 100644 --- a/src/de/jClipCorn/Main.java +++ b/src/de/jClipCorn/Main.java @@ -13,7 +13,7 @@ public class Main { public final static String TITLE = "jClipCorn"; //$NON-NLS-1$ - public final static String VERSION = "1.3"; //$NON-NLS-1$ + public final static String VERSION = "1.4"; //$NON-NLS-1$ public final static String DBVERSION = "1.5"; //$NON-NLS-1$ private final static String PROPERTIES_PATH = "jClipcorn.properties"; //$NON-NLS-1$ @@ -75,4 +75,6 @@ private static void init() { //TODO Parsd die Lang hieraus net: "Last Samurai [Eng] (Part 1).avi" -//TODO Title von Fenster mit Grossbuchstaben anfangen (addMov, getCover) \ No newline at end of file +//TODO Title von Fenster mit Grossbuchstaben anfangen (addMov, getCover) + +//TODO Apache Commons hacken und duplicate entry removen \ No newline at end of file diff --git a/src/de/jClipCorn/gui/Resources.java b/src/de/jClipCorn/gui/Resources.java index a2da1726..e04fae92 100644 --- a/src/de/jClipCorn/gui/Resources.java +++ b/src/de/jClipCorn/gui/Resources.java @@ -42,7 +42,7 @@ public class Resources { public final static String ICN_MENUBAR_MOVESERIES = registerICN("/icons/toolbar/move_to_folder.png"); public final static String ICN_MENUBAR_FILENAMERULES = registerICN("/icons/toolbar/books.png"); public final static String ICN_MENUBAR_CREATE_JXMLBKP = registerICN("/icons/toolbar/source_code.png"); - + public final static String ICN_MENUBAR_COMPARE = registerICN("/icons/toolbar/balance_unbalance.png"); // ############################################# ############################################ diff --git a/src/de/jClipCorn/gui/actionTree/CCActionTree.java b/src/de/jClipCorn/gui/actionTree/CCActionTree.java index c37c7b79..511e061e 100644 --- a/src/de/jClipCorn/gui/actionTree/CCActionTree.java +++ b/src/de/jClipCorn/gui/actionTree/CCActionTree.java @@ -225,7 +225,7 @@ public void actionPerformed(ActionEvent e) { } }); - temp = extras.addChild(new CCActionElement("CompareDBs", "", null)); + temp = extras.addChild(new CCActionElement("CompareDBs", "ClipMenuBar.Extras.CompareDBs", Resources.ICN_MENUBAR_COMPARE)); temp.addListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { diff --git a/src/de/jClipCorn/gui/frames/compareDatabaseFrame/CompareDatabaseFrame.java b/src/de/jClipCorn/gui/frames/compareDatabaseFrame/CompareDatabaseFrame.java index 8da0c3a0..9b1d8329 100644 --- a/src/de/jClipCorn/gui/frames/compareDatabaseFrame/CompareDatabaseFrame.java +++ b/src/de/jClipCorn/gui/frames/compareDatabaseFrame/CompareDatabaseFrame.java @@ -12,7 +12,6 @@ import java.util.Iterator; import javax.swing.DefaultListModel; -import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFileChooser; import javax.swing.JFrame; @@ -25,6 +24,8 @@ import javax.swing.ListSelectionModel; import javax.swing.SwingConstants; import javax.swing.SwingUtilities; +import javax.swing.event.ListSelectionEvent; +import javax.swing.event.ListSelectionListener; import org.apache.commons.lang.StringUtils; import org.jdom2.Document; @@ -41,7 +42,10 @@ import de.jClipCorn.database.CCMovieList; import de.jClipCorn.database.databaseElement.CCDatabaseElement; import de.jClipCorn.database.databaseElement.CCMovie; +import de.jClipCorn.gui.CachedResourceLoader; +import de.jClipCorn.gui.Resources; import de.jClipCorn.gui.guiComponents.ReadableTextField; +import de.jClipCorn.gui.localization.LocaleBundle; import de.jClipCorn.gui.log.CCLog; import de.jClipCorn.util.CCDate; import de.jClipCorn.util.FileChooserHelper; @@ -50,9 +54,9 @@ public class CompareDatabaseFrame extends JFrame { private static final long serialVersionUID = 5114410004487986632L; - - private static final String EXTENSION = "jcccf"; - + + private static final String EXTENSION = "jcccf"; //$NON-NLS-1$ + private JPanel pnlTop; private JPanel pnlMain; private JLabel lblNewLabel; @@ -74,23 +78,19 @@ public class CompareDatabaseFrame extends JFrame { private JPanel pnlTabDifferentCover; private JPanel pnlInfoDB2; private JPanel pnlInfoDB1; - private JLabel lblDB1Cover; private JLabel lblDatabase_1; - private JLabel lblZyklusUndTitle; + private JLabel lblNameDB1; private JLabel lblChecksumFile; private JLabel lblChecksumCover; private JLabel lblCheckSumDB1File; private JLabel lblCheckSumDB1Cover; private JLabel lblDatabase_2; - private JLabel label_1; + private JLabel lblNameDB2; private JLabel label_2; private JLabel label_3; private JLabel lblCheckSumDB2File; private JLabel lblCheckSumDB2Cover; - private JLabel label_6; private JScrollPane scrollPane; - private JList lsDB1; - private JFileChooser fchooser; private CCMovieList movielist; private JScrollPane scrollPane_1; @@ -98,33 +98,35 @@ public class CompareDatabaseFrame extends JFrame { private JScrollPane scrollPane_3; private JScrollPane scrollPane_4; private JScrollPane scrollPane_5; - private JList lsDB2; - private JList lsMissDB1; - private JList lsMissDB2; - private JList lsDiffFiles; - private JList lsDiffCover; - + private JList lsDB1; + private JList lsDB2; + private JList lsMissDB1; + private JList lsMissDB2; + private JList lsDiffFiles; + private JList lsDiffCover; + public CompareDatabaseFrame(Component owner, CCMovieList mlist) { super(); this.movielist = mlist; - + initGUI(); setLocationRelativeTo(owner); - + initFileChooser(); } - + private void initGUI() { - setTitle("Compare shit together"); + setTitle(LocaleBundle.getString("CompareDatabaseFrame.this.title")); //$NON-NLS-1$ + setIconImage(CachedResourceLoader.getImage(Resources.IMG_FRAME_ICON)); setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); - + pnlTop = new JPanel(); getContentPane().add(pnlTop, BorderLayout.NORTH); pnlTop.setLayout(new FormLayout(new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, - ColumnSpec.decode("default:grow"), + ColumnSpec.decode("default:grow"), //$NON-NLS-1$ FormFactory.RELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, @@ -136,151 +138,186 @@ private void initGUI() { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, - RowSpec.decode("fill:default"), + RowSpec.decode("fill:15dlu"), //$NON-NLS-1$ FormFactory.RELATED_GAP_ROWSPEC,})); - - lblNewLabel = new JLabel("Database 1"); - pnlTop.add(lblNewLabel, "2, 2, right, default"); - + + lblNewLabel = new JLabel(LocaleBundle.getString("CompareDatabaseFrame.LblDatabase1.text")); //$NON-NLS-1$ + pnlTop.add(lblNewLabel, "2, 2, right, default"); //$NON-NLS-1$ + edDB1 = new ReadableTextField(); - pnlTop.add(edDB1, "4, 2, 3, 1, fill, default"); + pnlTop.add(edDB1, "4, 2, fill, default"); //$NON-NLS-1$ edDB1.setColumns(10); - button = new JButton("..."); - button.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - openFile1(); - } - }); - pnlTop.add(button, "8, 2"); - - lblDatabase = new JLabel("Database 2"); - pnlTop.add(lblDatabase, "2, 4, right, default"); + button = new JButton("..."); //$NON-NLS-1$ + button.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent arg0) { + openFile1(); + } + }); + pnlTop.add(button, "6, 2"); //$NON-NLS-1$ + btnGenerate = new JButton(LocaleBundle.getString("CompareDatabaseFrame.BtnGenerateCompareFile.text")); //$NON-NLS-1$ + btnGenerate.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + saveCompareFile(); + } + }); + pnlTop.add(btnGenerate, "8, 2"); //$NON-NLS-1$ + + lblDatabase = new JLabel(LocaleBundle.getString("CompareDatabaseFrame.LblDatabase2.text")); //$NON-NLS-1$ + pnlTop.add(lblDatabase, "2, 4, right, default"); //$NON-NLS-1$ + edDB2 = new ReadableTextField(); - pnlTop.add(edDB2, "4, 4, fill, default"); + pnlTop.add(edDB2, "4, 4, fill, default"); //$NON-NLS-1$ edDB2.setColumns(10); - - button_1 = new JButton("..."); + + button_1 = new JButton("..."); //$NON-NLS-1$ button_1.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { openFile2(); } }); - pnlTop.add(button_1, "6, 4"); - - btnGenerate = new JButton("Generate"); - btnGenerate.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - saveCompareFile(); - } - }); - pnlTop.add(btnGenerate, "8, 4"); + pnlTop.add(button_1, "6, 4"); //$NON-NLS-1$ + btnCompare = new JButton(LocaleBundle.getString("CompareDatabaseFrame.BtnCompare.text")); //$NON-NLS-1$ + btnCompare.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + startCompare(); + } + }); + pnlTop.add(btnCompare, "8, 4"); //$NON-NLS-1$ + progressBar = new JProgressBar(); - pnlTop.add(progressBar, "2, 6, 5, 1"); - - btnCompare = new JButton("Compare"); - btnCompare.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - startCompare(); - } - }); - pnlTop.add(btnCompare, "8, 6"); - + pnlTop.add(progressBar, "2, 6, 7, 1"); //$NON-NLS-1$ + pnlMain = new JPanel(); getContentPane().add(pnlMain, BorderLayout.CENTER); - pnlMain.setLayout(new FormLayout(new ColumnSpec[] { - FormFactory.RELATED_GAP_COLSPEC, - ColumnSpec.decode("default:grow(100)"), - ColumnSpec.decode("default:grow"),}, - new RowSpec[] { - RowSpec.decode("364px:grow"), - FormFactory.RELATED_GAP_ROWSPEC,})); - + pnlMain.setLayout(new FormLayout(new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, ColumnSpec.decode("default:grow(100)"), //$NON-NLS-1$ + ColumnSpec.decode("default:grow"), }, //$NON-NLS-1$ + new RowSpec[] { RowSpec.decode("364px:grow"), //$NON-NLS-1$ + FormFactory.RELATED_GAP_ROWSPEC, })); + tabPnlMain = new JTabbedPane(JTabbedPane.TOP); tabPnlMain.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT); - pnlMain.add(tabPnlMain, "2, 1, fill, fill"); - + pnlMain.add(tabPnlMain, "2, 1, fill, fill"); //$NON-NLS-1$ + pnlTabDB1 = new JPanel(); - tabPnlMain.addTab("Database 1", null, pnlTabDB1, null); + tabPnlMain.addTab(LocaleBundle.getString("CompareDatabaseFrame.tabPnlMain.database1.caption"), null, pnlTabDB1, null); //$NON-NLS-1$ pnlTabDB1.setLayout(new BorderLayout(0, 0)); - + scrollPane = new JScrollPane(); pnlTabDB1.add(scrollPane, BorderLayout.CENTER); - - lsDB1 = new JList(); + + lsDB1 = new JList<>(); lsDB1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + lsDB1.getSelectionModel().addListSelectionListener(new ListSelectionListener() { + @Override + public void valueChanged(ListSelectionEvent e) { + onSelection(lsDB1, e); + } + }); scrollPane.setViewportView(lsDB1); - + pnlTabDB2 = new JPanel(); - tabPnlMain.addTab("Database 2", null, pnlTabDB2, null); + tabPnlMain.addTab(LocaleBundle.getString("CompareDatabaseFrame.tabPnlMain.database2.caption"), null, pnlTabDB2, null); //$NON-NLS-1$ pnlTabDB2.setLayout(new BorderLayout(0, 0)); - + scrollPane_1 = new JScrollPane(); pnlTabDB2.add(scrollPane_1, BorderLayout.CENTER); - - lsDB2 = new JList(); + + lsDB2 = new JList<>(); lsDB2.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + lsDB2.getSelectionModel().addListSelectionListener(new ListSelectionListener() { + @Override + public void valueChanged(ListSelectionEvent e) { + onSelection(lsDB2, e); + } + }); scrollPane_1.setViewportView(lsDB2); - + pnlTabMissingDB1 = new JPanel(); - tabPnlMain.addTab("Missing in DB 1", null, pnlTabMissingDB1, null); + tabPnlMain.addTab(LocaleBundle.getString("CompareDatabaseFrame.tabPnlMain.missingdb1.caption"), null, pnlTabMissingDB1, null); //$NON-NLS-1$ pnlTabMissingDB1.setLayout(new BorderLayout(0, 0)); - + scrollPane_2 = new JScrollPane(); pnlTabMissingDB1.add(scrollPane_2, BorderLayout.CENTER); - - lsMissDB1 = new JList(); + + lsMissDB1 = new JList<>(); lsMissDB1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + lsMissDB1.getSelectionModel().addListSelectionListener(new ListSelectionListener() { + @Override + public void valueChanged(ListSelectionEvent e) { + onSelection(lsMissDB1, e); + } + }); scrollPane_2.setViewportView(lsMissDB1); - + pnlTabMissingDB2 = new JPanel(); - tabPnlMain.addTab("Missing in DB 2", null, pnlTabMissingDB2, null); + tabPnlMain.addTab(LocaleBundle.getString("CompareDatabaseFrame.tabPnlMain.missingdb2.caption"), null, pnlTabMissingDB2, null); //$NON-NLS-1$ pnlTabMissingDB2.setLayout(new BorderLayout(0, 0)); - + scrollPane_3 = new JScrollPane(); pnlTabMissingDB2.add(scrollPane_3, BorderLayout.CENTER); - - lsMissDB2 = new JList(); + + lsMissDB2 = new JList<>(); lsMissDB2.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + lsMissDB2.getSelectionModel().addListSelectionListener(new ListSelectionListener() { + @Override + public void valueChanged(ListSelectionEvent e) { + onSelection(lsMissDB2, e); + } + }); scrollPane_3.setViewportView(lsMissDB2); - + pnlTabDifferentFiles = new JPanel(); - tabPnlMain.addTab("Different Files", null, pnlTabDifferentFiles, null); + tabPnlMain.addTab(LocaleBundle.getString("CompareDatabaseFrame.tabPnlMain.differentfiles.caption"), null, pnlTabDifferentFiles, null); //$NON-NLS-1$ pnlTabDifferentFiles.setLayout(new BorderLayout(0, 0)); - + scrollPane_4 = new JScrollPane(); pnlTabDifferentFiles.add(scrollPane_4, BorderLayout.CENTER); - - lsDiffFiles = new JList(); + + lsDiffFiles = new JList<>(); lsDiffFiles.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + lsDiffFiles.getSelectionModel().addListSelectionListener(new ListSelectionListener() { + @Override + public void valueChanged(ListSelectionEvent e) { + onSelection(lsDiffFiles, e); + } + }); scrollPane_4.setViewportView(lsDiffFiles); - + pnlTabDifferentCover = new JPanel(); - tabPnlMain.addTab("Different Cover", null, pnlTabDifferentCover, null); + tabPnlMain.addTab(LocaleBundle.getString("CompareDatabaseFrame.tabPnlMain.differentcovers.caption"), null, pnlTabDifferentCover, null); //$NON-NLS-1$ pnlTabDifferentCover.setLayout(new BorderLayout(0, 0)); - + scrollPane_5 = new JScrollPane(); pnlTabDifferentCover.add(scrollPane_5, BorderLayout.CENTER); - - lsDiffCover = new JList(); + + lsDiffCover = new JList<>(); lsDiffCover.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + lsDiffCover.getSelectionModel().addListSelectionListener(new ListSelectionListener() { + @Override + public void valueChanged(ListSelectionEvent e) { + onSelection(lsDiffCover, e); + } + }); scrollPane_5.setViewportView(lsDiffCover); - + pnlInfo = new JPanel(); - pnlMain.add(pnlInfo, "3, 1, fill, fill"); + pnlMain.add(pnlInfo, "3, 1, fill, fill"); //$NON-NLS-1$ pnlInfo.setLayout(new GridLayout(2, 1, 0, 0)); - + pnlInfoDB1 = new JPanel(); pnlInfo.add(pnlInfoDB1); pnlInfoDB1.setLayout(new FormLayout(new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, - ColumnSpec.decode("default:grow"), - FormFactory.RELATED_GAP_COLSPEC, - FormFactory.DEFAULT_COLSPEC, + ColumnSpec.decode("default:grow"), //$NON-NLS-1$ FormFactory.RELATED_GAP_COLSPEC,}, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, @@ -292,43 +329,37 @@ public void actionPerformed(ActionEvent e) { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, - RowSpec.decode("default:grow"), + RowSpec.decode("default:grow"), //$NON-NLS-1$ FormFactory.RELATED_GAP_ROWSPEC,})); - - lblDatabase_1 = new JLabel("Database 1"); - lblDatabase_1.setFont(new Font("Tahoma", Font.BOLD, 11)); + + lblDatabase_1 = new JLabel(LocaleBundle.getString("CompareDatabaseFrame.LblDatabase1.text")); //$NON-NLS-1$ + lblDatabase_1.setFont(new Font("Tahoma", Font.BOLD, 11)); //$NON-NLS-1$ lblDatabase_1.setHorizontalAlignment(SwingConstants.CENTER); - pnlInfoDB1.add(lblDatabase_1, "2, 2, 5, 1"); - - lblZyklusUndTitle = new JLabel("ZYKLUS UND TITLE"); - lblZyklusUndTitle.setHorizontalAlignment(SwingConstants.CENTER); - pnlInfoDB1.add(lblZyklusUndTitle, "2, 4, 5, 1"); - - lblChecksumFile = new JLabel("Checksum File"); - pnlInfoDB1.add(lblChecksumFile, "2, 6"); - - lblCheckSumDB1File = new JLabel("AAAAAAAAAAAAAAAA"); - pnlInfoDB1.add(lblCheckSumDB1File, "4, 6"); - - lblChecksumCover = new JLabel("Checksum Cover"); - pnlInfoDB1.add(lblChecksumCover, "2, 8"); - - lblDB1Cover = new JLabel(""); - lblDB1Cover.setIcon(new ImageIcon("C:\\Users\\ZEUS\\Eigene EDV\\java\\Eclipse\\workspace\\jClipCorn\\data\\cvr sml.png")); - pnlInfoDB1.add(lblDB1Cover, "6, 6, 1, 5, right, bottom"); - - lblCheckSumDB1Cover = new JLabel("AAAAAAAAAAAAAAAA"); - pnlInfoDB1.add(lblCheckSumDB1Cover, "4, 8"); - + pnlInfoDB1.add(lblDatabase_1, "2, 2, 3, 1"); //$NON-NLS-1$ + + lblNameDB1 = new JLabel(""); //$NON-NLS-1$ + lblNameDB1.setHorizontalAlignment(SwingConstants.CENTER); + pnlInfoDB1.add(lblNameDB1, "2, 4, 3, 1"); //$NON-NLS-1$ + + lblChecksumFile = new JLabel(LocaleBundle.getString("CompareDatabaseFrame.LblChecksumFile.text")); //$NON-NLS-1$ + pnlInfoDB1.add(lblChecksumFile, "2, 6"); //$NON-NLS-1$ + + lblCheckSumDB1File = new JLabel(""); //$NON-NLS-1$ + pnlInfoDB1.add(lblCheckSumDB1File, "4, 6"); //$NON-NLS-1$ + + lblChecksumCover = new JLabel(LocaleBundle.getString("CompareDatabaseFrame.LblChecksumCover.text")); //$NON-NLS-1$ + pnlInfoDB1.add(lblChecksumCover, "2, 8"); //$NON-NLS-1$ + + lblCheckSumDB1Cover = new JLabel(""); //$NON-NLS-1$ + pnlInfoDB1.add(lblCheckSumDB1Cover, "4, 8"); //$NON-NLS-1$ + pnlInfoDB2 = new JPanel(); pnlInfo.add(pnlInfoDB2); pnlInfoDB2.setLayout(new FormLayout(new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, - ColumnSpec.decode("default:grow"), - FormFactory.RELATED_GAP_COLSPEC, - FormFactory.DEFAULT_COLSPEC, + ColumnSpec.decode("default:grow"), //$NON-NLS-1$ FormFactory.RELATED_GAP_COLSPEC,}, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, @@ -340,104 +371,103 @@ public void actionPerformed(ActionEvent e) { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, - RowSpec.decode("default:grow"), + RowSpec.decode("default:grow"), //$NON-NLS-1$ FormFactory.RELATED_GAP_ROWSPEC,})); - - lblDatabase_2 = new JLabel("Database 2"); + + lblDatabase_2 = new JLabel(LocaleBundle.getString("CompareDatabaseFrame.LblDatabase2.text")); //$NON-NLS-1$ lblDatabase_2.setHorizontalAlignment(SwingConstants.CENTER); - lblDatabase_2.setFont(new Font("Tahoma", Font.BOLD, 11)); - pnlInfoDB2.add(lblDatabase_2, "2, 2, 5, 1"); - - label_1 = new JLabel("ZYKLUS UND TITLE"); - label_1.setHorizontalAlignment(SwingConstants.CENTER); - pnlInfoDB2.add(label_1, "2, 4, 5, 1"); - - label_2 = new JLabel("Checksum File"); - pnlInfoDB2.add(label_2, "2, 6"); - - lblCheckSumDB2File = new JLabel("AAAAAAAAAAAAAAAA"); - pnlInfoDB2.add(lblCheckSumDB2File, "4, 6"); - - label_3 = new JLabel("Checksum Cover"); - pnlInfoDB2.add(label_3, "2, 8"); - - lblCheckSumDB2Cover = new JLabel("AAAAAAAAAAAAAAAA"); - pnlInfoDB2.add(lblCheckSumDB2Cover, "4, 8"); + lblDatabase_2.setFont(new Font("Tahoma", Font.BOLD, 11)); //$NON-NLS-1$ + pnlInfoDB2.add(lblDatabase_2, "2, 2, 3, 1"); //$NON-NLS-1$ + + lblNameDB2 = new JLabel(""); //$NON-NLS-1$ + lblNameDB2.setHorizontalAlignment(SwingConstants.CENTER); + pnlInfoDB2.add(lblNameDB2, "2, 4, 3, 1"); //$NON-NLS-1$ + + label_2 = new JLabel(LocaleBundle.getString("CompareDatabaseFrame.LblChecksumFile.text")); //$NON-NLS-1$ + pnlInfoDB2.add(label_2, "2, 6"); //$NON-NLS-1$ + + lblCheckSumDB2File = new JLabel(""); //$NON-NLS-1$ + pnlInfoDB2.add(lblCheckSumDB2File, "4, 6"); //$NON-NLS-1$ + + label_3 = new JLabel(LocaleBundle.getString("CompareDatabaseFrame.LblChecksumCover.text")); //$NON-NLS-1$ + pnlInfoDB2.add(label_3, "2, 8"); //$NON-NLS-1$ + + lblCheckSumDB2Cover = new JLabel(""); //$NON-NLS-1$ + pnlInfoDB2.add(lblCheckSumDB2Cover, "4, 8"); //$NON-NLS-1$ - label_6 = new JLabel(""); - label_6.setIcon(new ImageIcon("C:\\Users\\ZEUS\\Eigene EDV\\java\\Eclipse\\workspace\\jClipCorn\\data\\cvr sml.png")); - pnlInfoDB2.add(label_6, "6, 6, 1, 5"); + setSize(850, 500); } - + private void initFileChooser() { fchooser = new JFileChooser(PathFormatter.getRealSelfDirectory()); - - fchooser.setFileFilter(FileChooserHelper.createFileFilter("jClipcorn-Compare-File (*.jcccf)", EXTENSION)); - + + fchooser.setFileFilter(FileChooserHelper.createFileFilter("jClipcorn-Compare-File (*.jcccf)", EXTENSION)); //$NON-NLS-1$ + fchooser.setAcceptAllFileFilterUsed(false); } - + private void openFile1() { if (fchooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { edDB1.setText(fchooser.getSelectedFile().getAbsolutePath()); } } - + private void openFile2() { if (fchooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { edDB2.setText(fchooser.getSelectedFile().getAbsolutePath()); } } - + private void saveCompareFile() { if (fchooser.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) { String path = fchooser.getSelectedFile().getAbsolutePath(); - - if (! StringUtils.endsWithIgnoreCase(path, '.' + EXTENSION)) { + + if (!StringUtils.endsWithIgnoreCase(path, '.' + EXTENSION)) { path += '.' + EXTENSION; } - + setEnabled(false); - + progressBar.setMaximum(movielist.getElementCount()); progressBar.setValue(0); - + final String fpath = path; - + Thread t = new Thread(new Runnable() { @Override public void run() { generateCompareFile(fpath); - + SwingUtilities.invokeLater(new Runnable() { @Override public void run() { CompareDatabaseFrame.this.setEnabled(true); + progressBar.setValue(0); } }); } }); - + t.start(); } } - + @SuppressWarnings("nls") private void generateCompareFile(String path) { Document xml = new Document(new Element("database")); - + Element root = xml.getRootElement(); - + root.setAttribute("version", Main.VERSION); root.setAttribute("dbversion", Main.DBVERSION); root.setAttribute("date", new CCDate().getSimpleStringRepresentation()); root.setAttribute("elementcount", movielist.getElementCount() + ""); - - for (Iterator it = movielist.iteratorMovies(); it.hasNext();) { //TODO Optoin include series + + for (Iterator it = movielist.iteratorMovies(); it.hasNext();) { CCDatabaseElement del = it.next(); - + del.generateXML(root, true, true); - + SwingUtilities.invokeLater(new Runnable() { @Override public void run() { @@ -445,74 +475,100 @@ public void run() { } }); } - + XMLOutputter xout = new XMLOutputter(); xout.setFormat(Format.getPrettyFormat()); String xmlstring = xout.outputString(xml); - + try { TextFileUtils.writeTextFile(path, xmlstring); } catch (IOException e) { CCLog.addError(e); } } - + private void startCompare() { new Thread(new Runnable() { @Override public void run() { - final ArrayList l = DatabaseComparator.compare(new File(edDB1.getText()), new File(edDB1.getText()), progressBar); - + ArrayList l = null; + + try { + l = DatabaseComparator.compare(new File(edDB1.getText()), new File(edDB2.getText()), progressBar); + } catch (Exception e) { + CCLog.addError(e); + } + + final ArrayList fl = l; + SwingUtilities.invokeLater(new Runnable() { @Override public void run() { - updateGUI(l); + updateGUI(fl); } }); } }).start(); } - + private void updateGUI(ArrayList list) { - DefaultListModel lmDB1 = new DefaultListModel<>(); - DefaultListModel lmDB2 = new DefaultListModel<>(); - DefaultListModel lmMissDB1 = new DefaultListModel<>(); - DefaultListModel lmMissDB2 = new DefaultListModel<>(); - DefaultListModel lmDiffFiles = new DefaultListModel<>(); - DefaultListModel lmDiffCover = new DefaultListModel<>(); - + DefaultListModel lmDB1 = new DefaultListModel<>(); + DefaultListModel lmDB2 = new DefaultListModel<>(); + DefaultListModel lmMissDB1 = new DefaultListModel<>(); + DefaultListModel lmMissDB2 = new DefaultListModel<>(); + DefaultListModel lmDiffFiles = new DefaultListModel<>(); + DefaultListModel lmDiffCover = new DefaultListModel<>(); + lsDB1.setModel(lmDB1); lsDB2.setModel(lmDB2); lsMissDB1.setModel(lmMissDB1); lsMissDB2.setModel(lmMissDB2); lsDiffFiles.setModel(lmDiffFiles); lsDiffCover.setModel(lmDiffCover); - + for (int i = 0; i < list.size(); i++) { CompareElement cel = list.get(i); - + if (cel.isInDB1()) { - lmDB1.addElement(cel.getTitle()); + lmDB1.addElement(cel); } - + if (cel.isInDB2()) { - lmDB2.addElement(cel.getTitle()); + lmDB2.addElement(cel); } - - if (! cel.isInDB1()) { - lmMissDB1.addElement(cel.getTitle()); + + if (!cel.isInDB1()) { + lmMissDB1.addElement(cel); } - - if (! cel.isInDB2()) { - lmMissDB2.addElement(cel.getTitle()); + + if (!cel.isInDB2()) { + lmMissDB2.addElement(cel); } - + if (cel.isDifferentCover()) { - lmDiffCover.addElement(cel.getTitle()); + lmDiffCover.addElement(cel); } - + if (cel.isDifferentFiles()) { - lmDiffFiles.addElement(cel.getTitle()); + lmDiffFiles.addElement(cel); + } + } + } + + private void onSelection(JList list, ListSelectionEvent e) { + if (! e.getValueIsAdjusting()) { + CompareElement scel = list.getModel().getElementAt(e.getFirstIndex()); + + if (scel.isInDB1()) { + lblNameDB1.setText(scel.getCompleteTitle()); + lblCheckSumDB1File.setText(scel.getCS_File_DB1()); + lblCheckSumDB1Cover.setText(scel.getCS_Cover_DB1()); + } + + if (scel.isInDB2()) { + lblNameDB2.setText(scel.getCompleteTitle()); + lblCheckSumDB2File.setText(scel.getCS_File_DB2()); + lblCheckSumDB2Cover.setText(scel.getCS_Cover_DB2()); } } } diff --git a/src/de/jClipCorn/gui/frames/compareDatabaseFrame/CompareElement.java b/src/de/jClipCorn/gui/frames/compareDatabaseFrame/CompareElement.java index faa9151f..900c9cd3 100644 --- a/src/de/jClipCorn/gui/frames/compareDatabaseFrame/CompareElement.java +++ b/src/de/jClipCorn/gui/frames/compareDatabaseFrame/CompareElement.java @@ -51,6 +51,14 @@ public String getTitle() { return title; } + public String getCompleteTitle() { + if (zyklus.isSet()) { + return zyklus.getFormatted() + ' ' + '-' + ' ' + getTitle(); + } else { + return getTitle(); + } + } + public boolean isInDB1() { return cs_Cover_DB1 != null; } @@ -60,10 +68,15 @@ public boolean isInDB2() { } public boolean isDifferentCover() { - return isInDB1() && isInDB2() && cs_Cover_DB1.equals(cs_Cover_DB2); + return isInDB1() && isInDB2() && !cs_Cover_DB1.equals(cs_Cover_DB2); } public boolean isDifferentFiles() { - return isInDB1() && isInDB2() && cs_File_DB1.equals(cs_File_DB2); + return isInDB1() && isInDB2() && !cs_File_DB1.equals(cs_File_DB2); + } + + @Override + public String toString() { + return getCompleteTitle(); } } diff --git a/src/de/jClipCorn/gui/frames/compareDatabaseFrame/DatabaseComparator.java b/src/de/jClipCorn/gui/frames/compareDatabaseFrame/DatabaseComparator.java index fc20d001..3306d4da 100644 --- a/src/de/jClipCorn/gui/frames/compareDatabaseFrame/DatabaseComparator.java +++ b/src/de/jClipCorn/gui/frames/compareDatabaseFrame/DatabaseComparator.java @@ -17,7 +17,7 @@ public class DatabaseComparator { @SuppressWarnings("nls") - public static ArrayList compare(File db1f, File db2f, final JProgressBar prog) { + public static ArrayList compare(File db1f, File db2f, final JProgressBar prog) throws Exception{ ArrayList resultlist = new ArrayList<>(); SAXBuilder builder = new SAXBuilder(); @@ -34,7 +34,7 @@ public static ArrayList compare(File db1f, File db2f, final JPro } Element root1 = db1.getRootElement(); - Element root2 = db1.getRootElement(); + Element root2 = db2.getRootElement(); final List childs1 = root1.getChildren(); final List childs2 = root2.getChildren(); @@ -77,6 +77,13 @@ public void run() { stepBar(prog); } + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + prog.setValue(0); + } + }); + return resultlist; } diff --git a/src/de/jClipCorn/gui/localization/locale.properties b/src/de/jClipCorn/gui/localization/locale.properties index 028f4db2..eabc22e3 100644 --- a/src/de/jClipCorn/gui/localization/locale.properties +++ b/src/de/jClipCorn/gui/localization/locale.properties @@ -242,6 +242,7 @@ ClipMenuBar.Database.CheckDB = validate Database ClipMenuBar.Database.ClearDB = Clear Database ClipMenuBar.Database.ExportDB = Export Database as *.jxmlbkp ClipMenuBar.Extras = Extras +ClipMenuBar.Extras.CompareDBs = Datenbanken vergleichen ClipMenuBar.Extras.MassChangeScore = Mass Change Score ClipMenuBar.Extras.MassChangeViewed = Mass Change Viewed ClipMenuBar.Extras.ResetViewed = Reset All Viewed-States @@ -296,6 +297,20 @@ ClipTableModel.Title = Filmtitel ClipTableModel.Year = Jahr ClipTableModel.Zyklus = Zyklus +CompareDatabaseFrame.BtnCompare.text = Compare +CompareDatabaseFrame.BtnGenerateCompareFile.text = Generate compare file +CompareDatabaseFrame.LblChecksumCover.text = Checksum of Cover +CompareDatabaseFrame.LblChecksumFile.text = Checksum of File +CompareDatabaseFrame.LblDatabase1.text = Database 1 +CompareDatabaseFrame.LblDatabase2.text = Database 2 +CompareDatabaseFrame.tabPnlMain.database1.caption = Database 1 +CompareDatabaseFrame.tabPnlMain.database2.caption = Database 2 +CompareDatabaseFrame.tabPnlMain.differentcovers.caption = Different covers +CompareDatabaseFrame.tabPnlMain.differentfiles.caption = Different files +CompareDatabaseFrame.tabPnlMain.missingdb1.caption = Missing in DB 1 +CompareDatabaseFrame.tabPnlMain.missingdb2.caption = Missing in DB 2 +CompareDatabaseFrame.this.title = Compare Databases + Dialogs.ClearDatabase = M\u00F6chten sie wirklich die gesamte Datenbak l\u00F6schen? Dialogs.ClearDatabase_caption = Datenbank l\u00F6schen? Dialogs.DeleteEpisode = M\u00F6chsten sie diese Episode wirklich l\u00F6schen ? diff --git a/src/de/jClipCorn/gui/localization/locale_de_DE.properties b/src/de/jClipCorn/gui/localization/locale_de_DE.properties index fb5aa8fb..25f3fa5d 100644 --- a/src/de/jClipCorn/gui/localization/locale_de_DE.properties +++ b/src/de/jClipCorn/gui/localization/locale_de_DE.properties @@ -242,6 +242,7 @@ ClipMenuBar.Database.CheckDB = Datenbank \u00FCberpr\u00FCfen ClipMenuBar.Database.ClearDB = Datenbank leeren ClipMenuBar.Database.ExportDB = Datenbank als *.jxmlbkp exportieren ClipMenuBar.Extras = Extras +ClipMenuBar.Extras.CompareDBs = Datenbanken vergleichen ClipMenuBar.Extras.MassChangeScore = "Score" massenhaft \u00E4ndern ClipMenuBar.Extras.MassChangeViewed = "Gesehen" massenhaft \u00E4ndern ClipMenuBar.Extras.ResetViewed = "Gesehen"-Status allgemein zur\u00FCcksetzen @@ -296,6 +297,20 @@ ClipTableModel.Title = Filmtitel ClipTableModel.Year = Jahr ClipTableModel.Zyklus = Zyklus +CompareDatabaseFrame.BtnCompare.text = Vergleichen +CompareDatabaseFrame.BtnGenerateCompareFile.text = Vergleichsdatei erstellen +CompareDatabaseFrame.LblChecksumCover.text = Coverpr\u00FCfsumme +CompareDatabaseFrame.LblChecksumFile.text = Dateipr\u00FCfsumme +CompareDatabaseFrame.LblDatabase1.text = Datenbank 1 +CompareDatabaseFrame.LblDatabase2.text = Datenbank 2 +CompareDatabaseFrame.tabPnlMain.database1.caption = Datenbank 1 +CompareDatabaseFrame.tabPnlMain.database2.caption = Datenbank 2 +CompareDatabaseFrame.tabPnlMain.differentcovers.caption = Verschiedene Cover +CompareDatabaseFrame.tabPnlMain.differentfiles.caption = Verschiedene Dateien +CompareDatabaseFrame.tabPnlMain.missingdb1.caption = In DB 1 fehlend +CompareDatabaseFrame.tabPnlMain.missingdb2.caption = In DB 2 fehlend +CompareDatabaseFrame.this.title = Datenbanken vergleichen + Dialogs.ClearDatabase = M\u00F6chten sie wirklich die gesamte Datenbak l\u00F6schen? Dialogs.ClearDatabase_caption = Datenbank l\u00F6schen? Dialogs.DeleteEpisode = M\u00F6chsten sie diese Episode wirklich l\u00F6schen ? diff --git a/src/de/jClipCorn/gui/localization/locale_dl_DL.properties b/src/de/jClipCorn/gui/localization/locale_dl_DL.properties index 1d3645fc..e8b4668c 100644 --- a/src/de/jClipCorn/gui/localization/locale_dl_DL.properties +++ b/src/de/jClipCorn/gui/localization/locale_dl_DL.properties @@ -242,6 +242,7 @@ ClipMenuBar.Database.CheckDB = validate Database ClipMenuBar.Database.ClearDB = Clear Database ClipMenuBar.Database.ExportDB = Export Database as *.jxmlbkp ClipMenuBar.Extras = Extras +ClipMenuBar.Extras.CompareDBs = Compare Databases ClipMenuBar.Extras.MassChangeScore = Mass Change Score ClipMenuBar.Extras.MassChangeViewed = Mass Change Viewed ClipMenuBar.Extras.ResetViewed = Reset All Viewed-States @@ -296,6 +297,20 @@ ClipTableModel.Title = Filmtitel ClipTableModel.Year = Jahr ClipTableModel.Zyklus = Zyklus +CompareDatabaseFrame.BtnCompare.text = Vergleichen +CompareDatabaseFrame.BtnGenerateCompareFile.text = Vergleichsdatei erstellen +CompareDatabaseFrame.LblChecksumCover.text = Coverpr\u00FCfsumme +CompareDatabaseFrame.LblChecksumFile.text = Dateipr\u00FCfsumme +CompareDatabaseFrame.LblDatabase1.text = Datenbank 1 +CompareDatabaseFrame.LblDatabase2.text = Datenbank 2 +CompareDatabaseFrame.tabPnlMain.database1.caption = Datenbank 1 +CompareDatabaseFrame.tabPnlMain.database2.caption = Datenbank 2 +CompareDatabaseFrame.tabPnlMain.differentcovers.caption = Verschiedene Cover +CompareDatabaseFrame.tabPnlMain.differentfiles.caption = Verschiedene Dateien +CompareDatabaseFrame.tabPnlMain.missingdb1.caption = In DB 1 fehlend +CompareDatabaseFrame.tabPnlMain.missingdb2.caption = In DB 2 fehlend +CompareDatabaseFrame.this.title = Datenbanken vergleichen + Dialogs.ClearDatabase = M\u00F6chten sie wirklich die gesamte Datenbak l\u00F6schen? Dialogs.ClearDatabase_caption = Datenbank l\u00F6schen? Dialogs.DeleteEpisode = M\u00F6chsten sie diese Episode wirklich l\u00F6schen ? diff --git a/src/de/jClipCorn/gui/localization/locale_en_US.properties b/src/de/jClipCorn/gui/localization/locale_en_US.properties index 1fbb8fb5..cf733fac 100644 --- a/src/de/jClipCorn/gui/localization/locale_en_US.properties +++ b/src/de/jClipCorn/gui/localization/locale_en_US.properties @@ -242,6 +242,7 @@ ClipMenuBar.Database.CheckDB = validate Database ClipMenuBar.Database.ClearDB = Clear Database ClipMenuBar.Database.ExportDB = Export Database as *.jxmlbkp ClipMenuBar.Extras = Extras +ClipMenuBar.Extras.CompareDBs = Compare Databases ClipMenuBar.Extras.MassChangeScore = Mass Change Score ClipMenuBar.Extras.MassChangeViewed = Mass Change Viewed ClipMenuBar.Extras.ResetViewed = Reset All Viewed-States @@ -296,6 +297,20 @@ ClipTableModel.Title = Title ClipTableModel.Year = Year ClipTableModel.Zyklus = Zyklus +CompareDatabaseFrame.BtnCompare.text = Compare +CompareDatabaseFrame.BtnGenerateCompareFile.text = Generate compare file +CompareDatabaseFrame.LblChecksumCover.text = Checksum of Cover +CompareDatabaseFrame.LblChecksumFile.text = Checksum of File +CompareDatabaseFrame.LblDatabase1.text = Database 1 +CompareDatabaseFrame.LblDatabase2.text = Database 2 +CompareDatabaseFrame.tabPnlMain.database1.caption = Database 1 +CompareDatabaseFrame.tabPnlMain.database2.caption = Database 2 +CompareDatabaseFrame.tabPnlMain.differentcovers.caption = Different covers +CompareDatabaseFrame.tabPnlMain.differentfiles.caption = Different files +CompareDatabaseFrame.tabPnlMain.missingdb1.caption = Missing in DB 1 +CompareDatabaseFrame.tabPnlMain.missingdb2.caption = Missing in DB 2 +CompareDatabaseFrame.this.title = Compare Databases + Dialogs.ClearDatabase = Are you sure to clear the whole Database? Dialogs.ClearDatabase_caption = Clear Database? Dialogs.DeleteEpisode = Are you sure you want to delete this Episode ? diff --git a/src/de/jClipCorn/util/parser/FilenameParser.java b/src/de/jClipCorn/util/parser/FilenameParser.java index d579bf81..24197d98 100644 --- a/src/de/jClipCorn/util/parser/FilenameParser.java +++ b/src/de/jClipCorn/util/parser/FilenameParser.java @@ -58,7 +58,7 @@ public void parse(String filepath) { String flang = mName.substring(mName.lastIndexOf(' ') + 1); String lang = ""; - if ((! flang.equals(mName)) && flang.startsWith("]") && flang.endsWith("[")) { + if ((! flang.equals(mName)) && flang.startsWith("[") && flang.endsWith("]")) { lang = flang.substring(1, flang.length() - 1); boolean succ = false; if (lang.equalsIgnoreCase("ENG")) { diff --git a/src/de/jClipCorn/util/userdataProblem/UserDataProblem.java b/src/de/jClipCorn/util/userdataProblem/UserDataProblem.java index ebfdc63c..a5dc9aca 100644 --- a/src/de/jClipCorn/util/userdataProblem/UserDataProblem.java +++ b/src/de/jClipCorn/util/userdataProblem/UserDataProblem.java @@ -32,6 +32,7 @@ public class UserDataProblem { public final static int PROBLEM_EPISODENUMBER_ALREADY_EXISTS = 16; public final static int PROBLEM_ZYKLUSORTITLE_HAS_LEADINGORTRAILING_SPACES = 17; public final static int PROBLEM_ZYKLUS_ALREADY_EXISTS = 18; + //TODO Zylus ends with an Roman Letter private final int pid; // Problem ID