removed unused theme members

This commit is contained in:
bancika
2011-02-13 09:43:27 +00:00
parent b1f4773b10
commit 6f5926e18e
6 changed files with 13 additions and 138 deletions
@@ -1,62 +1,20 @@
<map> <map>
<entry>
<string>metric</string>
<boolean>true</boolean>
</entry>
<entry>
<string>zoom</string>
<double>1.0</double>
</entry>
<entry>
<string>lastPath</string>
<string>C:\Documents and Settings\Branislav Stojkovic\My Documents\Downloads</string>
</entry>
<entry> <entry>
<string>theme</string> <string>theme</string>
<org.diylc.core.Theme> <org.diylc.core.Theme>
<name>Light</name> <name>Blueprint</name>
<bgColor> <bgColor>
<red>255</red> <red>3</red>
<green>255</green> <green>122</green>
<blue>255</blue> <blue>198</blue>
<alpha>255</alpha> <alpha>255</alpha>
</bgColor> </bgColor>
<gridColor> <gridColor>
<red>240</red> <red>29</red>
<green>240</green> <green>140</green>
<blue>240</blue> <blue>193</blue>
<alpha>240</alpha>
</gridColor>
<labelColor>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha> <alpha>255</alpha>
</labelColor> </gridColor>
</org.diylc.core.Theme> </org.diylc.core.Theme>
</entry> </entry>
<entry>
<string>stickyPoints</string>
<boolean>true</boolean>
</entry>
<entry>
<string>antiAliasing</string>
<boolean>true</boolean>
</entry>
<entry>
<string>hiQualityRender</string>
<boolean>true</boolean>
</entry>
<entry>
<string>showTemplatesAtStartup</string>
<boolean>false</boolean>
</entry>
<entry>
<string>exportGrid</string>
<boolean>true</boolean>
</entry>
<entry>
<string>default.org.diylc.components.semiconductors.TransistorTO92:Orientation</string>
<org.diylc.common.Orientation>DEFAULT</org.diylc.common.Orientation>
</entry>
</map> </map>
@@ -10,19 +10,12 @@ public class Theme implements Serializable {
private String name; private String name;
private Color bgColor; private Color bgColor;
private Color gridColor; private Color gridColor;
private Color componentBodyColor;
private Color componentBorderColor;
private Color labelColor;
public Theme(String name, Color bgColor, Color gridColor, Color componentBodyColor, public Theme(String name, Color bgColor, Color gridColor) {
Color componentBorderColor, Color labelColor) {
super(); super();
this.name = name; this.name = name;
this.bgColor = bgColor; this.bgColor = bgColor;
this.gridColor = gridColor; this.gridColor = gridColor;
this.componentBodyColor = componentBodyColor;
this.componentBorderColor = componentBorderColor;
this.labelColor = labelColor;
} }
public String getName() { public String getName() {
@@ -37,29 +30,11 @@ public class Theme implements Serializable {
return gridColor; return gridColor;
} }
public Color getComponentBodyColor() {
return componentBodyColor;
}
public Color getComponentBorderColor() {
return componentBorderColor;
}
public Color getLabelColor() {
return labelColor;
}
@Override @Override
public int hashCode() { public int hashCode() {
final int prime = 31; final int prime = 31;
int result = 1; int result = 1;
result = prime * result + ((bgColor == null) ? 0 : bgColor.hashCode()); result = prime * result + ((bgColor == null) ? 0 : bgColor.hashCode());
result = prime * result
+ ((componentBodyColor == null) ? 0 : componentBodyColor.hashCode());
result = prime * result
+ ((componentBorderColor == null) ? 0 : componentBorderColor.hashCode());
result = prime * result
+ ((labelColor == null) ? 0 : labelColor.hashCode());
result = prime * result + ((gridColor == null) ? 0 : gridColor.hashCode()); result = prime * result + ((gridColor == null) ? 0 : gridColor.hashCode());
result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode());
return result; return result;
@@ -79,21 +54,6 @@ public class Theme implements Serializable {
return false; return false;
} else if (!bgColor.equals(other.bgColor)) } else if (!bgColor.equals(other.bgColor))
return false; return false;
if (componentBodyColor == null) {
if (other.componentBodyColor != null)
return false;
} else if (!componentBodyColor.equals(other.componentBodyColor))
return false;
if (componentBorderColor == null) {
if (other.componentBorderColor != null)
return false;
} else if (!componentBorderColor.equals(other.componentBorderColor))
return false;
if (labelColor == null) {
if (other.labelColor != null)
return false;
} else if (!labelColor.equals(other.labelColor))
return false;
if (gridColor == null) { if (gridColor == null) {
if (other.gridColor != null) if (other.gridColor != null)
return false; return false;
@@ -53,8 +53,7 @@ public class DrawingManager {
public static Color CONTROL_POINT_COLOR = Color.black; public static Color CONTROL_POINT_COLOR = Color.black;
public static Color SELECTED_CONTROL_POINT_COLOR = Color.green; public static Color SELECTED_CONTROL_POINT_COLOR = Color.green;
private Theme theme = new Theme("Light", Constants.CANVAS_COLOR, GRID_COLOR, null, private Theme theme = new Theme("Light", Constants.CANVAS_COLOR, GRID_COLOR);
null, null);
// Keeps Area object of each drawn component. // Keeps Area object of each drawn component.
private Map<IDIYComponent<?>, Area> componentAreaMap; private Map<IDIYComponent<?>, Area> componentAreaMap;
@@ -12,22 +12,4 @@
<blue>193</blue> <blue>193</blue>
<alpha>255</alpha> <alpha>255</alpha>
</gridColor> </gridColor>
<componentBorderColor>
<red>255</red>
<green>255</green>
<blue>255</blue>
<alpha>255</alpha>
</componentBorderColor>
<componentBodyColor>
<red>255</red>
<green>255</green>
<blue>255</blue>
<alpha>0</alpha>
</componentBodyColor>
<labelColor>
<red>255</red>
<green>255</green>
<blue>255</blue>
<alpha>255</alpha>
</labelColor>
</org.diylc.core.Theme> </org.diylc.core.Theme>
@@ -12,22 +12,4 @@
<blue>40</blue> <blue>40</blue>
<alpha>255</alpha> <alpha>255</alpha>
</gridColor> </gridColor>
<componentBorderColor>
<red>255</red>
<green>255</green>
<blue>255</blue>
<alpha>255</alpha>
</componentBorderColor>
<componentBodyColor>
<red>255</red>
<green>255</green>
<blue>255</blue>
<alpha>0</alpha>
</componentBodyColor>
<labelColor>
<red>255</red>
<green>255</green>
<blue>255</blue>
<alpha>255</alpha>
</labelColor>
</org.diylc.core.Theme> </org.diylc.core.Theme>
@@ -12,10 +12,4 @@
<blue>240</blue> <blue>240</blue>
<alpha>240</alpha> <alpha>240</alpha>
</gridColor> </gridColor>
<labelColor>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</labelColor>
</org.diylc.core.Theme> </org.diylc.core.Theme>