added ic pins

This commit is contained in:
bancika
2011-01-09 14:28:02 +00:00
parent c898fee28e
commit 7af112a28b
5 changed files with 84 additions and 32 deletions
@@ -6,14 +6,14 @@
<unit class="org.diylc.core.measures.ResistanceUnit">K</unit>
</org.diylc.core.measures.Resistance>
</entry>
<entry>
<string>lastPath</string>
<string>C:\Documents and Settings\Branislav Stojkovic\Desktop</string>
</entry>
<entry>
<string>metric</string>
<boolean>true</boolean>
</entry>
<entry>
<string>lastPath</string>
<string>C:\Documents and Settings\Branislav Stojkovic\Desktop</string>
</entry>
<entry>
<string>default.org.diylc.components.passive.AxialFilmCapacitor:Width</string>
<org.diylc.core.measures.Size>
@@ -31,6 +31,7 @@ public abstract class AbstractLeadedDIYComponent<T> extends AbstractTransparentC
public static Color LEAD_COLOR = Color.black;
public static Color LABEL_COLOR = Color.black;
public static Color LABEL_COLOR_SELECTED = Color.red;
public static Size LEAD_THICKNESS = new Size(0.3d, SizeUnit.mm);
protected Size width;
protected Size height;
@@ -83,7 +84,7 @@ public abstract class AbstractLeadedDIYComponent<T> extends AbstractTransparentC
* @return default lead thickness. Override this method to change it.
*/
protected Size getLeadThickness() {
return new Size(0.5d, SizeUnit.mm);
return LEAD_THICKNESS;
}
/**
@@ -100,7 +101,7 @@ public abstract class AbstractLeadedDIYComponent<T> extends AbstractTransparentC
@Override
public Point getControlPoint(int index) {
return (Point) points[index].clone();
return (Point) points[index];
}
@Override
@@ -18,7 +18,7 @@ public class Size extends AbstractMeasure<SizeUnit> {
public int convertToPixels() {
double factor = getUnit().getFactor() / SizeUnit.in.getFactor();
return (int) (factor * Constants.PIXELS_PER_INCH * getValue());
return (int) Math.round(factor * Constants.PIXELS_PER_INCH * getValue());
}
@Override