added point by point component creation

This commit is contained in:
bancika
2011-01-16 21:11:41 +00:00
parent 8186841851
commit 1d0f393931
20 changed files with 223 additions and 130 deletions
@@ -2,6 +2,7 @@ package org.diylc.common;
import javax.swing.Icon;
import org.diylc.core.CreationMethod;
import org.diylc.core.IDIYComponent;
/**
@@ -11,27 +12,29 @@ import org.diylc.core.IDIYComponent;
*
* @see IDIYComponent
*/
@SuppressWarnings("rawtypes")
public class ComponentType {
private String name;
private String description;
private CreationMethod creationMethod;
private String category;
private String namePrefix;
private String author;
private Icon icon;
@SuppressWarnings("unchecked")
private Class<? extends IDIYComponent> instanceClass;
private double zOrder;
private boolean stretchable;
private boolean sticky;
@SuppressWarnings("unchecked")
public ComponentType(String name, String description, String category, String namePrefix,
String author, Icon icon, Class<? extends IDIYComponent> instanceClass,
double zOrder, boolean stretchable, boolean sticky) {
public ComponentType(String name, String description, CreationMethod creationMethod,
String category, String namePrefix, String author, Icon icon,
Class<? extends IDIYComponent> instanceClass, double zOrder, boolean stretchable,
boolean sticky) {
super();
this.name = name;
this.description = description;
this.creationMethod = creationMethod;
this.category = category;
this.namePrefix = namePrefix;
this.author = author;
@@ -50,6 +53,10 @@ public class ComponentType {
return description;
}
public CreationMethod getCreationMethod() {
return creationMethod;
}
public String getCategory() {
return category;
}
@@ -66,7 +73,6 @@ public class ComponentType {
return icon;
}
@SuppressWarnings("unchecked")
public Class<? extends IDIYComponent> getInstanceClass() {
return instanceClass;
}
@@ -78,7 +84,7 @@ public class ComponentType {
public boolean isStretchable() {
return stretchable;
}
public boolean isSticky() {
return sticky;
}