Skip to content

Commit

Permalink
#4 Cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
amosshi committed Apr 17, 2021
1 parent 0fca0ff commit 373fdc5
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import java.awt.Font;
import java.awt.Frame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.BoxLayout;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import java.awt.Container;
import java.awt.Frame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ protected void generateTreeNodeChunkData(DefaultMutableTreeNode parent) {
4,
String.format("Blue x = %05d or %f", this.BlueX, this.BlueX_value))));
parent.add(new DefaultMutableTreeNode(new JTreeNodeFileComponent(
start += 4,
start + 4,
4,
String.format("Blue y = %05d or %f", this.BlueY, this.BlueY_value))));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static void endOfCentralDirectoryRecord(
String.format(".ZIP file comment length = %d", cde.ZipFileCommentLength))));
if (cde.ZipFileComment != null) {
nodeCDE.add(new DefaultMutableTreeNode(new JTreeNodeFileComponent(
position += 2,
position + 2,
cde.ZipFileComment.length,
".ZIP file comment")));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public static void localFileHeader(

// File data
if (lfh.CompressedSize > 0) {
parent.add(nodeLfh = new DefaultMutableTreeNode(new JTreeNodeFileComponent(
parent.add(new DefaultMutableTreeNode(new JTreeNodeFileComponent(
position,
(int) lfh.CompressedSize, // TODO - We are in danger of very big file longer than int value size.
"File data")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import java.awt.Font;
import java.awt.Frame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.BoxLayout;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import javax.swing.JTabbedPane;
import javax.swing.JTextPane;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.DefaultMutableTreeNode;
import org.freeinternals.commonlib.ui.HTMLKit;
import org.freeinternals.commonlib.ui.JBinaryViewer;
Expand Down Expand Up @@ -68,11 +67,8 @@ private void createAndShowGUI(JFrame top) {

// Construct class file viewer
final JTreeClassFile jTreeClassFile = new JTreeClassFile(this.classFile);
jTreeClassFile.addTreeSelectionListener(new TreeSelectionListener() {
@Override
public void valueChanged(final javax.swing.event.TreeSelectionEvent evt) {
jTreeClassFileSelectionChanged(evt);
}
jTreeClassFile.addTreeSelectionListener((final javax.swing.event.TreeSelectionEvent evt) -> {
jTreeClassFileSelectionChanged(evt);
});
final JPanelForTree panel = new JPanelForTree(jTreeClassFile, top);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import java.awt.BorderLayout;
import java.awt.Desktop;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
Expand Down

0 comments on commit 373fdc5

Please sign in to comment.