mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
code format
This commit is contained in:
+1
-1
@@ -24,5 +24,5 @@ public interface IComponentInstance extends Serializable {
|
||||
*/
|
||||
void draw(Graphics2D g2d, ComponentState componentState);
|
||||
|
||||
// IComponentInstance clone() throws CloneNotSupportedException;
|
||||
// IComponentInstance clone() throws CloneNotSupportedException;
|
||||
}
|
||||
|
||||
+15
-16
@@ -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;
|
||||
// }
|
||||
}
|
||||
|
||||
+7
-7
@@ -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;
|
||||
}
|
||||
|
||||
+1
-2
@@ -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;
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ public class Converter {
|
||||
|
||||
public static <T extends Enum<? extends Unit>> AbstractMeasure<T> convert(
|
||||
AbstractMeasure<T> measure, T newUnit) {
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user