mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-12 02:02:16 +10:00
fixed point visibility on curved trace
added option to hide color bands on the resistor
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
<map>
|
||||
<entry>
|
||||
<string>metric</string>
|
||||
<boolean>true</boolean>
|
||||
<string>lastPath</string>
|
||||
<string>C:\Documents and Settings\Branislav Stojkovic\Desktop</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>zoom</string>
|
||||
<double>1.0</double>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>lastPath</string>
|
||||
<string>C:\Documents and Settings\Branislav Stojkovic\Desktop</string>
|
||||
<string>metric</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>default.org.diylc.components.misc.Label:Color</string>
|
||||
|
||||
Binary file not shown.
+6
-3
@@ -2,10 +2,13 @@ package org.diylc.common;
|
||||
|
||||
public enum ResistorColorCode {
|
||||
|
||||
_4_BAND, _5_BAND;
|
||||
|
||||
NONE, _4_BAND, _5_BAND;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name().substring(1).replace("_", " ").toLowerCase();
|
||||
if (name().startsWith("_")) {
|
||||
return name().substring(1).replace("_", " ").toLowerCase();
|
||||
}
|
||||
return name().substring(0, 1).toUpperCase() + name().substring(1).toLowerCase();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,5 +82,30 @@
|
||||
<url>http://code.google.com/p/diy-layout-creator/downloads/list
|
||||
</url>
|
||||
</com.diyfever.gui.update.Version>
|
||||
<com.diyfever.gui.update.Version>
|
||||
<versionNumber>
|
||||
<major>3</major>
|
||||
<minor>0</minor>
|
||||
<build>5</build>
|
||||
</versionNumber>
|
||||
<releaseDate>2011-01-27 21:00:00.000 CET</releaseDate>
|
||||
<name></name>
|
||||
<changes>
|
||||
<com.diyfever.gui.update.Change>
|
||||
<changeType>BUG_FIX</changeType>
|
||||
<description>Curved trace does not show control points</description>
|
||||
</com.diyfever.gui.update.Change>
|
||||
<com.diyfever.gui.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>Resistor can show color bands</description>
|
||||
</com.diyfever.gui.update.Change>
|
||||
<com.diyfever.gui.update.Change>
|
||||
<changeType>NEW_FEATURE</changeType>
|
||||
<description></description>
|
||||
</com.diyfever.gui.update.Change>
|
||||
</changes>
|
||||
<url>http://code.google.com/p/diy-layout-creator/downloads/list
|
||||
</url>
|
||||
</com.diyfever.gui.update.Version>
|
||||
</a>
|
||||
</java.util.Arrays_-ArrayList>
|
||||
Binary file not shown.
-5
@@ -38,11 +38,6 @@ public class CurvedTrace extends AbstractCurvedComponent<Void> {
|
||||
g2d.draw(curve);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisibilityPolicy getControlPointVisibilityPolicy(int index) {
|
||||
return VisibilityPolicy.NEVER;
|
||||
}
|
||||
|
||||
@EditableProperty(name = "Width")
|
||||
public Size getSize() {
|
||||
return size;
|
||||
|
||||
+3
@@ -91,6 +91,9 @@ public class Resistor extends AbstractLeadedComponent<Resistance> {
|
||||
@Override
|
||||
protected void decorateComponentBody(Graphics2D g2d) {
|
||||
// int width = getWidth().convertToPixels();
|
||||
if (colorCode == ResistorColorCode.NONE) {
|
||||
return;
|
||||
}
|
||||
int height = getClosestOdd(getHeight().convertToPixels());
|
||||
Color[] bands = value.getColorCode(colorCode);
|
||||
int x = 4;
|
||||
|
||||
Reference in New Issue
Block a user