mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-26 14:31:02 -04:00
typos
This commit is contained in:
parent
0368177fc2
commit
30044bf8c6
@ -261,8 +261,8 @@ public class Circuit {
|
||||
* @param max lower right corner of the rectangle
|
||||
* @return the list
|
||||
*/
|
||||
public ArrayList<Moveable> getElementsToMove(Vector min, Vector max) {
|
||||
ArrayList<Moveable> m = new ArrayList<>();
|
||||
public ArrayList<Movable> getElementsToMove(Vector min, Vector max) {
|
||||
ArrayList<Movable> m = new ArrayList<>();
|
||||
for (VisualElement vp : visualElements)
|
||||
if (vp.matches(min, max))
|
||||
m.add(vp);
|
||||
@ -312,8 +312,8 @@ public class Circuit {
|
||||
* @param shapeFactory the shape factory
|
||||
* @return the list
|
||||
*/
|
||||
public ArrayList<Moveable> getElementsToCopy(Vector min, Vector max, ShapeFactory shapeFactory) {
|
||||
ArrayList<Moveable> m = new ArrayList<>();
|
||||
public ArrayList<Movable> getElementsToCopy(Vector min, Vector max, ShapeFactory shapeFactory) {
|
||||
ArrayList<Movable> m = new ArrayList<>();
|
||||
for (VisualElement vp : visualElements)
|
||||
if (vp.matches(min, max))
|
||||
m.add(new VisualElement(vp).setShapeFactory(shapeFactory));
|
||||
|
@ -7,7 +7,7 @@ import de.neemann.digital.draw.graphics.Vector;
|
||||
*
|
||||
* @author hneemann
|
||||
*/
|
||||
public interface Moveable {
|
||||
public interface Movable {
|
||||
|
||||
/**
|
||||
* Moves the instance by the given delta
|
@ -20,7 +20,7 @@ import static de.neemann.digital.draw.shapes.GenericShape.SIZE;
|
||||
*
|
||||
* @author hneemann
|
||||
*/
|
||||
public class VisualElement implements Drawable, Moveable, AttributeListener {
|
||||
public class VisualElement implements Drawable, Movable, AttributeListener {
|
||||
private static final int PIN = 2;
|
||||
|
||||
private transient GraphicMinMax minMax;
|
||||
|
@ -13,7 +13,7 @@ import java.util.Collection;
|
||||
*
|
||||
* @author hneemann
|
||||
*/
|
||||
public class Wire implements Drawable, Moveable {
|
||||
public class Wire implements Drawable, Movable {
|
||||
private static final int MIN_LABEL_LEN = 80;
|
||||
//Every value of p1 or p2 is valid. There are no hidden state constrains or dependencies.
|
||||
//So both fields are allowed to by public to allow more readable code.
|
||||
@ -229,8 +229,8 @@ public class Wire implements Drawable, Moveable {
|
||||
/**
|
||||
* @return a movable representing point one
|
||||
*/
|
||||
public Moveable getMovableP1() {
|
||||
return new Moveable() {
|
||||
public Movable getMovableP1() {
|
||||
return new Movable() {
|
||||
@Override
|
||||
public void move(Vector delta) {
|
||||
p1 = p1.add(delta);
|
||||
@ -246,8 +246,8 @@ public class Wire implements Drawable, Moveable {
|
||||
/**
|
||||
* @return a movable representing point two
|
||||
*/
|
||||
public Moveable getMovableP2() {
|
||||
return new Moveable() {
|
||||
public Movable getMovableP2() {
|
||||
return new Movable() {
|
||||
@Override
|
||||
public void move(Vector delta) {
|
||||
p2 = p2.add(delta);
|
||||
|
@ -97,8 +97,8 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
private static final Icon ICON_SAVE_AS = IconCreator.create("document-save-as.png");
|
||||
private static final Icon ICON_FAST = IconCreator.create("media-skip-forward.png");
|
||||
private static final Icon ICON_EXPAND = IconCreator.create("View-zoom-fit.png");
|
||||
private static final Icon ICON_ZOOMIN = IconCreator.create("View-zoom-in.png");
|
||||
private static final Icon ICON_ZOOMOUT = IconCreator.create("View-zoom-out.png");
|
||||
private static final Icon ICON_ZOOM_IN = IconCreator.create("View-zoom-in.png");
|
||||
private static final Icon ICON_ZOOM_OUT = IconCreator.create("View-zoom-out.png");
|
||||
private static final Icon ICON_HELP = IconCreator.create("help.png");
|
||||
private final CircuitComponent circuitComponent;
|
||||
private final ToolTipAction save;
|
||||
@ -107,7 +107,7 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
private final JLabel statusLabel;
|
||||
private final StateManager stateManager = new StateManager();
|
||||
private final ElementAttributes settings = new ElementAttributes();
|
||||
private final ScheduledThreadPoolExecutor timerExecuter = new ScheduledThreadPoolExecutor(1);
|
||||
private final ScheduledThreadPoolExecutor timerExecutor = new ScheduledThreadPoolExecutor(1);
|
||||
private final WindowPosManager windowPosManager = new WindowPosManager();
|
||||
private final InsertHistory insertHistory;
|
||||
|
||||
@ -122,7 +122,7 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
private Model model;
|
||||
|
||||
private ModelCreator modelCreator;
|
||||
private boolean realtimeClockRunning;
|
||||
private boolean realTimeClockRunning;
|
||||
|
||||
private State stoppedState;
|
||||
private RunModelState runModelState;
|
||||
@ -204,7 +204,7 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
@Override
|
||||
public void windowClosed(WindowEvent e) {
|
||||
clearModelDescription(); // stop model timer if running
|
||||
timerExecuter.shutdown();
|
||||
timerExecutor.shutdown();
|
||||
library.removeListener(librarySelector);
|
||||
library.removeListener(insertHistory);
|
||||
library.removeListener(circuitComponent);
|
||||
@ -240,13 +240,13 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
circuitComponent.fitCircuit();
|
||||
}
|
||||
};
|
||||
ToolTipAction zoomIn = new ToolTipAction(Lang.get("menu_zoomIn"), ICON_ZOOMIN) {
|
||||
ToolTipAction zoomIn = new ToolTipAction(Lang.get("menu_zoomIn"), ICON_ZOOM_IN) {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
circuitComponent.scaleCircuit(1.25);
|
||||
}
|
||||
};
|
||||
ToolTipAction zoomOut = new ToolTipAction(Lang.get("menu_zoomOut"), ICON_ZOOMOUT) {
|
||||
ToolTipAction zoomOut = new ToolTipAction(Lang.get("menu_zoomOut"), ICON_ZOOM_OUT) {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
circuitComponent.scaleCircuit(0.8);
|
||||
@ -379,7 +379,7 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
fileHistory.setMenu(openRecent);
|
||||
openRecent.setEnabled(allowAll);
|
||||
|
||||
ToolTipAction saveas = new ToolTipAction(Lang.get("menu_saveAs"), ICON_SAVE_AS) {
|
||||
ToolTipAction saveAs = new ToolTipAction(Lang.get("menu_saveAs"), ICON_SAVE_AS) {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
JFileChooser fc = getJFileChooser(lastFilename);
|
||||
@ -415,7 +415,7 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if (filename == null)
|
||||
saveas.actionPerformed(e);
|
||||
saveAs.actionPerformed(e);
|
||||
else
|
||||
saveFile(filename, false);
|
||||
}
|
||||
@ -435,7 +435,7 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
file.add(open.createJMenuItem());
|
||||
file.add(openWin.createJMenuItem());
|
||||
file.add(save.createJMenuItem());
|
||||
file.add(saveas.createJMenuItem());
|
||||
file.add(saveAs.createJMenuItem());
|
||||
file.add(export);
|
||||
|
||||
toolBar.add(newFile.createJButtonNoText());
|
||||
@ -528,9 +528,9 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
try {
|
||||
Object data = clpbrd.getData(DataFlavor.stringFlavor);
|
||||
if (data instanceof String) {
|
||||
ArrayList<Moveable> elements = CircuitTransferable.createList(data, shapeFactory, new Vector(0, 0));
|
||||
ArrayList<Movable> elements = CircuitTransferable.createList(data, shapeFactory, new Vector(0, 0));
|
||||
Circuit circuit = new Circuit();
|
||||
for (Moveable m : elements) {
|
||||
for (Movable m : elements) {
|
||||
if (m instanceof Wire)
|
||||
circuit.add((Wire) m);
|
||||
if (m instanceof VisualElement)
|
||||
@ -688,7 +688,7 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
if (tsl.isEmpty())
|
||||
throw new TestingDataException(Lang.get("err_noTestData"));
|
||||
|
||||
windowPosManager.register("testresult", new TestResultDialog(Main.this, tsl, circuitComponent.getCircuit(), library)).setVisible(true);
|
||||
windowPosManager.register("testResult", new TestResultDialog(Main.this, tsl, circuitComponent.getCircuit(), library)).setVisible(true);
|
||||
|
||||
stoppedState.enter();
|
||||
} catch (NodeException | ElementNotFoundException | PinException | TestingDataException | RuntimeException e1) {
|
||||
@ -713,7 +713,7 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
.setVisible(true);
|
||||
stoppedState.enter();
|
||||
} catch (PinException | NodeException | AnalyseException | ElementNotFoundException | RuntimeException e1) {
|
||||
showErrorAndStopModel(Lang.get("msg_annalyseErr"), e1);
|
||||
showErrorAndStopModel(Lang.get("msg_analyseErr"), e1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -808,22 +808,22 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
|
||||
statusLabel.setText(Lang.get("msg_N_nodes", model.size()));
|
||||
|
||||
realtimeClockRunning = false;
|
||||
realTimeClockRunning = false;
|
||||
modelSync = null;
|
||||
if (globalRunClock)
|
||||
for (Clock c : model.getClocks())
|
||||
if (c.getFrequency() > 0) {
|
||||
if (modelSync == null)
|
||||
modelSync = new LockSync();
|
||||
model.addObserver(new RealTimeClock(model, c, timerExecuter, this, modelSync, this));
|
||||
realtimeClockRunning = true;
|
||||
model.addObserver(new RealTimeClock(model, c, timerExecutor, this, modelSync, this));
|
||||
realTimeClockRunning = true;
|
||||
}
|
||||
if (modelSync == null)
|
||||
modelSync = NoSync.INST;
|
||||
|
||||
circuitComponent.setModeAndReset(true, modelSync);
|
||||
|
||||
if (realtimeClockRunning) {
|
||||
if (realTimeClockRunning) {
|
||||
// if clock is running, enable automatic update of gui
|
||||
GuiModelObserver gmo = new GuiModelObserver(circuitComponent, updateEvent);
|
||||
modelCreator.connectToGui(gmo);
|
||||
@ -833,16 +833,16 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
modelCreator.connectToGui(null);
|
||||
|
||||
doStep.setEnabled(false);
|
||||
runToBreakAction.setEnabled(!realtimeClockRunning && model.isFastRunModel());
|
||||
runToBreakAction.setEnabled(!realTimeClockRunning && model.isFastRunModel());
|
||||
|
||||
List<String> ordering = circuitComponent.getCircuit().getMeasurementOrdering();
|
||||
if (settings.get(Keys.SHOW_DATA_TABLE))
|
||||
windowPosManager.register("probe", new ProbeDialog(this, model, updateEvent, ordering, modelSync)).setVisible(true);
|
||||
|
||||
if (settings.get(Keys.SHOW_DATA_GRAPH))
|
||||
windowPosManager.register("dataset", new DataSetDialog(this, model, updateEvent == ModelEvent.MICROSTEP, ordering, modelSync)).setVisible(true);
|
||||
windowPosManager.register("dataSet", new DataSetDialog(this, model, updateEvent == ModelEvent.MICROSTEP, ordering, modelSync)).setVisible(true);
|
||||
if (settings.get(Keys.SHOW_DATA_GRAPH_MICRO))
|
||||
windowPosManager.register("datasetMicro", new DataSetDialog(this, model, true, ordering, modelSync)).setVisible(true);
|
||||
windowPosManager.register("dataSetMicro", new DataSetDialog(this, model, true, ordering, modelSync)).setVisible(true);
|
||||
|
||||
if (modelModifier != null)
|
||||
modelModifier.preInit(model);
|
||||
@ -918,8 +918,8 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
try {
|
||||
setFilename(filename, setLibraryRoot);
|
||||
if (setLibraryRoot) library.setRootFilePath(filename.getParentFile());
|
||||
Circuit circ = Circuit.loadCircuit(filename, shapeFactory);
|
||||
circuitComponent.setCircuit(circ);
|
||||
Circuit circuit = Circuit.loadCircuit(filename, shapeFactory);
|
||||
circuitComponent.setCircuit(circuit);
|
||||
stoppedState.enter();
|
||||
windowPosManager.closeAll();
|
||||
statusLabel.setText(" ");
|
||||
@ -1058,21 +1058,21 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
//***********************
|
||||
|
||||
private static class AddressPicker {
|
||||
private long addr;
|
||||
private long address;
|
||||
|
||||
private void getProgRomAddr(Model model) {
|
||||
private void getProgramROMAddress(Model model) {
|
||||
List<ROM> roms = model.findNode(ROM.class, ROM::isProgramMemory);
|
||||
if (roms.size() == 1)
|
||||
addr = roms.get(0).getRomAddress();
|
||||
address = roms.get(0).getRomAddress();
|
||||
else
|
||||
addr = -1;
|
||||
address = -1;
|
||||
}
|
||||
|
||||
String getAddrString() {
|
||||
if (addr < 0)
|
||||
String getAddressString() {
|
||||
if (address < 0)
|
||||
return null;
|
||||
else
|
||||
return Long.toHexString(addr);
|
||||
return Long.toHexString(address);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1101,7 +1101,7 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
|
||||
@Override
|
||||
public String doSingleStep() throws RemoteException {
|
||||
if (model != null && !realtimeClockRunning) {
|
||||
if (model != null && !realTimeClockRunning) {
|
||||
try {
|
||||
AddressPicker addressPicker = new AddressPicker();
|
||||
SwingUtilities.invokeAndWait(() -> {
|
||||
@ -1116,13 +1116,13 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
model.doStep();
|
||||
}
|
||||
circuitComponent.hasChanged();
|
||||
addressPicker.getProgRomAddr(model);
|
||||
addressPicker.getProgramROMAddress(model);
|
||||
} catch (NodeException | RuntimeException e) {
|
||||
showErrorAndStopModel(Lang.get("err_remoteExecution"), e);
|
||||
}
|
||||
}
|
||||
});
|
||||
return addressPicker.getAddrString();
|
||||
return addressPicker.getAddressString();
|
||||
} catch (InterruptedException | InvocationTargetException e) {
|
||||
throw new RemoteException("error performing a single step " + e.getMessage());
|
||||
}
|
||||
@ -1135,11 +1135,11 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
try {
|
||||
AddressPicker addressPicker = new AddressPicker();
|
||||
SwingUtilities.invokeAndWait(() -> {
|
||||
if (model != null && model.isFastRunModel() && !realtimeClockRunning)
|
||||
if (model != null && model.isFastRunModel() && !realTimeClockRunning)
|
||||
runToBreakAction.actionPerformed(null);
|
||||
addressPicker.getProgRomAddr(model);
|
||||
addressPicker.getProgramROMAddress(model);
|
||||
});
|
||||
return addressPicker.getAddrString();
|
||||
return addressPicker.getAddressString();
|
||||
} catch (InterruptedException | InvocationTargetException e) {
|
||||
throw new RemoteException("error performing a run to break " + e.getMessage());
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ public class CircuitComponent extends JComponent implements Circuit.ChangedListe
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if (activeMouseController instanceof MouseControllerSelect) {
|
||||
MouseControllerSelect mcs = ((MouseControllerSelect) activeMouseController);
|
||||
ArrayList<Moveable> elements = circuit.getElementsToCopy(Vector.min(mcs.corner1, mcs.corner2), Vector.max(mcs.corner1, mcs.corner2), shapeFactory);
|
||||
ArrayList<Movable> elements = circuit.getElementsToCopy(Vector.min(mcs.corner1, mcs.corner2), Vector.max(mcs.corner1, mcs.corner2), shapeFactory);
|
||||
Clipboard clpbrd = Toolkit.getDefaultToolkit().getSystemClipboard();
|
||||
clpbrd.setContents(new CircuitTransferable(elements), null);
|
||||
removeHighLighted();
|
||||
@ -132,7 +132,7 @@ public class CircuitComponent extends JComponent implements Circuit.ChangedListe
|
||||
Object data = clpbrd.getData(DataFlavor.stringFlavor);
|
||||
if (data instanceof String) {
|
||||
Vector posVector = getPosVector(lastMousePos.x, lastMousePos.y);
|
||||
ArrayList<Moveable> elements = CircuitTransferable.createList(data, shapeFactory, posVector);
|
||||
ArrayList<Movable> elements = CircuitTransferable.createList(data, shapeFactory, posVector);
|
||||
if (elements != null) {
|
||||
removeHighLighted();
|
||||
mouseInsertList.activate(elements, posVector);
|
||||
@ -1126,7 +1126,7 @@ public class CircuitComponent extends JComponent implements Circuit.ChangedListe
|
||||
}
|
||||
}
|
||||
|
||||
private void rotateElements(ArrayList<Moveable> elements, Vector pos) {
|
||||
private void rotateElements(ArrayList<Movable> elements, Vector pos) {
|
||||
Vector p1 = raster(pos);
|
||||
|
||||
Transform transform = new TransformRotate(p1, 1) {
|
||||
@ -1136,7 +1136,7 @@ public class CircuitComponent extends JComponent implements Circuit.ChangedListe
|
||||
}
|
||||
};
|
||||
|
||||
for (Moveable m : elements) {
|
||||
for (Movable m : elements) {
|
||||
|
||||
if (m instanceof VisualElement) {
|
||||
VisualElement ve = (VisualElement) m;
|
||||
@ -1160,7 +1160,7 @@ public class CircuitComponent extends JComponent implements Circuit.ChangedListe
|
||||
|
||||
|
||||
private final class MouseControllerMoveSelected extends MouseController {
|
||||
private ArrayList<Moveable> elements;
|
||||
private ArrayList<Movable> elements;
|
||||
private Vector lastPos;
|
||||
private Vector center;
|
||||
private boolean wasMoved;
|
||||
@ -1190,7 +1190,7 @@ public class CircuitComponent extends JComponent implements Circuit.ChangedListe
|
||||
Vector delta = raster(pos.sub(lastPos));
|
||||
|
||||
if (delta.x != 0 || delta.y != 0) {
|
||||
for (Moveable m : elements)
|
||||
for (Movable m : elements)
|
||||
m.move(delta);
|
||||
wasMoved = true;
|
||||
|
||||
@ -1217,14 +1217,14 @@ public class CircuitComponent extends JComponent implements Circuit.ChangedListe
|
||||
}
|
||||
|
||||
private final class MouseControllerInsertCopied extends MouseController {
|
||||
private ArrayList<Moveable> elements;
|
||||
private ArrayList<Movable> elements;
|
||||
private Vector lastPos;
|
||||
|
||||
private MouseControllerInsertCopied(Cursor cursor) {
|
||||
super(cursor);
|
||||
}
|
||||
|
||||
private void activate(ArrayList<Moveable> elements, Vector pos) {
|
||||
private void activate(ArrayList<Movable> elements, Vector pos) {
|
||||
super.activate();
|
||||
this.elements = elements;
|
||||
lastPos = pos;
|
||||
@ -1239,7 +1239,7 @@ public class CircuitComponent extends JComponent implements Circuit.ChangedListe
|
||||
Vector delta = raster(pos.sub(lastPos));
|
||||
|
||||
if (delta.x != 0 || delta.y != 0) {
|
||||
for (Moveable m : elements)
|
||||
for (Movable m : elements)
|
||||
m.move(delta);
|
||||
|
||||
repaint();
|
||||
@ -1251,7 +1251,7 @@ public class CircuitComponent extends JComponent implements Circuit.ChangedListe
|
||||
@Override
|
||||
public void drawTo(Graphic gr) {
|
||||
if (elements != null)
|
||||
for (Moveable m : elements)
|
||||
for (Movable m : elements)
|
||||
if (m instanceof Drawable)
|
||||
((Drawable) m).drawTo(gr, true);
|
||||
}
|
||||
@ -1264,7 +1264,7 @@ public class CircuitComponent extends JComponent implements Circuit.ChangedListe
|
||||
@Override
|
||||
void clicked(MouseEvent e) {
|
||||
if (elements != null && e.getButton() == 1) {
|
||||
for (Moveable m : elements) {
|
||||
for (Movable m : elements) {
|
||||
if (m instanceof Wire)
|
||||
circuit.add((Wire) m);
|
||||
if (m instanceof VisualElement)
|
||||
|
@ -3,7 +3,7 @@ package de.neemann.digital.gui.components;
|
||||
import com.thoughtworks.xstream.XStream;
|
||||
import com.thoughtworks.xstream.io.xml.PrettyPrintWriter;
|
||||
import de.neemann.digital.draw.elements.Circuit;
|
||||
import de.neemann.digital.draw.elements.Moveable;
|
||||
import de.neemann.digital.draw.elements.Movable;
|
||||
import de.neemann.digital.draw.elements.VisualElement;
|
||||
import de.neemann.digital.draw.graphics.GraphicMinMax;
|
||||
import de.neemann.digital.draw.graphics.Vector;
|
||||
@ -30,7 +30,7 @@ public class CircuitTransferable implements Transferable {
|
||||
*
|
||||
* @param data the data to copy
|
||||
*/
|
||||
CircuitTransferable(ArrayList<Moveable> data) {
|
||||
CircuitTransferable(ArrayList<Movable> data) {
|
||||
XStream xStream = Circuit.getxStream();
|
||||
try (StringWriter out = new StringWriter()) {
|
||||
out.write("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
|
||||
@ -69,18 +69,18 @@ public class CircuitTransferable implements Transferable {
|
||||
* @return the elements or null
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public static ArrayList<Moveable> createList(Object data, ShapeFactory shapeFactory, Vector lastMousePos) throws IOException {
|
||||
public static ArrayList<Movable> createList(Object data, ShapeFactory shapeFactory, Vector lastMousePos) throws IOException {
|
||||
if (!(data instanceof String))
|
||||
return null;
|
||||
|
||||
XStream xStream = Circuit.getxStream();
|
||||
Vector max = null;
|
||||
try (Reader in = new StringReader(data.toString())) {
|
||||
ArrayList<Moveable> elements = (ArrayList<Moveable>) xStream.fromXML(in);
|
||||
ArrayList<Movable> elements = (ArrayList<Movable>) xStream.fromXML(in);
|
||||
if (elements == null)
|
||||
return null;
|
||||
|
||||
for (Moveable m : elements)
|
||||
for (Movable m : elements)
|
||||
if (m instanceof VisualElement) {
|
||||
((VisualElement) m).setShapeFactory(shapeFactory);
|
||||
GraphicMinMax mm = ((VisualElement) m).getMinMax(false);
|
||||
@ -92,7 +92,7 @@ public class CircuitTransferable implements Transferable {
|
||||
|
||||
if (max != null) {
|
||||
Vector delta = CircuitComponent.raster(lastMousePos.sub(max));
|
||||
for (Moveable m : elements)
|
||||
for (Movable m : elements)
|
||||
m.move(delta);
|
||||
}
|
||||
|
||||
|
@ -744,7 +744,7 @@ Geschrieben von Helmut Neemann 2016
|
||||
|
||||
Die Icons stammen aus dem Tango Desktop Project.</string>
|
||||
<string name="msg_N_nodes">{0} aktive Elemente</string>
|
||||
<string name="msg_annalyseErr">Fehler bei der Analyse der Schaltung</string>
|
||||
<string name="msg_analyseErr">Fehler bei der Analyse der Schaltung</string>
|
||||
<string name="msg_clockError">Fehler bei der Berechnung einer Taktänderung</string>
|
||||
<string name="msg_color">Farbe</string>
|
||||
<string name="msg_errorCalculatingStep">Fehler beim Berechnen eines Schrittes</string>
|
||||
|
@ -734,7 +734,7 @@ Written bei H.Neemann in 2016.
|
||||
|
||||
The icons are taken from the Tango Desktop Project.</string>
|
||||
<string name="msg_N_nodes">{0} nodes</string>
|
||||
<string name="msg_annalyseErr">Error analysing the circuit</string>
|
||||
<string name="msg_analyseErr">Error analysing the circuit</string>
|
||||
<string name="msg_clockError">Error during a clock state change</string>
|
||||
<string name="msg_color">Color</string>
|
||||
<string name="msg_errorCalculatingStep">Error calculating a step</string>
|
||||
|
@ -73,7 +73,7 @@
|
||||
<int>5</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="600" y="320"/>
|
||||
<pos x="560" y="320"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
@ -83,12 +83,12 @@
|
||||
<string>Y</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="680" y="340"/>
|
||||
<pos x="640" y="340"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>FullSubRC.dig</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="400" y="120"/>
|
||||
<pos x="380" y="120"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Splitter</elementName>
|
||||
@ -130,7 +130,7 @@
|
||||
<string>5</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="500" y="120"/>
|
||||
<pos x="480" y="120"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Testcase</elementName>
|
||||
@ -144,37 +144,37 @@ repeat(1<<9) ((n>>4)&0xf) (n & 0xf) (n>>8) 1</dataStri
|
||||
</testData>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="600" y="100"/>
|
||||
<pos x="560" y="100"/>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="580" y="320"/>
|
||||
<p2 x="600" y="320"/>
|
||||
<p1 x="540" y="320"/>
|
||||
<p2 x="560" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="160"/>
|
||||
<p2 x="400" y="160"/>
|
||||
<p2 x="380" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="160"/>
|
||||
<p2 x="500" y="160"/>
|
||||
<p1 x="460" y="160"/>
|
||||
<p2 x="480" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="260"/>
|
||||
<p2 x="400" y="260"/>
|
||||
<p2 x="380" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="200"/>
|
||||
<p2 x="400" y="200"/>
|
||||
<p2 x="380" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="200"/>
|
||||
<p2 x="340" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="200"/>
|
||||
<p2 x="500" y="200"/>
|
||||
<p1 x="460" y="200"/>
|
||||
<p2 x="480" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="280" y="360"/>
|
||||
@ -190,11 +190,11 @@ repeat(1<<9) ((n>>4)&0xf) (n & 0xf) (n>>8) 1</dataStri
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="140"/>
|
||||
<p2 x="400" y="140"/>
|
||||
<p2 x="380" y="140"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="140"/>
|
||||
<p2 x="500" y="140"/>
|
||||
<p1 x="460" y="140"/>
|
||||
<p2 x="480" y="140"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="280" y="300"/>
|
||||
@ -202,7 +202,7 @@ repeat(1<<9) ((n>>4)&0xf) (n & 0xf) (n>>8) 1</dataStri
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="240"/>
|
||||
<p2 x="400" y="240"/>
|
||||
<p2 x="380" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="280" y="400"/>
|
||||
@ -210,11 +210,11 @@ repeat(1<<9) ((n>>4)&0xf) (n & 0xf) (n>>8) 1</dataStri
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="180"/>
|
||||
<p2 x="400" y="180"/>
|
||||
<p2 x="380" y="180"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="180"/>
|
||||
<p2 x="500" y="180"/>
|
||||
<p1 x="460" y="180"/>
|
||||
<p2 x="480" y="180"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="340"/>
|
||||
@ -226,35 +226,35 @@ repeat(1<<9) ((n>>4)&0xf) (n & 0xf) (n>>8) 1</dataStri
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="520" y="340"/>
|
||||
<p2 x="600" y="340"/>
|
||||
<p2 x="560" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="660" y="340"/>
|
||||
<p2 x="680" y="340"/>
|
||||
<p1 x="620" y="340"/>
|
||||
<p2 x="640" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="120"/>
|
||||
<p2 x="400" y="120"/>
|
||||
<p2 x="380" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="120"/>
|
||||
<p2 x="340" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="120"/>
|
||||
<p2 x="500" y="120"/>
|
||||
<p1 x="460" y="120"/>
|
||||
<p2 x="480" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="520" y="120"/>
|
||||
<p2 x="580" y="120"/>
|
||||
<p1 x="500" y="120"/>
|
||||
<p2 x="540" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="280"/>
|
||||
<p2 x="400" y="280"/>
|
||||
<p2 x="380" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="220"/>
|
||||
<p2 x="400" y="220"/>
|
||||
<p2 x="380" y="220"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="380"/>
|
||||
@ -268,14 +268,14 @@ repeat(1<<9) ((n>>4)&0xf) (n & 0xf) (n>>8) 1</dataStri
|
||||
<p1 x="320" y="200"/>
|
||||
<p2 x="320" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="580" y="120"/>
|
||||
<p2 x="580" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="280"/>
|
||||
<p2 x="360" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="540" y="120"/>
|
||||
<p2 x="540" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="120"/>
|
||||
<p2 x="300" y="300"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user