diff --git a/diylc/diylc-core/src/org/diylc/presenter/update.xml b/diylc/diylc-core/src/org/diylc/presenter/update.xml
index 33e85ecf..db3ed0d5 100644
--- a/diylc/diylc-core/src/org/diylc/presenter/update.xml
+++ b/diylc/diylc-core/src/org/diylc/presenter/update.xml
@@ -2734,6 +2734,10 @@
NEW_FEATURE
Added "Renumber On Paste" option in the "Config" menu
+
+ NEW_FEATURE
+ Added orientation parameter to "Ground Simbol" to allow rotation
+
IMPROVEMENT
Upgraded to Java 8
@@ -2742,6 +2746,10 @@
BUG_FIX
The third control point of resistors and similar components appears in the Spice netlist by mistake
+
+ BUG_FIX
+ Hide the 3rd control point for components that do not need it (Trace, Jumper, Line)
+
BUG_FIX
"Auto-Create Pads" doesn't work for ICs and similar non-stretchable components
@@ -2750,10 +2758,6 @@
BUG_FIX
Threads on 1/4" Closed Jack were not rendered at all
-
- BUG_FIX
- Hide the 3rd control point for components that do not need it (Trace, Jumper, Line)
-
BUG_FIX
Threads on 1/4" Closed Jack were not rendered at all
diff --git a/diylc/diylc-library/src/org/diylc/components/misc/GroundSymbol.java b/diylc/diylc-library/src/org/diylc/components/misc/GroundSymbol.java
index 70654477..bf574740 100644
--- a/diylc/diylc-library/src/org/diylc/components/misc/GroundSymbol.java
+++ b/diylc/diylc-library/src/org/diylc/components/misc/GroundSymbol.java
@@ -21,22 +21,23 @@
*/
package org.diylc.components.misc;
-import java.awt.Color;
-import java.awt.Graphics2D;
-import java.awt.Point;
-import java.awt.Polygon;
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.Point;
+import java.awt.Polygon;
-import org.diylc.common.ObjectCache;
-import org.diylc.components.AbstractComponent;
-import org.diylc.core.ComponentState;
-import org.diylc.core.IDIYComponent;
-import org.diylc.core.IDrawingObserver;
-import org.diylc.core.Project;
-import org.diylc.core.VisibilityPolicy;
-import org.diylc.core.annotations.BomPolicy;
-import org.diylc.core.annotations.ComponentDescriptor;
-import org.diylc.core.annotations.EditableProperty;
-import org.diylc.core.measures.Size;
+import org.diylc.common.ObjectCache;
+import org.diylc.common.Orientation;
+import org.diylc.components.AbstractComponent;
+import org.diylc.core.ComponentState;
+import org.diylc.core.IDIYComponent;
+import org.diylc.core.IDrawingObserver;
+import org.diylc.core.Project;
+import org.diylc.core.VisibilityPolicy;
+import org.diylc.core.annotations.BomPolicy;
+import org.diylc.core.annotations.ComponentDescriptor;
+import org.diylc.core.annotations.EditableProperty;
+import org.diylc.core.measures.Size;
import org.diylc.core.measures.SizeUnit;
@ComponentDescriptor(name = "Ground", author = "Branislav Stojkovic", category = "Schematic Symbols",
@@ -52,8 +53,10 @@ public class GroundSymbol extends AbstractComponent {
private Point point = new Point(0, 0);
private Color color = COLOR;
private Size size = SIZE;
- private GroundSymbolType type = GroundSymbolType.DEFAULT;
+ private GroundSymbolType type = GroundSymbolType.DEFAULT;
+ private Orientation orientation = Orientation.DEFAULT;
+ @SuppressWarnings("incomplete-switch")
@Override
public void draw(Graphics2D g2d, ComponentState componentState, boolean outlineMode, Project project,
IDrawingObserver drawingObserver) {
@@ -61,7 +64,20 @@ public class GroundSymbol extends AbstractComponent {
g2d.setStroke(ObjectCache.getInstance().fetchBasicStroke(1));
g2d.setColor(color);
int x = point.x;
- int y = point.y;
+ int y = point.y;
+
+ switch (getOrientation()) {
+ case _90:
+ g2d.rotate(Math.PI / 2, point.x, point.y);
+ break;
+ case _180:
+ g2d.rotate(Math.PI, point.x, point.y);
+ break;
+ case _270:
+ g2d.rotate(Math.PI * 3 / 2, point.x, point.y);
+ break;
+ }
+
g2d.drawLine(x, y, x, y + sizePx / 6);
if (type == GroundSymbolType.DEFAULT) {
int delta = sizePx / 7;
@@ -96,6 +112,17 @@ public class GroundSymbol extends AbstractComponent {
public void setType(GroundSymbolType type) {
this.type = type;
+ }
+
+ @EditableProperty
+ public Orientation getOrientation() {
+ if (orientation == null)
+ orientation = Orientation.DEFAULT;
+ return orientation;
+ }
+
+ public void setOrientation(Orientation orientation) {
+ this.orientation = orientation;
}
@Override