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
@@ -6,25 +6,18 @@ import java.io.Serializable;
public class Theme implements Serializable {
private static final long serialVersionUID = 1L;
private String name;
private Color bgColor;
private Color gridColor;
private Color componentBodyColor;
private Color componentBorderColor;
private Color labelColor;
public Theme(String name, Color bgColor, Color gridColor, Color componentBodyColor,
Color componentBorderColor, Color labelColor) {
public Theme(String name, Color bgColor, Color gridColor) {
super();
this.name = name;
this.bgColor = bgColor;
this.gridColor = gridColor;
this.componentBodyColor = componentBodyColor;
this.componentBorderColor = componentBorderColor;
this.labelColor = labelColor;
}
public String getName() {
return name;
}
@@ -37,29 +30,11 @@ public class Theme implements Serializable {
return gridColor;
}
public Color getComponentBodyColor() {
return componentBodyColor;
}
public Color getComponentBorderColor() {
return componentBorderColor;
}
public Color getLabelColor() {
return labelColor;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
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 + ((name == null) ? 0 : name.hashCode());
return result;
@@ -79,21 +54,6 @@ public class Theme implements Serializable {
return false;
} else if (!bgColor.equals(other.bgColor))
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 (other.gridColor != null)
return false;
@@ -106,7 +66,7 @@ public class Theme implements Serializable {
return false;
return true;
}
@Override
public String toString() {
return name;
@@ -53,8 +53,7 @@ public class DrawingManager {
public static Color CONTROL_POINT_COLOR = Color.black;
public static Color SELECTED_CONTROL_POINT_COLOR = Color.green;
private Theme theme = new Theme("Light", Constants.CANVAS_COLOR, GRID_COLOR, null,
null, null);
private Theme theme = new Theme("Light", Constants.CANVAS_COLOR, GRID_COLOR);
// Keeps Area object of each drawn component.
private Map<IDIYComponent<?>, Area> componentAreaMap;