added a pin direction

This commit is contained in:
hneemann 2016-03-14 21:59:24 +01:00
parent 74a9dc1574
commit 25f5d9da2d

View File

@ -6,15 +6,28 @@ import de.neemann.digital.gui.draw.graphics.Vector;
* @author hneemann * @author hneemann
*/ */
public class Pin { public class Pin {
private Vector pos;
private String name;
public Pin(Vector pos, String name) { private final Vector pos;
private final String name;
private final Direction direction;
public Pin(Vector pos, String name, Direction direction) {
this.pos = pos; this.pos = pos;
this.name = name; this.name = name;
this.direction = direction;
} }
public Vector getPos() { public Vector getPos() {
return pos; return pos;
} }
public String getName() {
return name;
}
public Direction getDirection() {
return direction;
}
public enum Direction {input, output, both}
} }