Browse Source

updated libraries, implemented most of interactive terminal (baby steps)

master
Thomas Withiam 4 years ago
parent
commit
0bbcea4df6
  1. BIN
      doc/neo4j-3.4.6-javadoc.jar
  2. BIN
      lib/jetty-http-9.4.11.v20180605.jar
  3. BIN
      lib/jetty-http-9.4.8.v20171121.jar
  4. BIN
      lib/jetty-io-9.4.11.v20180605.jar
  5. BIN
      lib/jetty-io-9.4.8.v20171121.jar
  6. BIN
      lib/jetty-security-9.4.11.v20180605.jar
  7. BIN
      lib/jetty-server-9.4.11.v20180605.jar
  8. BIN
      lib/jetty-server-9.4.8.v20171121.jar
  9. BIN
      lib/jetty-servlet-9.4.11.v20180605.jar
  10. BIN
      lib/jetty-servlet-9.4.8.v20171121.jar
  11. BIN
      lib/jetty-util-9.4.11.v20180605.jar
  12. BIN
      lib/jetty-util-9.4.8.v20171121.jar
  13. BIN
      lib/jetty-webapp-9.4.11.v20180605.jar
  14. BIN
      lib/jetty-webapp-9.4.8.v20171121.jar
  15. BIN
      lib/jetty-xml-9.4.11.v20180605.jar
  16. BIN
      lib/jetty-xml-9.4.8.v20171121.jar
  17. BIN
      lib/neo4j-bolt-3.4.6.jar
  18. BIN
      lib/neo4j-browser-3.2.5.jar
  19. BIN
      lib/neo4j-codegen-3.4.1.jar
  20. BIN
      lib/neo4j-codegen-3.4.6.jar
  21. BIN
      lib/neo4j-collections-3.4.6.jar
  22. BIN
      lib/neo4j-command-line-3.4.6.jar
  23. BIN
      lib/neo4j-common-3.4.6.jar
  24. BIN
      lib/neo4j-configuration-3.4.6.jar
  25. BIN
      lib/neo4j-consistency-check-3.4.6.jar
  26. BIN
      lib/neo4j-csv-3.4.6.jar
  27. BIN
      lib/neo4j-cypher-3.4.6.jar
  28. BIN
      lib/neo4j-cypher-compiler-3.1-3.1.9.jar
  29. BIN
      lib/neo4j-cypher-compiler-3.3-3.3.6.jar
  30. BIN
      lib/neo4j-cypher-expression-3.4-3.4.6.jar
  31. BIN
      lib/neo4j-cypher-frontend-3.1-3.1.9.jar
  32. BIN
      lib/neo4j-cypher-frontend-3.3-3.3.6.jar
  33. BIN
      lib/neo4j-cypher-interpreted-runtime-3.4.6.jar
  34. BIN
      lib/neo4j-cypher-ir-3.3-3.3.6.jar
  35. BIN
      lib/neo4j-cypher-ir-3.4-3.4.6.jar
  36. BIN
      lib/neo4j-cypher-logical-plans-3.3-3.3.6.jar
  37. BIN
      lib/neo4j-cypher-logical-plans-3.4-3.4.6.jar
  38. BIN
      lib/neo4j-cypher-planner-3.4-3.4.6.jar
  39. BIN
      lib/neo4j-cypher-planner-spi-3.4-3.4.6.jar
  40. BIN
      lib/neo4j-cypher-runtime-util-3.4.6.jar
  41. BIN
      lib/neo4j-cypher-util-3.4-3.4.6.jar
  42. BIN
      lib/neo4j-dbms-3.4.6.jar
  43. BIN
      lib/neo4j-graph-algo-3.4.6.jar
  44. BIN
      lib/neo4j-graph-matching-3.1.9.jar
  45. BIN
      lib/neo4j-graphdb-api-3.4.6.jar
  46. BIN
      lib/neo4j-import-tool-3.4.6.jar
  47. BIN
      lib/neo4j-index-3.4.6.jar
  48. BIN
      lib/neo4j-io-3.4.6.jar
  49. BIN
      lib/neo4j-jmx-3.4.6.jar
  50. BIN
      lib/neo4j-kernel-3.4.6.jar
  51. BIN
      lib/neo4j-kernel-api-3.4.6.jar
  52. BIN
      lib/neo4j-logging-3.4.6.jar
  53. BIN
      lib/neo4j-lucene-index-3.4.6.jar
  54. BIN
      lib/neo4j-lucene-upgrade-3.4.6.jar
  55. BIN
      lib/neo4j-primitive-collections-3.4.6.jar
  56. BIN
      lib/neo4j-procedure-api-3.4.6.jar
  57. BIN
      lib/neo4j-resource-3.4.6.jar
  58. BIN
      lib/neo4j-security-3.4.6.jar
  59. BIN
      lib/neo4j-server-3.4.6.jar
  60. BIN
      lib/neo4j-shell-3.4.6.jar
  61. BIN
      lib/neo4j-spatial-index-3.4.6.jar
  62. BIN
      lib/neo4j-ssl-3.4.6.jar
  63. BIN
      lib/neo4j-udc-3.4.6.jar
  64. BIN
      lib/neo4j-unsafe-3.4.6.jar
  65. BIN
      lib/neo4j-values-3.4.1.jar
  66. BIN
      lib/neo4j-values-3.4.6.jar
  67. BIN
      lib/openCypher-frontend-1-3.4.6.jar
  68. BIN
      lib/server-api-3.4.6.jar
  69. 2
      src/net/pop1040/InventoryManager/Database/DatabaseInterface.java
  70. 7
      src/net/pop1040/InventoryManager/Database/ITermQuerry.java
  71. 5
      src/net/pop1040/InventoryManager/Database/InternalDatabase.java
  72. 224
      src/net/pop1040/InventoryManager/GUI/Swing/MainWindow.java
  73. 34
      src/net/pop1040/InventoryManager/GUI/Swing/TerminalQuerry.java
  74. 7
      src/net/pop1040/InventoryManager/GUI/Swing/Util/ChangeType.java
  75. 10
      src/net/pop1040/InventoryManager/GUI/Swing/Util/IOnInput.java
  76. 3
      src/net/pop1040/InventoryManager/Tester.java

BIN
doc/neo4j-3.4.6-javadoc.jar

BIN
lib/jetty-http-9.4.11.v20180605.jar

BIN
lib/jetty-http-9.4.8.v20171121.jar

BIN
lib/jetty-io-9.4.11.v20180605.jar

BIN
lib/jetty-io-9.4.8.v20171121.jar

BIN
lib/jetty-security-9.4.8.v20171121.jar → lib/jetty-security-9.4.11.v20180605.jar

BIN
lib/jetty-server-9.4.11.v20180605.jar

BIN
lib/jetty-server-9.4.8.v20171121.jar

BIN
lib/jetty-servlet-9.4.11.v20180605.jar

BIN
lib/jetty-servlet-9.4.8.v20171121.jar

BIN
lib/jetty-util-9.4.11.v20180605.jar

BIN
lib/jetty-util-9.4.8.v20171121.jar

BIN
lib/jetty-webapp-9.4.11.v20180605.jar

BIN
lib/jetty-webapp-9.4.8.v20171121.jar

BIN
lib/jetty-xml-9.4.11.v20180605.jar

BIN
lib/jetty-xml-9.4.8.v20171121.jar

BIN
lib/neo4j-bolt-3.4.1.jar → lib/neo4j-bolt-3.4.6.jar

BIN
lib/neo4j-browser-3.1.14.jar → lib/neo4j-browser-3.2.5.jar

BIN
lib/neo4j-codegen-3.4.1.jar

BIN
lib/neo4j-codegen-3.4.6.jar

BIN
lib/neo4j-collections-3.4.1.jar → lib/neo4j-collections-3.4.6.jar

BIN
lib/neo4j-command-line-3.4.1.jar → lib/neo4j-command-line-3.4.6.jar

BIN
lib/neo4j-common-3.4.1.jar → lib/neo4j-common-3.4.6.jar

BIN
lib/neo4j-configuration-3.4.1.jar → lib/neo4j-configuration-3.4.6.jar

BIN
lib/neo4j-consistency-check-3.4.1.jar → lib/neo4j-consistency-check-3.4.6.jar

BIN
lib/neo4j-csv-3.4.1.jar → lib/neo4j-csv-3.4.6.jar

BIN
lib/neo4j-cypher-3.4.1.jar → lib/neo4j-cypher-3.4.6.jar

BIN
lib/neo4j-cypher-compiler-3.1-3.1.8.jar → lib/neo4j-cypher-compiler-3.1-3.1.9.jar

BIN
lib/neo4j-cypher-compiler-3.3-3.3.5.jar → lib/neo4j-cypher-compiler-3.3-3.3.6.jar

BIN
lib/neo4j-cypher-expression-3.4-3.4.1.jar → lib/neo4j-cypher-expression-3.4-3.4.6.jar

BIN
lib/neo4j-cypher-frontend-3.1-3.1.8.jar → lib/neo4j-cypher-frontend-3.1-3.1.9.jar

BIN
lib/neo4j-cypher-frontend-3.3-3.3.5.jar → lib/neo4j-cypher-frontend-3.3-3.3.6.jar

BIN
lib/neo4j-cypher-interpreted-runtime-3.4.1.jar → lib/neo4j-cypher-interpreted-runtime-3.4.6.jar

BIN
lib/neo4j-cypher-ir-3.3-3.3.5.jar → lib/neo4j-cypher-ir-3.3-3.3.6.jar

BIN
lib/neo4j-cypher-ir-3.4-3.4.1.jar → lib/neo4j-cypher-ir-3.4-3.4.6.jar

BIN
lib/neo4j-cypher-logical-plans-3.3-3.3.5.jar → lib/neo4j-cypher-logical-plans-3.3-3.3.6.jar

BIN
lib/neo4j-cypher-logical-plans-3.4-3.4.1.jar → lib/neo4j-cypher-logical-plans-3.4-3.4.6.jar

BIN
lib/neo4j-cypher-planner-3.4-3.4.1.jar → lib/neo4j-cypher-planner-3.4-3.4.6.jar

BIN
lib/neo4j-cypher-planner-spi-3.4-3.4.1.jar → lib/neo4j-cypher-planner-spi-3.4-3.4.6.jar

BIN
lib/neo4j-cypher-runtime-util-3.4.1.jar → lib/neo4j-cypher-runtime-util-3.4.6.jar

BIN
lib/neo4j-cypher-util-3.4-3.4.1.jar → lib/neo4j-cypher-util-3.4-3.4.6.jar

BIN
lib/neo4j-dbms-3.4.1.jar → lib/neo4j-dbms-3.4.6.jar

BIN
lib/neo4j-graph-algo-3.4.1.jar → lib/neo4j-graph-algo-3.4.6.jar

BIN
lib/neo4j-graph-matching-3.1.6.jar → lib/neo4j-graph-matching-3.1.9.jar

BIN
lib/neo4j-graphdb-api-3.4.1.jar → lib/neo4j-graphdb-api-3.4.6.jar

BIN
lib/neo4j-import-tool-3.4.1.jar → lib/neo4j-import-tool-3.4.6.jar

BIN
lib/neo4j-index-3.4.1.jar → lib/neo4j-index-3.4.6.jar

BIN
lib/neo4j-io-3.4.1.jar → lib/neo4j-io-3.4.6.jar

BIN
lib/neo4j-jmx-3.4.1.jar → lib/neo4j-jmx-3.4.6.jar

BIN
lib/neo4j-kernel-3.4.1.jar → lib/neo4j-kernel-3.4.6.jar

BIN
lib/neo4j-kernel-api-3.4.1.jar → lib/neo4j-kernel-api-3.4.6.jar

BIN
lib/neo4j-logging-3.4.1.jar → lib/neo4j-logging-3.4.6.jar

BIN
lib/neo4j-lucene-index-3.4.1.jar → lib/neo4j-lucene-index-3.4.6.jar

BIN
lib/neo4j-lucene-upgrade-3.4.1.jar → lib/neo4j-lucene-upgrade-3.4.6.jar

BIN
lib/neo4j-primitive-collections-3.4.1.jar → lib/neo4j-primitive-collections-3.4.6.jar

BIN
lib/neo4j-procedure-api-3.4.1.jar → lib/neo4j-procedure-api-3.4.6.jar

BIN
lib/neo4j-resource-3.4.1.jar → lib/neo4j-resource-3.4.6.jar

BIN
lib/neo4j-security-3.4.1.jar → lib/neo4j-security-3.4.6.jar

BIN
lib/neo4j-server-3.4.1.jar → lib/neo4j-server-3.4.6.jar

BIN
lib/neo4j-shell-3.4.1.jar → lib/neo4j-shell-3.4.6.jar

BIN
lib/neo4j-spatial-index-3.4.1.jar → lib/neo4j-spatial-index-3.4.6.jar

BIN
lib/neo4j-ssl-3.4.1.jar → lib/neo4j-ssl-3.4.6.jar

BIN
lib/neo4j-udc-3.4.1.jar → lib/neo4j-udc-3.4.6.jar

BIN
lib/neo4j-unsafe-3.4.1.jar → lib/neo4j-unsafe-3.4.6.jar

BIN
lib/neo4j-values-3.4.1.jar

BIN
lib/neo4j-values-3.4.6.jar

BIN
lib/openCypher-frontend-1-3.4.1.jar → lib/openCypher-frontend-1-3.4.6.jar

BIN
lib/server-api-3.4.1.jar → lib/server-api-3.4.6.jar

2
src/net/pop1040/InventoryManager/Database/DatabaseInterface.java

@ -14,4 +14,6 @@ public abstract class DatabaseInterface {
public abstract void setContainer(Item item, Item contaienr);
public abstract void postTerminalQuerry(ITermQuerry querry);
}

7
src/net/pop1040/InventoryManager/Database/ITermQuerry.java

@ -0,0 +1,7 @@
package net.pop1040.InventoryManager.Database;
public interface ITermQuerry extends Runnable{
public void setDatabase(DatabaseInterface db);
}

5
src/net/pop1040/InventoryManager/Database/InternalDatabase.java

@ -42,4 +42,9 @@ public class InternalDatabase extends DatabaseInterface {
}
@Override
public void postTerminalQuerry(ITermQuerry querry) {
new Thread(querry).start();
}
}

224
src/net/pop1040/InventoryManager/GUI/Swing/MainWindow.java

@ -3,27 +3,51 @@ package net.pop1040.InventoryManager.GUI.Swing;
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.Insets;
import java.awt.Toolkit;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.util.ArrayList;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.border.EmptyBorder;
//import javax.swing.border.EmptyBorder;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.text.BadLocationException;
import net.pop1040.InventoryManager.Database.DatabaseInterface;
import net.pop1040.InventoryManager.GUI.Swing.Util.ChangeType;
import net.pop1040.InventoryManager.GUI.Swing.Util.IOnInput;
public class MainWindow {
protected JFrame mainWindow;
protected static MainWindow instance;
protected DatabaseInterface db;
protected JFrame term;
//<--- Terminal history variables --->
protected ArrayList<String> termHistory;
protected int termHistoryDepth;
protected String termTempText;
public MainWindow() {
JPanel loadingPane = makeBorderPanel();
@ -32,8 +56,13 @@ public class MainWindow {
//lbl.setBorder(new EmptyBorder(300, 200, 300, 200));
loadingPane.add(lbl);
}
mainWindow = makeWindow(loadingPane, "Inventory", true, 400, 600, true, 320, 400);
mainWindow = makeWindow(loadingPane, "Inventory", true, 400, 600, true, 0, 0, 320, 400);
instance = this;
//<--- Terminal history variables --->
termHistory = new ArrayList<String>();
termHistoryDepth = -1;
termTempText = null;
}
public static void init() {
@ -54,7 +83,7 @@ public class MainWindow {
}
public static JFrame makeWindow(JPanel panel, String title, boolean exitOnClose, int prefX, int prefY, boolean centerOnStart, int minX, int minY) {
public static JFrame makeWindow(JPanel panel, String title, boolean exitOnClose, int prefX, int prefY, boolean centerOnStart, int xOff, int yOff, int minX, int minY) {
JFrame frame = new JFrame();
frame.setTitle(title);
frame.getContentPane().add(panel);
@ -106,20 +135,203 @@ public class MainWindow {
JScrollPane itemScrollPanel = new JScrollPane(itemPanel);
JPanel itemControl = new JPanel();
itemControl.add(newButton("Add item", (e)->{
itemControl.setLayout(new BorderLayout());
itemControl.add(b(newButton("Term", (e)->{
if(instance.term == null)openTerm(); //If the terminal isn't open, open it;
}), i(4)), BorderLayout.EAST);
itemControl.add(b(newButton("Add item", (e)->{
System.out.println("boop");
}));
}), i(4)));
JPanel itemSearch = new JPanel();
itemSearch.setLayout(new BorderLayout());
itemSearch.add(newButton("Search", (e)->{
itemSearch.add(b(newButton("Search", (e)->{
}), i(4)),BorderLayout.EAST);
itemSearch.add(b(a(a(new JTextField(), (e)->{
System.out.println(e);
}), (e, d, t) -> {
System.out.println(t.name() + " " + e);
System.out.println(d);
try {
System.out.println(d.getText(0, d.getLength()));
} catch (BadLocationException e1) {
e1.printStackTrace();
}
}),BorderLayout.EAST);
}), i(4)), BorderLayout.CENTER);
p.add(itemSearch, BorderLayout.NORTH);
p.add(itemScrollPanel, BorderLayout.CENTER);
p.add(itemControl, BorderLayout.SOUTH);
}
public static void openTerm() {
instance.term = makeWindow(makeTerm(), "Interactive Cypher Terminal", false, 400, 600, true, 50, 50, 300, 400);
instance.term.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
instance.term.addWindowListener(new WindowListener() {
public void windowOpened(WindowEvent e) {}
public void windowIconified(WindowEvent e) {}
public void windowDeiconified(WindowEvent e) {}
public void windowDeactivated(WindowEvent e) {}
@Override
public void windowClosing(WindowEvent e) {
instance.term.dispose();
instance.term = null;
}
public void windowClosed(WindowEvent e) {}
public void windowActivated(WindowEvent e) {}
});
}
private static JPanel makeTerm() {
JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
JPanel contents = new JPanel();
contents.setLayout(new BoxLayout(contents, BoxLayout.PAGE_AXIS));
JPanel padder = new JPanel(new BorderLayout());
padder.add(contents, BorderLayout.NORTH);
panel.add(new JScrollPane(padder), BorderLayout.CENTER);
JPanel input = new JPanel();
input.setLayout(new BorderLayout());
JTextField textfield = new JTextField();
textfield.addKeyListener(new KeyListener() {
public void keyTyped(KeyEvent e) {}
public void keyReleased(KeyEvent e) {}
@Override
public void keyPressed(KeyEvent e) {
switch(e.getKeyCode()){
case KeyEvent.VK_UP:{
if(instance.termHistoryDepth == -1) {
instance.termHistoryDepth = instance.termHistory.size()-1; //If the list is empty it ends up -1 anyways
if(instance.termHistoryDepth != -1)instance.termTempText = textfield.getText();
}else if(instance.termHistoryDepth > 0)instance.termHistoryDepth--;
break;
}
case KeyEvent.VK_DOWN:{
if(instance.termHistoryDepth < instance.termHistory.size()-1 && instance.termHistoryDepth >= 0)instance.termHistoryDepth++;
else instance.termHistoryDepth = -1;
break;
}
default:return; //if its not an arrow key don't do anything
}
if(instance.termHistoryDepth == -1) {
if(instance.termTempText!=null) {
textfield.setText(instance.termTempText);
instance.termTempText = null;
}
}else {
textfield.setText(instance.termHistory.get(instance.termHistoryDepth));
}
}
});
ActionListener submit = (e)->{
String q = textfield.getText();
textfield.setText("");
if(q.trim().equals(""))return; //No empty inputs
if(instance.termHistory.isEmpty())instance.termHistory.add(q); //Add to history if it isn't the last entered command
else if(!instance.termHistory.get(instance.termHistory.size()-1).equals(q))instance.termHistory.add(q);
instance.termHistoryDepth = -1;
final JPanel querryResult = new JPanel(new GridBagLayout());
JLabel querryResLabel = new JLabel("Loading...");
querryResult.add(querryResLabel, new GridBagConstraints(0, 0, 1, 0, 1, 0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
querryResult.add(a(new JButton("❌"), (ev)->{
contents.remove(querryResult);
contents.revalidate();
contents.repaint();
}), new GridBagConstraints(1, 0, 1, 0, 0, 0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));
contents.add(querryResult, contents.getComponentCount());
instance.db.postTerminalQuerry(new TerminalQuerry(contents, querryResult, querryResLabel, q));
contents.revalidate();
contents.repaint();
};
input.add(b(a(textfield, submit), i(4)), BorderLayout.CENTER);
input.add(b(newButton("submit", submit), i(4)), BorderLayout.EAST);
panel.add(input, BorderLayout.SOUTH);
return panel;
}
public static Insets i(int i) {
return new Insets(i, i, i, i);
}
public static Insets i(int i, int j) {
return new Insets(i, j, i, j);
}
public static Insets i(int i, int j, int k) {
return new Insets(i, j, k, j);
}
public static Insets i(int i, int j, int k, int l) {
return new Insets(i, j, k, l);
}
private static JComponent b(JComponent c, Insets i) {
//if(c.getBorder() != null)c.setBorder(new CompoundBorder(new CompoundBorder(new EmptyBorder(i, i, i, i), new LineBorder(Color.BLACK)), c.getBorder()));
//else c.setBorder(new EmptyBorder(i, i, i, i));
//System.out.println(c.getBorder().getBorderInsets(c));
JPanel p = new JPanel();
p.setLayout(new GridLayout(1, 1));
p.add(c);
p.setBorder(new EmptyBorder(i));
return p;
}
/**
* Add action listener convenience function
* @param f text field
* @param l action listener
* @return original text field
*/
public static JTextField a(JTextField f, ActionListener l) {
f.addActionListener(l);
return f;
}
public static JTextField a(JTextField f, IOnInput i) {
f.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void removeUpdate(DocumentEvent e) {
i.onInput(e, f.getDocument(), ChangeType.REMOVE);
}
@Override
public void insertUpdate(DocumentEvent e) {
i.onInput(e, f.getDocument(), ChangeType.INSERT);
}
@Override
public void changedUpdate(DocumentEvent e) {
i.onInput(e, f.getDocument(), ChangeType.CHANGE);
}
});
return f;
}
public static JButton a(JButton b, ActionListener ... actionListeners) {
for(ActionListener a : actionListeners)b.addActionListener(a);
return b;
}
private static JButton newButton(String label, ActionListener ... actionListeners) {
JButton b = new JButton(label);

34
src/net/pop1040/InventoryManager/GUI/Swing/TerminalQuerry.java

@ -0,0 +1,34 @@
package net.pop1040.InventoryManager.GUI.Swing;
import javax.swing.JLabel;
import javax.swing.JPanel;
import net.pop1040.InventoryManager.Database.DatabaseInterface;
import net.pop1040.InventoryManager.Database.ITermQuerry;
public class TerminalQuerry implements ITermQuerry{
JPanel contentsPanel;
JPanel querryResultPanel;
JLabel querryResLabel;
String querry;
DatabaseInterface db;
public TerminalQuerry(JPanel contents, JPanel querryResult, JLabel querryResLabel, String q) {
this.contentsPanel = contents;
this.querryResultPanel = querryResult;
this.querryResLabel = querryResLabel;
this.querry = q;
}
@Override
public void run() {
}
@Override
public void setDatabase(DatabaseInterface db) {
this.db = db;
}
}

7
src/net/pop1040/InventoryManager/GUI/Swing/Util/ChangeType.java

@ -0,0 +1,7 @@
package net.pop1040.InventoryManager.GUI.Swing.Util;
public enum ChangeType {
INSERT, REMOVE, CHANGE
}

10
src/net/pop1040/InventoryManager/GUI/Swing/Util/IOnInput.java

@ -0,0 +1,10 @@
package net.pop1040.InventoryManager.GUI.Swing.Util;
import javax.swing.event.DocumentEvent;
import javax.swing.text.Document;
public interface IOnInput {
public void onInput(DocumentEvent e, Document d, ChangeType t);
}

3
src/net/pop1040/InventoryManager/Tester.java

@ -4,7 +4,6 @@ import java.io.File;
import java.util.Map;
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Node;
import org.neo4j.graphdb.Result;
import org.neo4j.graphdb.factory.GraphDatabaseFactory;
@ -42,7 +41,7 @@ public class Tester {
}
}
private static String cat(Iterable<?> labels) {
public static String cat(Iterable<?> labels) {
StringBuilder b = new StringBuilder();
for(Object o : labels)b.append(o.toString() + ", ");
return b.toString();

Loading…
Cancel
Save