01: /*
02: * SequenceCD.java
03: *
04: * Created on January 2, 2007, 9:32 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 org.netbeans.modules.vmd.api.model.*;
13: import org.netbeans.modules.vmd.game.integration.components.GameTypes;
14: import org.netbeans.modules.vmd.game.integration.GameCodeSupport;
15: import org.netbeans.modules.vmd.midp.components.MidpTypes;
16:
17: import java.util.Arrays;
18: import java.util.List;
19:
20: /**
21: *
22: * @author kherink
23: */
24: public class SequenceCD extends ComponentDescriptor {
25:
26: public static final TypeID TYPEID = new TypeID(
27: TypeID.Kind.COMPONENT,
28: "org.netbeans.modules.vmd.game.model.Sequence"); // NOI18N
29:
30: public static final String PROPERTY_IMAGE_RESOURCE = "sequncecd.prop.imageresource"; // NOI18N
31: public static final String PROPERTY_NAME = "sequncecd.prop.name"; // NOI18N
32: public static final String PROPERTY_FRAME_MS = "sequncecd.prop.framems"; // NOI18N
33: public static final String PROPERTY_FRAMES = "sequncecd.prop.frames"; // NOI18N
34: public static final String PROPERTY_FRAME_WIDTH = "sequncecd.prop.frame.width"; // NOI18N
35: public static final String PROPERTY_FRAME_HEIGHT = "sequncecd.prop.frame.height"; // NOI18N
36: public static final String PROPERTY_ZERO_BASED_INDEX = "sequncecd.prop.zero.based.index"; // NOI18N
37:
38: public TypeDescriptor getTypeDescriptor() {
39: return new TypeDescriptor(null, TYPEID, true, true);
40: }
41:
42: public List<PropertyDescriptor> getDeclaredPropertyDescriptors() {
43: return Arrays.asList(new PropertyDescriptor(
44: PROPERTY_IMAGE_RESOURCE, ImageResourceCD.TYPEID,
45: PropertyValue.createNull(), false, false,
46: Versionable.FOREVER), new PropertyDescriptor(
47: PROPERTY_NAME, MidpTypes.TYPEID_JAVA_LANG_STRING,
48: PropertyValue.createNull(), false, false,
49: Versionable.FOREVER), new PropertyDescriptor(
50: PROPERTY_FRAME_MS, MidpTypes.TYPEID_INT, PropertyValue
51: .createNull(), false, false,
52: Versionable.FOREVER), new PropertyDescriptor(
53: PROPERTY_FRAMES, GameTypes.TYPEID_SEQUENCE_FRAMES,
54: PropertyValue.createNull(), false, false,
55: Versionable.FOREVER), new PropertyDescriptor(
56: PROPERTY_FRAME_WIDTH, MidpTypes.TYPEID_INT,
57: PropertyValue.createNull(), false, false,
58: Versionable.FOREVER), new PropertyDescriptor(
59: PROPERTY_FRAME_HEIGHT, MidpTypes.TYPEID_INT,
60: PropertyValue.createNull(), false, false,
61: Versionable.FOREVER), new PropertyDescriptor(
62: PROPERTY_ZERO_BASED_INDEX, MidpTypes.TYPEID_BOOLEAN,
63: PropertyValue.createNull(), false, false,
64: Versionable.FOREVER));
65: }
66:
67: public VersionDescriptor getVersionDescriptor() {
68: return null;
69: }
70:
71: protected List<? extends Presenter> createPresenters() {
72: return Arrays.asList(
73: // code
74: GameCodeSupport.createSequenceCodePresenter());
75: }
76:
77: }
|