Fixed most of the errors
This commit is contained in:
parent
2b3980c689
commit
a8edc768e9
@ -1,14 +1,14 @@
|
|||||||
#Fri Jun 29 23:27:23 EDT 2018
|
#Mon Jan 28 22:07:04 EST 2019
|
||||||
debug=false
|
debug=false
|
||||||
resolution-y=600
|
allow-publish=false
|
||||||
port=
|
URL=screenprintingsuppliescanada.com
|
||||||
resolution-x=1120
|
resolution-x=1120
|
||||||
metric=true
|
password=
|
||||||
username=
|
temp-path=/temp/
|
||||||
allow-publish=false
|
port=
|
||||||
large-units=false
|
metric=true
|
||||||
temp-path=/temp/
|
large-units=false
|
||||||
data-path=/data/
|
data-path=/data/
|
||||||
data-URL=/formulaManagerData/
|
data-URL=/formulaManagerData/
|
||||||
URL=screenprintingsuppliescanada.com
|
resolution-y=600
|
||||||
password=
|
username=
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
package com.zakscode.FormulaManager;
|
package com.zakscode.FormulaManager;
|
||||||
|
|
||||||
import com.zakscode.FormulaManager.Main;
|
|
||||||
import com.zakscode.FormulaManager.TableArray;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
@ -3,14 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.zakscode.FormulaManager;
|
package com.zakscode.FormulaManager;
|
||||||
|
|
||||||
import com.zakscode.FormulaManager.Logger;
|
import java.io.*;
|
||||||
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.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
public class Configuration
|
public class Configuration
|
@ -3,20 +3,13 @@
|
|||||||
*/
|
*/
|
||||||
package com.zakscode.FormulaManager;
|
package com.zakscode.FormulaManager;
|
||||||
|
|
||||||
import com.zakscode.FormulaManager.Component;
|
import org.apache.pdfbox.pdmodel.PDDocument;
|
||||||
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 java.io.File;
|
import java.io.File;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import org.apache.pdfbox.pdmodel.PDDocument;
|
|
||||||
|
|
||||||
class Export {
|
class Export {
|
||||||
private static final String HEADER = "<!DOCTYPE html><html><body><center><h1>FH & Sons</h1></center>";
|
private static final String HEADER = "<!DOCTYPE html><html><body><center><h1>FH & Sons</h1></center>";
|
||||||
@ -37,7 +30,7 @@ class Export {
|
|||||||
for (Object key : keysArray) {
|
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 + (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 + "<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 + "<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 + (((Vendor)v.get(key)).getPhone().trim().equals("") ? "<br />" : "");
|
||||||
html = html + "<p><strong style=\"float: left\">Email: </strong> " + ((Vendor)v.get(key)).getEmail() + "</p>";
|
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) {
|
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 + (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 + "<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 + "<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 + (((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 + "<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 + (((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 />");
|
html = html + "</div>" + (floatLeft ? "" : "</div><br />");
|
||||||
floatLeft = !floatLeft;
|
floatLeft = !floatLeft;
|
||||||
}
|
}
|
@ -3,10 +3,8 @@
|
|||||||
*/
|
*/
|
||||||
package com.zakscode.FormulaManager;
|
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 it.sauronsoftware.ftp4j.FTPClient;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
public class FTPManager {
|
public class FTPManager {
|
@ -3,20 +3,8 @@
|
|||||||
*/
|
*/
|
||||||
package com.zakscode.FormulaManager;
|
package com.zakscode.FormulaManager;
|
||||||
|
|
||||||
import com.zakscode.FormulaManager.Configuration;
|
import java.io.*;
|
||||||
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.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
public class FileManager<T extends TableArray>
|
public class FileManager<T extends TableArray>
|
||||||
extends HashMap<String, T> {
|
extends HashMap<String, T> {
|
||||||
@ -58,7 +46,7 @@ extends HashMap<String, T> {
|
|||||||
public Object[][] toArray() {
|
public Object[][] toArray() {
|
||||||
Object[][] data = new Object[this.size()][];
|
Object[][] data = new Object[this.size()][];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (Map.Entry e : this.entrySet()) {
|
for (Entry e : this.entrySet()) {
|
||||||
data[i++] = ((TableArray)this.get(e.getKey())).toArray();
|
data[i++] = ((TableArray)this.get(e.getKey())).toArray();
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
@ -3,8 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
package com.zakscode.FormulaManager;
|
package com.zakscode.FormulaManager;
|
||||||
|
|
||||||
import com.zakscode.FormulaManager.ComponentQuantity;
|
|
||||||
import com.zakscode.FormulaManager.TableArray;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
@ -3,88 +3,18 @@
|
|||||||
*/
|
*/
|
||||||
package com.zakscode.FormulaManager;
|
package com.zakscode.FormulaManager;
|
||||||
|
|
||||||
import com.zakscode.FormulaManager.Component;
|
import javax.swing.*;
|
||||||
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.event.DocumentEvent;
|
import javax.swing.event.DocumentEvent;
|
||||||
import javax.swing.event.DocumentListener;
|
import javax.swing.event.DocumentListener;
|
||||||
import javax.swing.event.TableModelEvent;
|
|
||||||
import javax.swing.event.TableModelListener;
|
|
||||||
import javax.swing.table.DefaultTableCellRenderer;
|
import javax.swing.table.DefaultTableCellRenderer;
|
||||||
import javax.swing.table.DefaultTableModel;
|
import javax.swing.table.DefaultTableModel;
|
||||||
import javax.swing.table.TableCellRenderer;
|
import java.awt.*;
|
||||||
import javax.swing.table.TableColumn;
|
import java.awt.event.*;
|
||||||
import javax.swing.table.TableColumnModel;
|
import java.text.DecimalFormat;
|
||||||
import javax.swing.table.TableModel;
|
import java.util.*;
|
||||||
import javax.swing.text.Document;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
class Frame
|
class Frame extends JFrame {
|
||||||
extends JFrame {
|
|
||||||
private final JFrame frame;
|
private final JFrame frame;
|
||||||
private static final long serialVersionUID = 4919234897555589295L;
|
private static final long serialVersionUID = 4919234897555589295L;
|
||||||
private JTable table;
|
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());
|
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());
|
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());
|
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());
|
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());
|
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());
|
return key.toLowerCase().contains(searchBar2.getText());
|
||||||
}
|
}
|
||||||
});
|
});
|
@ -3,12 +3,9 @@
|
|||||||
*/
|
*/
|
||||||
package com.zakscode.FormulaManager;
|
package com.zakscode.FormulaManager;
|
||||||
|
|
||||||
import com.zakscode.FormulaManager.Configuration;
|
|
||||||
import com.zakscode.FormulaManager.Main;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.io.PrintStream;
|
import java.io.PrintStream;
|
||||||
|
|
||||||
class Logger {
|
class Logger {
|
@ -3,30 +3,15 @@
|
|||||||
*/
|
*/
|
||||||
package com.zakscode.FormulaManager;
|
package com.zakscode.FormulaManager;
|
||||||
|
|
||||||
import com.zakscode.FormulaManager.Component;
|
import javax.swing.*;
|
||||||
import com.zakscode.FormulaManager.Configuration;
|
import java.awt.*;
|
||||||
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 java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLConnection;
|
|
||||||
import java.nio.channels.Channels;
|
import java.nio.channels.Channels;
|
||||||
import java.nio.channels.FileChannel;
|
|
||||||
import java.nio.channels.ReadableByteChannel;
|
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 {
|
class Main {
|
||||||
public static String baseDir;
|
public static String baseDir;
|
@ -3,7 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
package com.zakscode.FormulaManager;
|
package com.zakscode.FormulaManager;
|
||||||
|
|
||||||
import com.zakscode.FormulaManager.TableArray;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
Loading…
Reference in New Issue
Block a user