01: /*
02: * ImageResourceCD.java
03: *
04: * Created on January 1, 2007, 6:33 PM
05: *
06: * To change this template, choose Tools | Template Manager
07: * and open the template in the editor.
08: */
09:
10: package org.netbeans.modules.vmd.game.model;
11:
12: import java.util.Arrays;
13: import java.util.List;
14: import org.netbeans.modules.vmd.api.model.ComponentDescriptor;
15: import org.netbeans.modules.vmd.api.model.Presenter;
16: import org.netbeans.modules.vmd.api.model.PropertyDescriptor;
17: import org.netbeans.modules.vmd.api.model.PropertyValue;
18: import org.netbeans.modules.vmd.api.model.TypeDescriptor;
19: import org.netbeans.modules.vmd.api.model.TypeID;
20: import org.netbeans.modules.vmd.api.model.VersionDescriptor;
21: import org.netbeans.modules.vmd.api.model.Versionable;
22: import org.netbeans.modules.vmd.game.integration.GameCodeSupport;
23: import org.netbeans.modules.vmd.midp.components.MidpTypes;
24:
25: /**
26: *
27: * @author Karel Herink
28: */
29: public class ImageResourceCD extends ComponentDescriptor {
30:
31: public static final TypeID TYPEID = new TypeID(
32: TypeID.Kind.COMPONENT,
33: "org.netbeans.modules.vmd.game.model.ImageResource"); // NOI18N
34:
35: public static final String PROPERTY_NAME = "imageresourcecd.prop.name"; // NOI18N
36: public static final String PROPERTY_IMAGE_PATH = "imageresourcecd.prop.imagepath"; // NOI18N
37:
38: public TypeDescriptor getTypeDescriptor() {
39: return new TypeDescriptor(null, TYPEID, true, false);
40: }
41:
42: public VersionDescriptor getVersionDescriptor() {
43: return null;
44: }
45:
46: public List<PropertyDescriptor> getDeclaredPropertyDescriptors() {
47: return Arrays.asList(new PropertyDescriptor(PROPERTY_NAME,
48: MidpTypes.TYPEID_JAVA_LANG_STRING, PropertyValue
49: .createNull(), false, false,
50: Versionable.FOREVER), new PropertyDescriptor(
51: PROPERTY_IMAGE_PATH, MidpTypes.TYPEID_JAVA_LANG_STRING,
52: PropertyValue.createNull(), false, false,
53: Versionable.FOREVER));
54: }
55:
56: protected List<? extends Presenter> createPresenters() {
57: return Arrays.asList(
58: // code
59: GameCodeSupport.createImageResourceCodePresenter());
60: }
61:
62: }
|