mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
added point by point component creation
This commit is contained in:
+13
-7
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user