Cleaned up the code a little
All checks were successful
Locusworks Team/lsproject/pipeline/head This commit looks good
All checks were successful
Locusworks Team/lsproject/pipeline/head This commit looks good
This commit is contained in:
21
pom.xml
21
pom.xml
@ -22,6 +22,27 @@
|
|||||||
<target>1.8</target>
|
<target>1.8</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>shade</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<finalName>LSProject</finalName>
|
||||||
|
<shadedArtifactAttached>true</shadedArtifactAttached>
|
||||||
|
<transformers>
|
||||||
|
<transformer
|
||||||
|
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||||
|
<mainClass>net.locusworks.lsproject.driver.Program</mainClass>
|
||||||
|
</transformer>
|
||||||
|
</transformers>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
@ -28,17 +28,6 @@ public class Program {
|
|||||||
* and System.err are sent instead to a designated console window.
|
* and System.err are sent instead to a designated console window.
|
||||||
*/
|
*/
|
||||||
public static void setupStreams() {
|
public static void setupStreams() {
|
||||||
PrintStream errorStream = new PrintStream(new OutputStream() {
|
|
||||||
@Override
|
|
||||||
public void write(int c) throws IOException {
|
|
||||||
write(new byte[] { Byte.parseByte(Integer.toString(c)) });
|
|
||||||
}
|
|
||||||
|
|
||||||
public void write(byte[] b) {
|
|
||||||
console.writeError(new String(b));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
PrintStream outputStream = new PrintStream(new OutputStream() {
|
PrintStream outputStream = new PrintStream(new OutputStream() {
|
||||||
@Override
|
@Override
|
||||||
public void write(int c) throws IOException {
|
public void write(int c) throws IOException {
|
||||||
@ -50,7 +39,6 @@ public class Program {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//System.setErr(errorStream);
|
|
||||||
System.setOut(outputStream);
|
System.setOut(outputStream);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,6 @@ package net.locusworks.lsproject.gui;
|
|||||||
|
|
||||||
import java.awt.BorderLayout;
|
import java.awt.BorderLayout;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.GridLayout;
|
|
||||||
|
|
||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.JScrollPane;
|
import javax.swing.JScrollPane;
|
||||||
@ -12,106 +10,100 @@ import javax.swing.event.TableModelEvent;
|
|||||||
import javax.swing.event.TableModelListener;
|
import javax.swing.event.TableModelListener;
|
||||||
import javax.swing.table.TableModel;
|
import javax.swing.table.TableModel;
|
||||||
|
|
||||||
import net.locusworks.lsproject.driver.Program;
|
|
||||||
import net.locusworks.lsproject.object.Network;
|
import net.locusworks.lsproject.object.Network;
|
||||||
import net.locusworks.lsproject.object.Router;
|
import net.locusworks.lsproject.object.Router;
|
||||||
|
|
||||||
|
|
||||||
public class CostViewerWindow extends JPanel implements TableModelListener{
|
public class CostViewerWindow extends JPanel implements TableModelListener{
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 8571350255455457432L;
|
private static final long serialVersionUID = 8571350255455457432L;
|
||||||
private boolean DEBUG = false;
|
private Router router = null;
|
||||||
private Router router = null;
|
|
||||||
|
|
||||||
|
|
||||||
public CostViewerWindow(Router _router){
|
public CostViewerWindow(Router _router){
|
||||||
super(new BorderLayout());
|
super(new BorderLayout());
|
||||||
|
|
||||||
router = _router;
|
router = _router;
|
||||||
|
|
||||||
String[] columnNames = {"Connection",
|
String[] columnNames = {"Connection", "Cost"};
|
||||||
"Cost"};
|
|
||||||
|
|
||||||
int numberOfConnections = router.getConnections().size();
|
int numberOfConnections = router.getConnections().size();
|
||||||
|
|
||||||
Object data[][]= new Object[numberOfConnections][2];
|
Object data[][]= new Object[numberOfConnections][2];
|
||||||
|
|
||||||
for (int i = 0; i < numberOfConnections; i++){
|
for (int i = 0; i < numberOfConnections; i++){
|
||||||
|
|
||||||
String tempFirstParticipant = router.getConnections()
|
String tempFirstParticipant = router.getConnections()
|
||||||
.get(i).getFirstParticipantAddress();
|
.get(i).getFirstParticipantAddress();
|
||||||
|
|
||||||
String tempSecondParticipant = router.getConnections()
|
String tempSecondParticipant = router.getConnections()
|
||||||
.get(i).getSecondParticipantAddress();
|
.get(i).getSecondParticipantAddress();
|
||||||
|
|
||||||
if(tempFirstParticipant.equals(router.getIpAddress())){
|
if(tempFirstParticipant.equals(router.getIpAddress())){
|
||||||
data[i][0] = tempSecondParticipant;
|
data[i][0] = tempSecondParticipant;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
data[i][0] = tempFirstParticipant;
|
data[i][0] = tempFirstParticipant;
|
||||||
}
|
}
|
||||||
data[i][1] = router.getConnections().get(i).getCost();
|
data[i][1] = router.getConnections().get(i).getCost();
|
||||||
}
|
}
|
||||||
|
|
||||||
final JTable table = new JTable(data, columnNames);
|
final JTable table = new JTable(data, columnNames);
|
||||||
table.setPreferredScrollableViewportSize(new Dimension(300, 70));
|
table.setPreferredScrollableViewportSize(new Dimension(300, 70));
|
||||||
table.setFillsViewportHeight(true);
|
table.setFillsViewportHeight(true);
|
||||||
table.getModel().addTableModelListener(this);
|
table.getModel().addTableModelListener(this);
|
||||||
|
|
||||||
JScrollPane scrollPane = new JScrollPane(table);
|
JScrollPane scrollPane = new JScrollPane(table);
|
||||||
add(scrollPane);
|
add(scrollPane);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createGUI(){
|
public void createGUI(){
|
||||||
|
|
||||||
JFrame frame = new JFrame("Cost Viewer For Router " + router.getIpAddress());
|
JFrame frame = new JFrame("Cost Viewer For Router " + router.getIpAddress());
|
||||||
CostViewerWindow newContentPane = new CostViewerWindow(router);
|
CostViewerWindow newContentPane = new CostViewerWindow(router);
|
||||||
newContentPane.setOpaque(true);
|
newContentPane.setOpaque(true);
|
||||||
frame.setContentPane(newContentPane);
|
frame.setContentPane(newContentPane);
|
||||||
frame.pack();
|
frame.pack();
|
||||||
frame.setLocationRelativeTo(null);
|
frame.setLocationRelativeTo(null);
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tableChanged(TableModelEvent e) {
|
public void tableChanged(TableModelEvent e) {
|
||||||
if (e.getColumn() == 0) {
|
if (e.getColumn() == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int row = e.getFirstRow();
|
int row = e.getFirstRow();
|
||||||
int column = e.getColumn();
|
int column = e.getColumn();
|
||||||
TableModel model = (TableModel)e.getSource();
|
TableModel model = (TableModel)e.getSource();
|
||||||
Object data = model.getValueAt(row, column);
|
Object data = model.getValueAt(row, column);
|
||||||
|
|
||||||
final String otherRouterIp = model.getValueAt(row, 0).toString();
|
final String otherRouterIp = model.getValueAt(row, 0).toString();
|
||||||
|
|
||||||
final int oldCost = router.getConnectionByParticipant(router.getIpAddress(), otherRouterIp).getCost();
|
final int oldCost = router.getConnectionByParticipant(router.getIpAddress(), otherRouterIp).getCost();
|
||||||
int newCost = oldCost;
|
int newCost = oldCost;
|
||||||
try {
|
try {
|
||||||
newCost = Integer.parseInt(data.toString());
|
newCost = Integer.parseInt(data.toString());
|
||||||
|
|
||||||
if (newCost < 1 || newCost > 10){
|
if (newCost < 1 || newCost > 10){
|
||||||
System.out.println("Cost Has To Be Between 0 - 10");
|
System.out.println("Cost Has To Be Between 0 - 10");
|
||||||
|
|
||||||
newCost = oldCost;
|
newCost = oldCost;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
router.getConnectionByParticipant(
|
router.getConnectionByParticipant(router.getIpAddress(), otherRouterIp).setCost(newCost);
|
||||||
router.getIpAddress(), otherRouterIp).setCost(newCost);
|
Router otherRouter = Network.getInstance().getRouterByIp(otherRouterIp);
|
||||||
Router otherRouter = Network.getInstance().getRouterByIp(otherRouterIp);
|
otherRouter.getConnectionByParticipant(router.getIpAddress(), otherRouterIp).setCost(newCost);
|
||||||
otherRouter.getConnectionByParticipant(
|
} catch (NumberFormatException ex) {
|
||||||
router.getIpAddress(), otherRouterIp).setCost(newCost);
|
System.out.println("Invalid cost.");
|
||||||
}
|
}
|
||||||
catch (NumberFormatException ex) {
|
}
|
||||||
System.out.println("Invalid cost.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -360,9 +360,7 @@ public class RouterViewerWindow extends JFrame implements MouseListener,
|
|||||||
@Override public void keyPressed(KeyEvent e) {
|
@Override public void keyPressed(KeyEvent e) {
|
||||||
keys[e.getKeyCode()] = true;
|
keys[e.getKeyCode()] = true;
|
||||||
|
|
||||||
if (highlightedRouter != null &&
|
if (highlightedRouter != null && !highlightedRouter.equals("") && keys[KeyEvent.VK_DELETE]) {
|
||||||
!highlightedRouter.equals("") &&
|
|
||||||
keys[KeyEvent.VK_DELETE]) {
|
|
||||||
Network.getInstance().removeRouterByIp(highlightedRouter);
|
Network.getInstance().removeRouterByIp(highlightedRouter);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -375,7 +373,7 @@ public class RouterViewerWindow extends JFrame implements MouseListener,
|
|||||||
updateAllRouters();
|
updateAllRouters();
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (keys[KeyEvent.VK_S] && ((e.getModifiers() & KeyEvent.VK_CONTROL) == 0)) {
|
else if (keys[KeyEvent.VK_S] && ((e.getModifiersEx() & KeyEvent.VK_CONTROL) == 0)) {
|
||||||
try {
|
try {
|
||||||
Utility.saveNetwork();
|
Utility.saveNetwork();
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@ import javax.swing.JScrollPane;
|
|||||||
import javax.swing.JTable;
|
import javax.swing.JTable;
|
||||||
import javax.swing.table.AbstractTableModel;
|
import javax.swing.table.AbstractTableModel;
|
||||||
|
|
||||||
import net.locusworks.lsproject.driver.Program;
|
|
||||||
import net.locusworks.lsproject.object.Network;
|
import net.locusworks.lsproject.object.Network;
|
||||||
import net.locusworks.lsproject.object.Router;
|
import net.locusworks.lsproject.object.Router;
|
||||||
import net.locusworks.lsproject.object.helper.DijkstraCallback;
|
import net.locusworks.lsproject.object.helper.DijkstraCallback;
|
||||||
@ -17,181 +16,172 @@ import net.locusworks.lsproject.object.helper.DijkstraCallback;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RoutingTableWindow extends JFrame implements WindowListener {
|
public class RoutingTableWindow extends JFrame implements WindowListener {
|
||||||
private static final long serialVersionUID = 1768859322938299953L;
|
private static final long serialVersionUID = 1768859322938299953L;
|
||||||
|
|
||||||
private Router router = null;
|
private Router router = null;
|
||||||
private JTable table = null;
|
private JTable table = null;
|
||||||
private RoutingTableModel tableModel = new RoutingTableModel();
|
private RoutingTableModel tableModel = new RoutingTableModel();
|
||||||
private String set = "";
|
private String set = "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display a new routing table window.
|
* Display a new routing table window.
|
||||||
* @param _router
|
* @param _router
|
||||||
*/
|
*/
|
||||||
public RoutingTableWindow(Router _router) {
|
public RoutingTableWindow(Router _router) {
|
||||||
super("Routing table - " + _router.getIpAddress());
|
super("Routing table - " + _router.getIpAddress());
|
||||||
|
|
||||||
router = _router;
|
router = _router;
|
||||||
|
|
||||||
initializeComponents();
|
initializeComponents();
|
||||||
|
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the GUI components used by this window.
|
* Initialize the GUI components used by this window.
|
||||||
*/
|
*/
|
||||||
private void initializeComponents() {
|
private void initializeComponents() {
|
||||||
setLayout(new BorderLayout());
|
setLayout(new BorderLayout());
|
||||||
|
|
||||||
table = new JTable(tableModel);
|
table = new JTable(tableModel);
|
||||||
JScrollPane scrollPane = new JScrollPane(table);
|
JScrollPane scrollPane = new JScrollPane(table);
|
||||||
|
|
||||||
add(table.getTableHeader(), BorderLayout.PAGE_START);
|
add(table.getTableHeader(), BorderLayout.PAGE_START);
|
||||||
add(scrollPane, BorderLayout.CENTER);
|
add(scrollPane, BorderLayout.CENTER);
|
||||||
|
|
||||||
setSize(425, 200);
|
setSize(425, 200);
|
||||||
|
|
||||||
router.getRoutingTable().registerCallback(tableModel);
|
router.getRoutingTable().registerCallback(tableModel);
|
||||||
|
|
||||||
router.getRoutingTable().execute(router, null);
|
router.getRoutingTable().execute(router, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allow access to which router this window is displaying.
|
* Allow access to which router this window is displaying.
|
||||||
* @return Router object.
|
* @return Router object.
|
||||||
*/
|
*/
|
||||||
public Router getRouter() {
|
public Router getRouter() {
|
||||||
return router;
|
return router;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model used for displaying the routing table.
|
* Model used for displaying the routing table.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
private class RoutingTableModel extends AbstractTableModel implements DijkstraCallback {
|
private class RoutingTableModel extends AbstractTableModel implements DijkstraCallback {
|
||||||
private ArrayList<String> columnNames = new ArrayList<String>();
|
private ArrayList<String> columnNames = new ArrayList<String>();
|
||||||
private Object[][] data;
|
private Object[][] data;
|
||||||
private int currentRow = 0;
|
private int currentRow = 0;
|
||||||
|
|
||||||
public RoutingTableModel() {
|
public RoutingTableModel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Handle callback.
|
* Handle callback.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Override public void reset() {
|
@Override public void reset() {
|
||||||
set = router.getIpAddress();
|
set = router.getIpAddress();
|
||||||
columnNames.clear();
|
columnNames.clear();
|
||||||
currentRow = 0;
|
currentRow = 0;
|
||||||
|
|
||||||
columnNames.add("N'");
|
columnNames.add("N'");
|
||||||
columnNames.add(router.toString());
|
columnNames.add(router.toString());
|
||||||
for (Router r : Network.getInstance().getRouters()) {
|
for (Router r : Network.getInstance().getRouters()) {
|
||||||
if (r != router) {
|
if (r != router) {
|
||||||
columnNames.add(r.getIpAddress());
|
columnNames.add(r.getIpAddress());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fireTableStructureChanged();
|
fireTableStructureChanged();
|
||||||
|
|
||||||
data = new Object[Network.getInstance().getRouters().size()][columnNames.size()];
|
data = new Object[Network.getInstance().getRouters().size()][columnNames.size()];
|
||||||
|
|
||||||
for (int i = 0; i < data.length; i++) {
|
for (int i = 0; i < data.length; i++) {
|
||||||
for (int j =0; j < data[i].length; j++) {
|
for (int j =0; j < data[i].length; j++) {
|
||||||
data[i][j] = "";
|
data[i][j] = "";
|
||||||
fireTableCellUpdated(i, j);
|
fireTableCellUpdated(i, j);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setValueAt(set, 0, 0);
|
setValueAt(set, 0, 0);
|
||||||
|
|
||||||
fireTableDataChanged();
|
fireTableDataChanged();
|
||||||
|
|
||||||
System.out.println("Routing table " + router + " reset.");
|
System.out.println("Routing table " + router + " reset.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public void predecessorAdded(Router key, Router value) {
|
@Override public void predecessorAdded(Router key, Router value) {
|
||||||
if (key == router) return;
|
if (key == router) return;
|
||||||
final int columnIndex = getColumnByName(value.getIpAddress());
|
final int columnIndex = getColumnByName(value.getIpAddress());
|
||||||
|
|
||||||
setValueAt(key.getIpAddress() + "," + getValueAt(currentRow, columnIndex), currentRow, columnIndex);
|
setValueAt(key.getIpAddress() + "," + getValueAt(currentRow, columnIndex), currentRow, columnIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public void settledRouterAdded(Router r) {
|
@Override public void settledRouterAdded(Router r) {
|
||||||
if (set.contains(r.getIpAddress())) return;
|
if (set.contains(r.getIpAddress())) return;
|
||||||
|
|
||||||
currentRow++;
|
currentRow++;
|
||||||
|
|
||||||
set += (set.length() > 0 ? "," : "") + r.getIpAddress();
|
set += (set.length() > 0 ? "," : "") + r.getIpAddress();
|
||||||
|
|
||||||
final int rowIndex = set.split("\\,").length - 1;
|
final int rowIndex = set.split("\\,").length - 1;
|
||||||
|
|
||||||
setValueAt(set, rowIndex, 0);
|
setValueAt(set, rowIndex, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public void shortestDistanceUpdated(Router router, int cost) {
|
@Override public void shortestDistanceUpdated(Router router, int cost) {
|
||||||
final int column = getColumnByName(router.getIpAddress());
|
final int column = getColumnByName(router.getIpAddress());
|
||||||
|
|
||||||
setValueAt(cost, currentRow, column);
|
setValueAt(cost, currentRow, column);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Override AbstractTableModel functions.
|
* Override AbstractTableModel functions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Override public String getColumnName(int columnNumber) {
|
@Override public String getColumnName(int columnNumber) {
|
||||||
return columnNames.get(columnNumber);
|
return columnNames.get(columnNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getColumnByName(String columnName) {
|
public int getColumnByName(String columnName) {
|
||||||
for (int i = 0; i < columnNames.size(); i++) {
|
for (int i = 0; i < columnNames.size(); i++) {
|
||||||
if (columnNames.get(i).equals(columnName)) {
|
if (columnNames.get(i).equals(columnName)) {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRowByFirstCellName(String cellName) {
|
|
||||||
for (int i = 1; i < getRowCount(); i++) {
|
|
||||||
if (columnNames.get(i).endsWith(cellName)) {
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return -1;
|
@Override public int getColumnCount() {
|
||||||
}
|
return columnNames.size();
|
||||||
|
}
|
||||||
|
|
||||||
@Override public int getColumnCount() {
|
@Override public int getRowCount() {
|
||||||
return columnNames.size();
|
return data.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public int getRowCount() {
|
@Override public Object getValueAt(int rowIndex, int columnIndex) {
|
||||||
return data.length;
|
return data[rowIndex][columnIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public Object getValueAt(int rowIndex, int columnIndex) {
|
@Override public void setValueAt(Object value, int rowIndex, int columnIndex) {
|
||||||
return data[rowIndex][columnIndex];
|
data[rowIndex][columnIndex] = value;
|
||||||
}
|
|
||||||
|
|
||||||
@Override public void setValueAt(Object value, int rowIndex, int columnIndex) {
|
super.fireTableCellUpdated(rowIndex, columnIndex);
|
||||||
data[rowIndex][columnIndex] = value;
|
}
|
||||||
|
}
|
||||||
|
|
||||||
super.fireTableCellUpdated(rowIndex, columnIndex);
|
@Override public void windowClosing(WindowEvent e) {
|
||||||
}
|
router.getRoutingTable().unregisterCallback(tableModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public void windowClosing(WindowEvent e) {
|
@Override public void windowActivated(WindowEvent arg0) {}
|
||||||
router.getRoutingTable().unregisterCallback(tableModel);
|
@Override public void windowClosed(WindowEvent arg0) {}
|
||||||
}
|
@Override public void windowDeactivated(WindowEvent arg0) {}
|
||||||
|
@Override public void windowDeiconified(WindowEvent arg0) {}
|
||||||
@Override public void windowActivated(WindowEvent arg0) {}
|
@Override public void windowIconified(WindowEvent arg0) {}
|
||||||
@Override public void windowClosed(WindowEvent arg0) {}
|
@Override public void windowOpened(WindowEvent arg0) {}
|
||||||
@Override public void windowDeactivated(WindowEvent arg0) {}
|
|
||||||
@Override public void windowDeiconified(WindowEvent arg0) {}
|
|
||||||
@Override public void windowIconified(WindowEvent arg0) {}
|
|
||||||
@Override public void windowOpened(WindowEvent arg0) {}
|
|
||||||
}
|
}
|
||||||
|
@ -2,16 +2,11 @@ package net.locusworks.lsproject.gui;
|
|||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.io.ByteArrayInputStream;
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.filechooser.FileFilter;
|
import javax.swing.filechooser.FileFilter;
|
||||||
|
|
||||||
import net.locusworks.lsproject.driver.Program;
|
|
||||||
import net.locusworks.lsproject.gui.helper.ImageHelper;
|
import net.locusworks.lsproject.gui.helper.ImageHelper;
|
||||||
import net.locusworks.lsproject.object.Network;
|
import net.locusworks.lsproject.object.Network;
|
||||||
import net.locusworks.lsproject.util.Utility;
|
import net.locusworks.lsproject.util.Utility;
|
||||||
|
@ -7,7 +7,6 @@ import org.junit.Before;
|
|||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import net.locusworks.lsproject.driver.Program;
|
|
||||||
import net.locusworks.lsproject.object.Connection;
|
import net.locusworks.lsproject.object.Connection;
|
||||||
import net.locusworks.lsproject.object.DijkstraEngine;
|
import net.locusworks.lsproject.object.DijkstraEngine;
|
||||||
import net.locusworks.lsproject.object.Network;
|
import net.locusworks.lsproject.object.Network;
|
||||||
|
Reference in New Issue
Block a user