Fixed most of the errors

This commit is contained in:
Zakary Timson 2019-01-28 22:10:29 -05:00
parent 2b3980c689
commit a8edc768e9
13 changed files with 38 additions and 159 deletions

View File

@ -1,14 +1,14 @@
#Fri Jun 29 23:27:23 EDT 2018
#Mon Jan 28 22:07:04 EST 2019
debug=false
resolution-y=600
port=
resolution-x=1120
metric=true
username=
allow-publish=false
large-units=false
URL=screenprintingsuppliescanada.com
resolution-x=1120
password=
temp-path=/temp/
port=
metric=true
large-units=false
data-path=/data/
data-URL=/formulaManagerData/
URL=screenprintingsuppliescanada.com
password=
resolution-y=600
username=

View File

@ -3,8 +3,6 @@
*/
package com.zakscode.FormulaManager;
import com.zakscode.FormulaManager.Main;
import com.zakscode.FormulaManager.TableArray;
import java.io.Serializable;
import java.text.DecimalFormat;
import java.util.Calendar;

View File

@ -3,14 +3,7 @@
*/
package com.zakscode.FormulaManager;
import com.zakscode.FormulaManager.Logger;
import com.zakscode.FormulaManager.Main;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.*;
import java.util.Properties;
public class Configuration

View File

@ -3,20 +3,13 @@
*/
package com.zakscode.FormulaManager;
import com.zakscode.FormulaManager.Component;
import com.zakscode.FormulaManager.ComponentQuantity;
import com.zakscode.FormulaManager.Configuration;
import com.zakscode.FormulaManager.FileManager;
import com.zakscode.FormulaManager.Formula;
import com.zakscode.FormulaManager.Logger;
import com.zakscode.FormulaManager.Main;
import com.zakscode.FormulaManager.Vendor;
import org.apache.pdfbox.pdmodel.PDDocument;
import java.io.File;
import java.io.PrintWriter;
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.Set;
import org.apache.pdfbox.pdmodel.PDDocument;
class Export {
private static final String HEADER = "<!DOCTYPE html><html><body><center><h1>FH &#38; Sons</h1></center>";
@ -37,7 +30,7 @@ class Export {
for (Object key : keysArray) {
html = html + (floatLeft ? "<div style=\"overflow: hidden;\">" : "") + "<div style=\"float: " + (floatLeft ? "left; " : "right; ") + "width: 45%; overflow: hidden; padding: 0px 20px 0px 20px\">";
html = html + "<p><strong style=\"float: left\">Name: </strong>" + (String)key + "</p>";
html = html + (key.trim().equals("") ? "<br />" : "");
html = html + (((String)key).trim().equals("") ? "<br />" : "");
html = html + "<p><strong style=\"float: left\">Phone: </strong> " + ((Vendor)v.get(key)).getPhone() + "</p>";
html = html + (((Vendor)v.get(key)).getPhone().trim().equals("") ? "<br />" : "");
html = html + "<p><strong style=\"float: left\">Email: </strong> " + ((Vendor)v.get(key)).getEmail() + "</p>";
@ -72,12 +65,12 @@ class Export {
for (Object key : keysArray) {
html = html + (floatLeft ? "<div style=\"overflow: hidden;\">" : "") + "<div style=\"float: " + (floatLeft ? "left; " : "right; ") + "width: 45%; overflow: hidden; padding: 0px 20px 0px 20px\">";
html = html + "<p><strong style=\"float: left\">Name:</strong> " + (String)key + "</p>";
html = html + (key.trim().equals("") ? "<br />" : "");
html = html + (((String)key).trim().equals("") ? "<br />" : "");
html = html + "<p><strong style=\"float: left\">Vendor:</strong> " + ((Component)c.get(key)).getVendor() + "</p>";
html = html + (((Component)c.get(key)).getVendor().trim().equals("") ? "<br />" : "");
html = html + "<p><strong style=\"float: left\">Description:</strong> " + ((Component)c.get(key)).getDescription() + "</p>";
html = html + (((Component)c.get(key)).getDescription().trim().equals("") ? "<br />" : "");
html = html + "<p><strong style=\"float: left\">Cost (per " + (Main.metric ? "kg" : "lb") + "): </strong> " + new DecimalFormat("$0.00").format(((Component)c.get(key)).getCost() / (double)(Main.metric ? true : true) ? 1 : 0) + "</p>";
html = html + "<p><strong style=\"float: left\">Cost (per " + (Main.metric ? "kg" : "lb") + "): </strong> " + new DecimalFormat("$0.00").format(((Component)c.get(key)).getCost() / (double)((Main.metric ? true : true) ? 1 : 0)) + "</p>";
html = html + "</div>" + (floatLeft ? "" : "</div><br />");
floatLeft = !floatLeft;
}

View File

@ -3,10 +3,8 @@
*/
package com.zakscode.FormulaManager;
import com.zakscode.FormulaManager.Configuration;
import com.zakscode.FormulaManager.Logger;
import com.zakscode.FormulaManager.Main;
import it.sauronsoftware.ftp4j.FTPClient;
import java.io.File;
public class FTPManager {

View File

@ -3,20 +3,8 @@
*/
package com.zakscode.FormulaManager;
import com.zakscode.FormulaManager.Configuration;
import com.zakscode.FormulaManager.Logger;
import com.zakscode.FormulaManager.Main;
import com.zakscode.FormulaManager.TableArray;
import java.io.EOFException;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.io.*;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
public class FileManager<T extends TableArray>
extends HashMap<String, T> {
@ -58,7 +46,7 @@ extends HashMap<String, T> {
public Object[][] toArray() {
Object[][] data = new Object[this.size()][];
int i = 0;
for (Map.Entry e : this.entrySet()) {
for (Entry e : this.entrySet()) {
data[i++] = ((TableArray)this.get(e.getKey())).toArray();
}
return data;

View File

@ -3,8 +3,6 @@
*/
package com.zakscode.FormulaManager;
import com.zakscode.FormulaManager.ComponentQuantity;
import com.zakscode.FormulaManager.TableArray;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Calendar;

View File

@ -3,88 +3,18 @@
*/
package com.zakscode.FormulaManager;
import com.zakscode.FormulaManager.Component;
import com.zakscode.FormulaManager.ComponentQuantity;
import com.zakscode.FormulaManager.Configuration;
import com.zakscode.FormulaManager.Export;
import com.zakscode.FormulaManager.FTPManager;
import com.zakscode.FormulaManager.FileManager;
import com.zakscode.FormulaManager.Formula;
import com.zakscode.FormulaManager.Main;
import com.zakscode.FormulaManager.Vendor;
import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Image;
import java.awt.LayoutManager;
import java.awt.Point;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.swing.AbstractAction;
import javax.swing.AbstractButton;
import javax.swing.Action;
import javax.swing.Box;
import javax.swing.ButtonGroup;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JCheckBoxMenuItem;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JRadioButtonMenuItem;
import javax.swing.JRootPane;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.KeyStroke;
import javax.swing.RowSorter;
import javax.swing.SpringLayout;
import javax.swing.UIManager;
import javax.swing.*;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
import javax.swing.table.TableModel;
import javax.swing.text.Document;
import java.awt.*;
import java.awt.event.*;
import java.text.DecimalFormat;
import java.util.*;
import java.util.stream.Collectors;
class Frame
extends JFrame {
class Frame extends JFrame {
private final JFrame frame;
private static final long serialVersionUID = 4919234897555589295L;
private JTable table;
@ -646,27 +576,27 @@ extends JFrame {
}
}
private static /* synthetic */ boolean lambda$updated$10(JTextField searchBar2, String key) {
private /* synthetic */ boolean lambda$updated$10(JTextField searchBar2, String key) {
return key.toLowerCase().contains(searchBar2.getText());
}
private static /* synthetic */ boolean lambda$updated$8(JTextField searchBar2, String key) {
private /* synthetic */ boolean lambda$updated$8(JTextField searchBar2, String key) {
return key.toLowerCase().contains(searchBar2.getText());
}
private static /* synthetic */ boolean lambda$updated$6(JTextField searchBar2, String key) {
private /* synthetic */ boolean lambda$updated$6(JTextField searchBar2, String key) {
return key.toLowerCase().contains(searchBar2.getText());
}
private static /* synthetic */ boolean lambda$updated$4(JTextField searchBar2, String key) {
private /* synthetic */ boolean lambda$updated$4(JTextField searchBar2, String key) {
return key.toLowerCase().contains(searchBar2.getText());
}
private static /* synthetic */ boolean lambda$updated$2(JTextField searchBar2, String key) {
private /* synthetic */ boolean lambda$updated$2(JTextField searchBar2, String key) {
return key.toLowerCase().contains(searchBar2.getText());
}
private static /* synthetic */ boolean lambda$updated$0(JTextField searchBar2, String key) {
private /* synthetic */ boolean lambda$updated$0(JTextField searchBar2, String key) {
return key.toLowerCase().contains(searchBar2.getText());
}
});

View File

@ -3,12 +3,9 @@
*/
package com.zakscode.FormulaManager;
import com.zakscode.FormulaManager.Configuration;
import com.zakscode.FormulaManager.Main;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.io.PrintStream;
class Logger {

View File

@ -3,30 +3,15 @@
*/
package com.zakscode.FormulaManager;
import com.zakscode.FormulaManager.Component;
import com.zakscode.FormulaManager.Configuration;
import com.zakscode.FormulaManager.FileManager;
import com.zakscode.FormulaManager.Formula;
import com.zakscode.FormulaManager.Frame;
import com.zakscode.FormulaManager.Logger;
import com.zakscode.FormulaManager.Vendor;
import java.awt.EventQueue;
import java.awt.Image;
import javax.swing.*;
import java.awt.*;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.nio.channels.Channels;
import java.nio.channels.FileChannel;
import java.nio.channels.ReadableByteChannel;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
class Main {
public static String baseDir;

View File

@ -3,7 +3,6 @@
*/
package com.zakscode.FormulaManager;
import com.zakscode.FormulaManager.TableArray;
import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;