code format

This commit is contained in:
bancika
2011-01-02 12:15:31 +00:00
parent 9fecfe947c
commit 4da06d79b0
55 changed files with 1093 additions and 1289 deletions
@@ -24,5 +24,5 @@ public interface IComponentInstance extends Serializable {
*/
void draw(Graphics2D g2d, ComponentState componentState);
// IComponentInstance clone() throws CloneNotSupportedException;
// IComponentInstance clone() throws CloneNotSupportedException;
}
@@ -27,8 +27,8 @@ public class Project implements Serializable {
height = new Size(21d, SizeUnit.cm);
}
public Project(String title, String author, String description, Size width,
Size height, List<IComponentInstance> components) {
public Project(String title, String author, String description, Size width, Size height,
List<IComponentInstance> components) {
super();
this.title = title;
this.author = author;
@@ -92,10 +92,8 @@ public class Project implements Serializable {
final int prime = 31;
int result = 1;
result = prime * result + ((author == null) ? 0 : author.hashCode());
result = prime * result
+ ((components == null) ? 0 : components.hashCode());
result = prime * result
+ ((description == null) ? 0 : description.hashCode());
result = prime * result + ((components == null) ? 0 : components.hashCode());
result = prime * result + ((description == null) ? 0 : description.hashCode());
result = prime * result + ((height == null) ? 0 : height.hashCode());
result = prime * result + ((title == null) ? 0 : title.hashCode());
result = prime * result + ((width == null) ? 0 : width.hashCode());
@@ -144,14 +142,15 @@ public class Project implements Serializable {
return true;
}
// @Override
// public Project clone() throws CloneNotSupportedException {
// List<IComponentInstance> clonedComponents = new ArrayList<IComponentInstance>();
// for (IComponentInstance component : components) {
// clonedComponents.add(component.clone());
// }
// Project project = new Project(title, author, description,
// width.clone(), height.clone(), clonedComponents);
// return project;
// }
// @Override
// public Project clone() throws CloneNotSupportedException {
// List<IComponentInstance> clonedComponents = new
// ArrayList<IComponentInstance>();
// for (IComponentInstance component : components) {
// clonedComponents.add(component.clone());
// }
// Project project = new Project(title, author, description,
// width.clone(), height.clone(), clonedComponents);
// return project;
// }
}
@@ -38,11 +38,11 @@ public @interface ControlPoint {
*/
boolean sticky() default true;
// /**
// * If true, the control point is the main control point for the component.
// * There cannot be more than one control point for a single component.
// *
// * @return
// */
// boolean main() default false;
// /**
// * If true, the control point is the main control point for the component.
// * There cannot be more than one control point for a single component.
// *
// * @return
// */
// boolean main() default false;
}
@@ -4,8 +4,7 @@ import java.io.Serializable;
import java.text.DecimalFormat;
import java.text.Format;
public class AbstractMeasure<T extends Enum<? extends Unit>> implements
Serializable, Cloneable {
public class AbstractMeasure<T extends Enum<? extends Unit>> implements Serializable, Cloneable {
private static final long serialVersionUID = 1L;
@@ -4,7 +4,7 @@ public class Converter {
public static <T extends Enum<? extends Unit>> AbstractMeasure<T> convert(
AbstractMeasure<T> measure, T newUnit) {
return null;
}
}
@@ -6,8 +6,7 @@ public class Size extends AbstractMeasure<SizeUnit> {
private static final long serialVersionUID = 1L;
public static final int PIXELS_PER_INCH = Toolkit.getDefaultToolkit()
.getScreenResolution();
public static final int PIXELS_PER_INCH = Toolkit.getDefaultToolkit().getScreenResolution();
public Size() {
super();