use of com.cburch.logisim.proj.Project in project logisim-evolution by reds-heig.
the class Frame method isProjectFrameAt.
private static boolean isProjectFrameAt(int x, int y) {
for (Project current : Projects.getOpenProjects()) {
Frame frame = current.getFrame();
if (frame != null) {
Point loc = frame.getLocationOnScreen();
int d = Math.abs(loc.x - x) + Math.abs(loc.y - y);
if (d <= 3) {
return true;
}
}
}
return false;
}
use of com.cburch.logisim.proj.Project in project logisim-evolution by reds-heig.
the class LayoutEditHandler method copy.
@Override
public void copy() {
Project proj = frame.getProject();
Selection sel = frame.getCanvas().getSelection();
proj.doAction(SelectionActions.copy(sel));
}
use of com.cburch.logisim.proj.Project in project logisim-evolution by reds-heig.
the class LayoutEditHandler method delete.
@Override
public void delete() {
Project proj = frame.getProject();
Selection sel = frame.getCanvas().getSelection();
proj.doAction(SelectionActions.clear(sel));
}
use of com.cburch.logisim.proj.Project in project logisim-evolution by reds-heig.
the class LayoutEditHandler method selectAll.
@Override
public void selectAll() {
Project proj = frame.getProject();
Selection sel = frame.getCanvas().getSelection();
selectSelectTool(proj);
Circuit circ = proj.getCurrentCircuit();
sel.addAll(circ.getWires());
sel.addAll(circ.getNonWires());
proj.repaintCanvas();
}
use of com.cburch.logisim.proj.Project in project logisim-evolution by reds-heig.
the class LayoutEditHandler method cut.
@Override
public void cut() {
Project proj = frame.getProject();
Selection sel = frame.getCanvas().getSelection();
proj.doAction(SelectionActions.cut(sel));
}
Aggregations