mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
Merge branch 'master' into caching
Conflicts: diylc/diylc-swing/library/main.jar
This commit is contained in:
@@ -164,6 +164,7 @@ public abstract class AbstractLeadedComponent<T> extends AbstractTransparentComp
|
||||
g2d.setColor(outlineMode ? Constants.TRANSPARENT_COLOR : getStandingBodyColor());
|
||||
g2d.fill(body);
|
||||
g2d.setComposite(oldComposite);
|
||||
|
||||
Color finalBorderColor;
|
||||
if (outlineMode) {
|
||||
Theme theme =
|
||||
@@ -179,7 +180,12 @@ public abstract class AbstractLeadedComponent<T> extends AbstractTransparentComp
|
||||
|
||||
g2d.setStroke(ObjectCache.getInstance().fetchBasicStroke(1f));
|
||||
g2d.setColor(finalBorderColor);
|
||||
drawingObserver.stopTracking();
|
||||
|
||||
g2d.draw(body);
|
||||
|
||||
drawingObserver.startTracking();
|
||||
|
||||
if (!outlineMode) {
|
||||
drawLead(g2d, componentState, drawingObserver, false);
|
||||
}
|
||||
@@ -258,6 +264,8 @@ public abstract class AbstractLeadedComponent<T> extends AbstractTransparentComp
|
||||
}
|
||||
}
|
||||
|
||||
drawingObserver.stopTracking();
|
||||
|
||||
Composite newComposite = null;
|
||||
if (!decorateAboveBorder())
|
||||
decorateComponentBody(g2d, outlineMode);
|
||||
@@ -326,6 +334,8 @@ public abstract class AbstractLeadedComponent<T> extends AbstractTransparentComp
|
||||
offset = -offset;
|
||||
}
|
||||
|
||||
drawingObserver.startTracking();
|
||||
|
||||
if (getMoveLabel()) {
|
||||
g2d.setTransform(oldTransform);
|
||||
g2d.translate(getPoints()[2].x, getPoints()[2].y);
|
||||
|
||||
@@ -90,6 +90,8 @@ public class HookupWire extends AbstractCurvedComponent<Void> implements IContin
|
||||
drawingObserver.startTracking();
|
||||
}
|
||||
|
||||
drawingObserver.stopTracking();
|
||||
|
||||
if (componentState == ComponentState.NORMAL) {
|
||||
g2d.setColor(color.darker());
|
||||
g2d.setStroke(ObjectCache.getInstance().fetchBasicStroke(1f));
|
||||
|
||||
@@ -104,23 +104,24 @@ public class TwistedWire extends AbstractCurvedComponent<Void> implements IConti
|
||||
}
|
||||
|
||||
g2d.setColor(curveColor1);
|
||||
drawingObserver.startTracking();
|
||||
g2d.fill(firstLeadArea);
|
||||
drawingObserver.stopTracking();
|
||||
|
||||
if (stripe1 && componentState == ComponentState.NORMAL) {
|
||||
drawingObserver.stopTracking();
|
||||
g2d.setColor(stripeColor);
|
||||
g2d.fill(firstLeadStripeArea);
|
||||
drawingObserver.startTracking();
|
||||
}
|
||||
|
||||
g2d.setColor(curveColor2);
|
||||
drawingObserver.startTracking();
|
||||
g2d.fill(secondLeadArea);
|
||||
drawingObserver.stopTracking();
|
||||
|
||||
if (stripe2 && componentState == ComponentState.NORMAL) {
|
||||
drawingObserver.stopTracking();
|
||||
g2d.setColor(stripeColor2);
|
||||
g2d.fill(secondLeadStripeArea);
|
||||
drawingObserver.startTracking();
|
||||
}
|
||||
|
||||
if (componentState == ComponentState.NORMAL) {
|
||||
|
||||
@@ -219,6 +219,8 @@ public class CliffJack1_4 extends AbstractMultiPartComponent<String> {
|
||||
finalBorderColor = BORDER_COLOR;
|
||||
}
|
||||
|
||||
drawingObserver.stopTracking();
|
||||
|
||||
g2d.setColor(finalBorderColor);
|
||||
for (int i = 0; i < body.length - 1; i++) {
|
||||
g2d.draw(body[i]);
|
||||
|
||||
@@ -184,6 +184,11 @@ public class FuseHolderPanel extends AbstractMultiPartComponent<String> {
|
||||
g2d.fill(a);
|
||||
break;
|
||||
}
|
||||
|
||||
// Do not track these changes because the whole switch has been tracked
|
||||
// so far.
|
||||
drawingObserver.stopTracking();
|
||||
|
||||
g2d.setComposite(oldComposite);
|
||||
g2d.setStroke(ObjectCache.getInstance().fetchBasicStroke(1));
|
||||
Color finalBorderColor;
|
||||
@@ -197,9 +202,6 @@ public class FuseHolderPanel extends AbstractMultiPartComponent<String> {
|
||||
if (a != null)
|
||||
g2d.draw(a);
|
||||
}
|
||||
// Do not track these changes because the whole switch has been tracked
|
||||
// so far.
|
||||
drawingObserver.stopTracking();
|
||||
|
||||
// Draw lugs.
|
||||
int lugWidth = getClosestOdd((int) LUG_WIDTH.convertToPixels());
|
||||
|
||||
@@ -205,6 +205,11 @@ public class IECSocket extends AbstractMultiPartComponent<String> {
|
||||
g2d.fill(a);
|
||||
break;
|
||||
}
|
||||
|
||||
// Do not track these changes because the whole switch has been tracked
|
||||
// so far.
|
||||
drawingObserver.stopTracking();
|
||||
|
||||
g2d.setComposite(oldComposite);
|
||||
g2d.setStroke(ObjectCache.getInstance().fetchBasicStroke(1));
|
||||
Color finalBorderColor;
|
||||
@@ -218,9 +223,6 @@ public class IECSocket extends AbstractMultiPartComponent<String> {
|
||||
if (a != null)
|
||||
g2d.draw(a);
|
||||
}
|
||||
// Do not track these changes because the whole switch has been tracked
|
||||
// so far.
|
||||
drawingObserver.stopTracking();
|
||||
|
||||
// Draw lugs.
|
||||
int lugWidth = getClosestOdd((int) LUG_WIDTH.convertToPixels());
|
||||
|
||||
@@ -144,12 +144,16 @@ public class OpenJack1_4 extends AbstractMultiPartComponent<String> {
|
||||
finalBorderColor = BASE_COLOR.darker();
|
||||
}
|
||||
|
||||
drawingObserver.stopTracking();
|
||||
|
||||
g2d.setColor(finalBorderColor);
|
||||
g2d.draw(body[1]);
|
||||
g2d.draw(body[2]);
|
||||
if (body[3] != null)
|
||||
g2d.draw(body[3]);
|
||||
|
||||
drawingObserver.startTracking();
|
||||
|
||||
// draw labels
|
||||
if (showLabels) {
|
||||
g2d.setColor(BASE_COLOR.darker());
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user