|
@@ -1,369 +0,0 @@
|
|
|
-/*
|
|
|
- * To change this template, choose Tools | Templates
|
|
|
- * and open the template in the editor.
|
|
|
- */
|
|
|
-package de.nplusc.izc.iZpl.extensions;
|
|
|
-
|
|
|
-import de.nplusc.izc.tools.IOtools.FileTK;
|
|
|
-import de.nplusc.izc.tools.UiToolz.UiTools;
|
|
|
-import de.nplusc.izc.tools.baseTools.Messagers;
|
|
|
-import de.nplusc.izc.tools.baseTools.Tools;
|
|
|
-import java.io.File;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.HashMap;
|
|
|
-
|
|
|
-/**
|
|
|
- *
|
|
|
- * @author LH
|
|
|
- */
|
|
|
-public class Converter extends javax.swing.JFrame
|
|
|
-{
|
|
|
-
|
|
|
- /**
|
|
|
- * Creates new form Converter
|
|
|
- */
|
|
|
- public Converter()
|
|
|
- {
|
|
|
- initComponents();
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * This method is called from within the constructor to
|
|
|
- * initialize the form.
|
|
|
- * WARNING: Do NOT modify this code. The content of this method is
|
|
|
- * always regenerated by the Form Editor.
|
|
|
- */
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
- // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
|
|
- private void initComponents()
|
|
|
- {
|
|
|
-
|
|
|
- txfpath = new javax.swing.JTextField();
|
|
|
- selDir = new javax.swing.JButton();
|
|
|
- btnLoad = new javax.swing.JButton();
|
|
|
- btnAddList = new javax.swing.JButton();
|
|
|
- jButton2 = new javax.swing.JButton();
|
|
|
- jScrollPane1 = new javax.swing.JScrollPane();
|
|
|
- jTree1 = new javax.swing.JTree();
|
|
|
- jSeparator2 = new javax.swing.JSeparator();
|
|
|
- jButton1 = new javax.swing.JButton();
|
|
|
- jTextField1 = new javax.swing.JTextField();
|
|
|
- jTextField2 = new javax.swing.JTextField();
|
|
|
- jLabel2 = new javax.swing.JLabel();
|
|
|
- jLabel3 = new javax.swing.JLabel();
|
|
|
- jLabel4 = new javax.swing.JLabel();
|
|
|
- jCheckBox1 = new javax.swing.JCheckBox();
|
|
|
- jLabel5 = new javax.swing.JLabel();
|
|
|
- jCheckBox2 = new javax.swing.JCheckBox();
|
|
|
- jLabel6 = new javax.swing.JLabel();
|
|
|
- jSpinner1 = new javax.swing.JSpinner();
|
|
|
- jButton3 = new javax.swing.JButton();
|
|
|
- jLabel7 = new javax.swing.JLabel();
|
|
|
- jButton4 = new javax.swing.JButton();
|
|
|
- jButton5 = new javax.swing.JButton();
|
|
|
- jLabel1 = new javax.swing.JLabel();
|
|
|
- jSpinner2 = new javax.swing.JSpinner();
|
|
|
-
|
|
|
- setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
|
|
|
-
|
|
|
- selDir.setText("Liste speichern");
|
|
|
- selDir.addActionListener(new java.awt.event.ActionListener()
|
|
|
- {
|
|
|
- public void actionPerformed(java.awt.event.ActionEvent evt)
|
|
|
- {
|
|
|
- selDirActionPerformed(evt);
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- btnLoad.setText("Startliste laden");
|
|
|
- btnLoad.addActionListener(new java.awt.event.ActionListener()
|
|
|
- {
|
|
|
- public void actionPerformed(java.awt.event.ActionEvent evt)
|
|
|
- {
|
|
|
- btnLoadActionPerformed(evt);
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- btnAddList.setText("Liste hinzufügen");
|
|
|
-
|
|
|
- jButton2.setText("Liste entfernen");
|
|
|
-
|
|
|
- jScrollPane1.setViewportView(jTree1);
|
|
|
-
|
|
|
- jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL);
|
|
|
-
|
|
|
- jButton1.setText("Update");
|
|
|
-
|
|
|
- jTextField1.setText("jTextField1");
|
|
|
-
|
|
|
- jTextField2.setText("jTextField2");
|
|
|
-
|
|
|
- jLabel2.setText("Name");
|
|
|
-
|
|
|
- jLabel3.setText("Pfad");
|
|
|
-
|
|
|
- jLabel4.setText("Priorität");
|
|
|
-
|
|
|
- jLabel5.setText("Relativer Pfad");
|
|
|
-
|
|
|
- jLabel6.setText("Expandieren");
|
|
|
-
|
|
|
- jButton3.setText("Load Media data from file");
|
|
|
-
|
|
|
- jLabel7.setText("entfernt nur den include");
|
|
|
-
|
|
|
- jButton4.setText("Element entfernen");
|
|
|
-
|
|
|
- jButton5.setText("Element einfügen");
|
|
|
-
|
|
|
- jLabel1.setText("GruppenID");
|
|
|
-
|
|
|
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
|
|
- getContentPane().setLayout(layout);
|
|
|
- layout.setHorizontalGroup(
|
|
|
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
|
- .addGroup(layout.createSequentialGroup()
|
|
|
- .addContainerGap()
|
|
|
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
|
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
|
|
- .addComponent(btnLoad, javax.swing.GroupLayout.DEFAULT_SIZE, 321, Short.MAX_VALUE)
|
|
|
- .addComponent(selDir, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
|
- .addComponent(txfpath)
|
|
|
- .addComponent(jScrollPane1))
|
|
|
- .addGroup(layout.createSequentialGroup()
|
|
|
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
|
|
- .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
|
- .addComponent(btnAddList, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
|
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
|
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
|
- .addComponent(jLabel7)
|
|
|
- .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
|
- .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
|
|
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
|
- .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
|
- .addGap(18, 18, 18)
|
|
|
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
|
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
|
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
|
|
- .addComponent(jButton1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
|
- .addComponent(jButton3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
|
|
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
|
|
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
|
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
|
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
|
|
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
|
|
- .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 68, Short.MAX_VALUE)
|
|
|
- .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
|
|
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))
|
|
|
- .addGroup(layout.createSequentialGroup()
|
|
|
- .addComponent(jLabel4)
|
|
|
- .addGap(40, 40, 40)))
|
|
|
- .addGroup(layout.createSequentialGroup()
|
|
|
- .addComponent(jLabel1)
|
|
|
- .addGap(26, 26, 26)))
|
|
|
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
|
|
- .addComponent(jTextField2)
|
|
|
- .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE)
|
|
|
- .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
|
- .addComponent(jSpinner2, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
|
|
- .addGroup(layout.createSequentialGroup()
|
|
|
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
|
|
- .addGroup(layout.createSequentialGroup()
|
|
|
- .addComponent(jLabel5)
|
|
|
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))
|
|
|
- .addGroup(layout.createSequentialGroup()
|
|
|
- .addComponent(jLabel6)
|
|
|
- .addGap(18, 18, 18)))
|
|
|
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
|
|
- .addComponent(jCheckBox1)
|
|
|
- .addComponent(jCheckBox2))))
|
|
|
- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
|
|
- );
|
|
|
- layout.setVerticalGroup(
|
|
|
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
|
- .addGroup(layout.createSequentialGroup()
|
|
|
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
|
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
|
|
- .addContainerGap()
|
|
|
- .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 408, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
|
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
|
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
|
- .addComponent(btnAddList)
|
|
|
- .addComponent(jButton2))
|
|
|
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
|
|
- .addComponent(jLabel7)
|
|
|
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
|
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
|
- .addComponent(jButton4)
|
|
|
- .addComponent(jButton5))
|
|
|
- .addGap(15, 15, 15)
|
|
|
- .addComponent(btnLoad)
|
|
|
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
|
- .addComponent(selDir)
|
|
|
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
|
|
- .addComponent(txfpath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
|
- .addComponent(jSeparator2))
|
|
|
- .addContainerGap())
|
|
|
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
|
|
- .addGap(71, 71, 71)
|
|
|
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
|
- .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
|
- .addComponent(jLabel2))
|
|
|
- .addGap(18, 18, 18)
|
|
|
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
|
- .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
|
- .addComponent(jLabel3))
|
|
|
- .addGap(17, 17, 17)
|
|
|
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
|
- .addComponent(jLabel4)
|
|
|
- .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
|
- .addGap(18, 18, 18)
|
|
|
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
|
- .addComponent(jLabel1)
|
|
|
- .addComponent(jSpinner2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
|
- .addGap(18, 18, 18)
|
|
|
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
|
- .addComponent(jCheckBox1)
|
|
|
- .addComponent(jLabel5))
|
|
|
- .addGap(10, 10, 10)
|
|
|
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
|
- .addComponent(jLabel6)
|
|
|
- .addComponent(jCheckBox2))
|
|
|
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
|
|
- .addComponent(jButton3)
|
|
|
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
|
|
- .addComponent(jButton1)
|
|
|
- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
|
|
- );
|
|
|
-
|
|
|
- pack();
|
|
|
- }// </editor-fold>//GEN-END:initComponents
|
|
|
-
|
|
|
- private void selDirActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_selDirActionPerformed
|
|
|
- {//GEN-HEADEREND:event_selDirActionPerformed
|
|
|
- String p = Tools.FileChooseDlg(this, false, true, new String[]{});
|
|
|
- txfpath.setText(p);
|
|
|
- }//GEN-LAST:event_selDirActionPerformed
|
|
|
-
|
|
|
- private ArrayList<String> RootLists = new ArrayList<>();
|
|
|
- private HashMap<String,ArrayList<String>> Files = new HashMap<>();
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- private void btnLoadActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnLoadActionPerformed
|
|
|
- {//GEN-HEADEREND:event_btnLoadActionPerformed
|
|
|
- String p = Tools.FileChooseDlg(this, false, true, new String[]{});
|
|
|
- if(!new File(p+"\\editor.iZdefine").exists())
|
|
|
- {
|
|
|
- Messagers.SingleLineMsg("Error 0x0404: Kein initialisiertes Verzeichnis", "Okeeee......");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- ArrayList<String> filecnt = new ArrayList<>();
|
|
|
- String[] ftmp = FileTK.fileload(p+"\\editor.iZdefine");
|
|
|
- if(!(ftmp[0].equals("#IZDEFINE")))
|
|
|
- {
|
|
|
- Messagers.SingleLineMsg("Error 0x0001 :Fehlerhafte Statusdatei. ", "Okeeee......");
|
|
|
- return;
|
|
|
- }
|
|
|
- for (String l : ftmp)
|
|
|
- {
|
|
|
- if(!l.startsWith("#"))
|
|
|
- {
|
|
|
- filecnt.add(l);
|
|
|
- }
|
|
|
- }
|
|
|
- int rlcount = Integer.valueOf(filecnt.get(0).substring(10));
|
|
|
- for (int i = 1; i < rlcount; i++)
|
|
|
- {
|
|
|
- RootLists.add(filecnt.get(i));
|
|
|
- }
|
|
|
- /*
|
|
|
- #IZDEFINE
|
|
|
- #DO NOT MODIFY!!!!!
|
|
|
- #rootlists:count
|
|
|
- rootLists:2
|
|
|
- #soviele zeilen wie rootlist angibt
|
|
|
- root.iZpl
|
|
|
- rxe.iZpl
|
|
|
- */
|
|
|
- }
|
|
|
- }//GEN-LAST:event_btnLoadActionPerformed
|
|
|
-
|
|
|
- /**
|
|
|
- * @param args the command line arguments
|
|
|
- */
|
|
|
- public static void main(String args[])
|
|
|
- {
|
|
|
- /* Set the Nimbus look and feel */
|
|
|
- //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
|
|
|
- /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
|
|
|
- * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
|
|
|
- */
|
|
|
- try
|
|
|
- {
|
|
|
- for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
|
|
|
- {
|
|
|
- if ("Nimbus".equals(info.getName()))
|
|
|
- {
|
|
|
- javax.swing.UIManager.setLookAndFeel(info.getClassName());
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- catch (ClassNotFoundException ex)
|
|
|
- {
|
|
|
- java.util.logging.Logger.getLogger(Converter.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
|
|
- }
|
|
|
- catch (InstantiationException ex)
|
|
|
- {
|
|
|
- java.util.logging.Logger.getLogger(Converter.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
|
|
- }
|
|
|
- catch (IllegalAccessException ex)
|
|
|
- {
|
|
|
- java.util.logging.Logger.getLogger(Converter.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
|
|
- }
|
|
|
- catch (javax.swing.UnsupportedLookAndFeelException ex)
|
|
|
- {
|
|
|
- java.util.logging.Logger.getLogger(Converter.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
|
|
- }
|
|
|
- //</editor-fold>
|
|
|
-
|
|
|
- /* Create and display the form */
|
|
|
- java.awt.EventQueue.invokeLater(new Runnable()
|
|
|
- {
|
|
|
- public void run()
|
|
|
- {
|
|
|
- new Converter().setVisible(true);
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- // Variables declaration - do not modify//GEN-BEGIN:variables
|
|
|
- private javax.swing.JButton btnAddList;
|
|
|
- private javax.swing.JButton btnLoad;
|
|
|
- private javax.swing.JButton jButton1;
|
|
|
- private javax.swing.JButton jButton2;
|
|
|
- private javax.swing.JButton jButton3;
|
|
|
- private javax.swing.JButton jButton4;
|
|
|
- private javax.swing.JButton jButton5;
|
|
|
- private javax.swing.JCheckBox jCheckBox1;
|
|
|
- private javax.swing.JCheckBox jCheckBox2;
|
|
|
- private javax.swing.JLabel jLabel1;
|
|
|
- private javax.swing.JLabel jLabel2;
|
|
|
- private javax.swing.JLabel jLabel3;
|
|
|
- private javax.swing.JLabel jLabel4;
|
|
|
- private javax.swing.JLabel jLabel5;
|
|
|
- private javax.swing.JLabel jLabel6;
|
|
|
- private javax.swing.JLabel jLabel7;
|
|
|
- private javax.swing.JScrollPane jScrollPane1;
|
|
|
- private javax.swing.JSeparator jSeparator2;
|
|
|
- private javax.swing.JSpinner jSpinner1;
|
|
|
- private javax.swing.JSpinner jSpinner2;
|
|
|
- private javax.swing.JTextField jTextField1;
|
|
|
- private javax.swing.JTextField jTextField2;
|
|
|
- private javax.swing.JTree jTree1;
|
|
|
- private javax.swing.JButton selDir;
|
|
|
- private javax.swing.JTextField txfpath;
|
|
|
- // End of variables declaration//GEN-END:variables
|
|
|
-}
|