}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "_rsLatch",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIand",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIand41",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIandor414",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIdemux2",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIdff",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIdlatch",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIdlatch4",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIfulladder",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIhalfadder",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUImux1",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUImux1_4",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUInand3",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUInot4",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIor4",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIor_4",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIram2",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIram4",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIsel2_4",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIsel3_4",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIxor",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIAm2901",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIAm2901ALUFuncDecode",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIAm2901ALUInclDecode",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIAm2901ALUOneBit",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIAm2901DestDecode",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "GUIAm2901QReg",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
}
]
},
- "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+ "symbolRendererSnippetID": "simpleRectangularLike",
"symbolRendererParams": {
"centerText": "Am2901SourceDecode",
- "horizontalComponentCenter": 17.5,
"centerTextHeight": 5.0,
+ "horizontalComponentCenter": 17.5,
"pinLabelHeight": 3.5,
"pinLabelMargin": 0.5
}
{
Point[] newPath = w.getPath();
int newLength = newPath == null ? 0 : newPath.length;
- int diff = oldLength.getAndSet(newLength) - newLength;
+ int diff = newLength - oldLength.getAndSet(newLength);
if (diff != 0)
{
if (diff > 0)
void destroyWirePointHandle(GUIWire owner, WirePointHandle h)
{
- List<WirePointHandle> handles = pointHandlesPerWire.get(owner);
- int pointIndex = handles.indexOf(h);
- handles.remove(pointIndex);
- removeHandle(h);
- owner.removePathPoint(pointIndex);
+ if (pointHandlesPerWire.containsKey(owner))
+ {
+ List<WirePointHandle> handles = pointHandlesPerWire.get(owner);
+ int pointIndex = handles.indexOf(h);
+ handles.remove(pointIndex);
+ removeHandle(h);
+ owner.removePathPoint(pointIndex);
+ }
}
private void removeWirePointHandles(GUIWire owner)
{
Point p = parent.getPathPoint(pointIndex);
moveTo(p.x, p.y);
+ callRedrawListeners();
}
@Override
super(parent, style, editor.toBeEdited.submodel);
handles = editor.handleManager.getHandles();
- editor.handleManager.addHandleAddedListener(h -> h.addRedrawListener(this::redrawThreadsafe));
+ editor.handleManager.addHandleAddedListener(h ->
+ {
+ redrawThreadsafe();
+ h.addRedrawListener(this::redrawThreadsafe);
+ });
// TODO: Is this even necessary? The Handle should be finalized by the gc
- editor.handleManager.addHandleRemovedListener(h -> h.removeRedrawListener(this::redrawThreadsafe));
+ editor.handleManager.addHandleRemovedListener(h ->
+ {
+ redrawThreadsafe();
+ h.removeRedrawListener(this::redrawThreadsafe);
+ });
addZoomedRenderer(gc ->
{
System.arraycopy(oldPath, index, path, index + 1, oldPath.length - index);
path[index] = pointCopy(p);
}
+ recalculateEffectivePath();
+ callPathChangedListeners();
}
public void removePathPoint(int index)
if (index < oldPath.length - 1)
System.arraycopy(oldPath, index + 1, path, index, oldPath.length - index - 1);
}
+ recalculateEffectivePath();
+ callPathChangedListeners();
}
public double[] getEffectivePath()