wiring analysys, ground work

This commit is contained in:
Branislav Stojkovic
2019-02-17 01:37:37 +01:00
parent add8566d4f
commit 88275e95e2
8 changed files with 220 additions and 3 deletions
@@ -1,3 +1,24 @@
/*
DIY Layout Creator (DIYLC).
Copyright (c) 2009-2018 held jointly by the individual authors.
This file is part of DIYLC.
DIYLC is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
DIYLC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with DIYLC. If not, see <http://www.gnu.org/licenses/>.
*/
package org.diylc.common;
import java.util.List;
@@ -35,6 +35,10 @@ import java.util.Set;
public class Group implements Comparable<Group> {
private Set<Node> nodes = new HashSet<Node>();
public Group() {
}
public Group(Node node1, Node node2) {
nodes.add(node1);
@@ -46,6 +46,10 @@ public class Node implements Comparable<Node> {
public int getPointIndex() {
return pointIndex;
}
public String getDisplayName() {
return component.getControlPointNodeName(pointIndex);
}
@Override
public int hashCode() {
@@ -77,7 +81,7 @@ public class Node implements Comparable<Node> {
@Override
public String toString() {
return component.getName() + "." + component.getControlPointNodeName(pointIndex) /*+ " @ (" + component.getControlPoint(pointIndex).getX() + ":" + component.getControlPoint(pointIndex).getY() + ")"*/;
return component.getName() + "." + getDisplayName() /*+ " @ (" + component.getControlPoint(pointIndex).getX() + ":" + component.getControlPoint(pointIndex).getY() + ")"*/;
}
@Override