Skip to content

Commit

Permalink
Added 'add file' function
Browse files Browse the repository at this point in the history
  • Loading branch information
Darius Musiolik authored and Darius Musiolik committed Mar 8, 2019
1 parent 30a3c6f commit ecf4f32
Show file tree
Hide file tree
Showing 14 changed files with 361 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/built-jar.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Fri, 08 Mar 2019 14:27:17 +0100
#Fri, 08 Mar 2019 14:39:22 +0100


/home/ldaphome/dmusiolik/git/LogShred=
Empty file.
Empty file.
Binary file modified build/classes/jshred/MainFrame$1.class
Binary file not shown.
Binary file modified build/classes/jshred/MainFrame$2.class
Binary file not shown.
Binary file modified build/classes/jshred/MainFrame$3.class
Binary file not shown.
Binary file modified build/classes/jshred/MainFrame$4.class
Binary file not shown.
Binary file added build/classes/jshred/MainFrame$5.class
Binary file not shown.
Binary file added build/classes/jshred/MainFrame$6.class
Binary file not shown.
Binary file modified build/classes/jshred/MainFrame.class
Binary file not shown.
285 changes: 285 additions & 0 deletions build/classes/jshred/MainFrame.form

Large diffs are not rendered by default.

Binary file modified dist/jshred.jar
Binary file not shown.
32 changes: 31 additions & 1 deletion src/jshred/MainFrame.form
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@
<?xml version="1.0" encoding="UTF-8" ?>

<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
<NonVisualComponents>
<Menu class="javax.swing.JMenuBar" name="jMenuBar1">
<SubComponents>
<Menu class="javax.swing.JMenu" name="jMenu1">
<Properties>
<Property name="text" type="java.lang.String" value="File"/>
</Properties>
<SubComponents>
<MenuItem class="javax.swing.JMenuItem" name="jMenuItem1">
<Properties>
<Property name="text" type="java.lang.String" value="Add file"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItem1ActionPerformed"/>
</Events>
</MenuItem>
<MenuItem class="javax.swing.JMenuItem" name="jMenuItem2">
<Properties>
<Property name="text" type="java.lang.String" value="Exit"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItem2ActionPerformed"/>
</Events>
</MenuItem>
</SubComponents>
</Menu>
</SubComponents>
</Menu>
</NonVisualComponents>
<Properties>
<Property name="defaultCloseOperation" type="int" value="3"/>
<Property name="title" type="java.lang.String" value="LogShred"/>
Expand All @@ -9,6 +38,7 @@
</Property>
</Properties>
<SyntheticProperties>
<SyntheticProperty name="menuBar" type="java.lang.String" value="jMenuBar1"/>
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
</SyntheticProperties>
Expand Down Expand Up @@ -90,7 +120,7 @@
<EmptySpace max="-2" attributes="0"/>
<Component id="jScrollPane2" min="-2" pref="127" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="jScrollPane1" pref="286" max="32767" attributes="0"/>
<Component id="jScrollPane1" pref="265" max="32767" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="jProgressBar1" max="32767" attributes="0"/>
Expand Down
45 changes: 44 additions & 1 deletion src/jshred/MainFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ private void initComponents() {
jList2 = new javax.swing.JList<>();
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jMenuBar1 = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu();
jMenuItem1 = new javax.swing.JMenuItem();
jMenuItem2 = new javax.swing.JMenuItem();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("LogShred");
Expand Down Expand Up @@ -147,7 +151,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 286, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 265, Short.MAX_VALUE)
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jProgressBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
Expand All @@ -158,6 +162,28 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addContainerGap())
);

jMenu1.setText("File");

jMenuItem1.setText("Add file");
jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem1ActionPerformed(evt);
}
});
jMenu1.add(jMenuItem1);

jMenuItem2.setText("Exit");
jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem2ActionPerformed(evt);
}
});
jMenu1.add(jMenuItem2);

jMenuBar1.add(jMenu1);

setJMenuBar(jMenuBar1);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
Expand Down Expand Up @@ -220,6 +246,7 @@ private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS
varlogsearch("cups/page_log", "CUPS Page Log");
jProgressBar1.setValue(40);
varlogsearch("dpkg.log", "DPKG Logfile");
varlogsearch("lastlog", "Lastlog");
jProgressBar1.setValue(50);
varlogsearch("faillog.log", "FAIL Logfile");
jProgressBar1.setValue(60);
Expand Down Expand Up @@ -251,6 +278,18 @@ private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS
// TODO add your handling code here:
}//GEN-LAST:event_jButton3ActionPerformed

private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
System.exit(0);
}//GEN-LAST:event_jMenuItem2ActionPerformed

private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
PurgeUs.addElement(JOptionPane.showInputDialog("Bitte geben sie den Pfad an:"));
jButton1.setEnabled(true);
jButton3.setEnabled(true);
jList1.ensureIndexIsVisible(PurgeUs.size() - 1);
jList2.ensureIndexIsVisible(JLData.size() - 1);
}//GEN-LAST:event_jMenuItem1ActionPerformed

/**
* @param args the command line arguments
*/
Expand Down Expand Up @@ -321,6 +360,10 @@ public void varlogsearch(String Name, String Bezeichnung) {
private javax.swing.JLabel jLabel2;
public static javax.swing.JList<String> jList1;
public static javax.swing.JList<String> jList2;
private javax.swing.JMenu jMenu1;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JMenuItem jMenuItem1;
private javax.swing.JMenuItem jMenuItem2;
private javax.swing.JPanel jPanel1;
private javax.swing.JProgressBar jProgressBar1;
private javax.swing.JScrollPane jScrollPane1;
Expand Down

0 comments on commit ecf4f32

Please sign in to comment.