Examples of StringComponent


Examples of org.cishell.reference.gui.guibuilder.swt.builder.components.StringComponent

                    break;
                } else if (defaultValue[0].startsWith("directory:")) {
                    component = new DirectoryComponent();
                    break;
                } else if(defaultValue[0].startsWith("textarea:")) {
                  component = new StringComponent(true);
                  break;
                }
            }
        case (AttributeDefinition.BYTE):
        case (AttributeDefinition.CHARACTER):
        case (AttributeDefinition.DOUBLE):
        case (AttributeDefinition.FLOAT):
        case (AttributeDefinition.LONG):
        case (AttributeDefinition.SHORT):
        case (AttributeDefinition.INTEGER):
        default:
            component = new StringComponent();
            break;
        }
       
        component.setAttributeDefinition(attr);
       
View Full Code Here

Examples of org.terasology.entitySystem.stubs.StringComponent

        entityManager.getComponentLibrary().register(new SimpleUri("test", "integer"), IntegerComponent.class);
        entitySerializer = new EntitySerializer(entityManager);
        componentLibrary = entityManager.getComponentLibrary();

        PrefabData prefabData = new PrefabData();
        prefabData.addComponent(new StringComponent("Value"));
        prefab = Assets.generateAsset(new AssetUri(AssetType.PREFAB, "test:Test"), prefabData, Prefab.class);
    }
View Full Code Here

Examples of org.terasology.entitySystem.stubs.StringComponent

    }

    @Test
    public void testDeltaChangedComponent() throws Exception {
        EntityRef entity = entityManager.create(prefab);
        StringComponent comp = entity.getComponent(StringComponent.class);
        comp.value = "Delta";
        entity.saveComponent(comp);
        EntityData.Entity entityData = entitySerializer.serialize(entity);

        assertEquals(entity.getId(), entityData.getId());
View Full Code Here

Examples of org.terasology.entitySystem.stubs.StringComponent

    }

    @Test
    public void testDeltaLoadChangedComponent() throws Exception {
        EntityRef entity = entityManager.create("test:Test");
        StringComponent comp = entity.getComponent(StringComponent.class);
        comp.value = "Delta";
        entity.saveComponent(comp);
        EntityData.Entity entityData = entitySerializer.serialize(entity);
        entityManager.clear();
        EntityRef loadedEntity = entitySerializer.deserialize(entityData);
View Full Code Here

Examples of org.terasology.entitySystem.stubs.StringComponent

    }
   

    @Test
    public void globalEntitiesStoredAndRestored() throws Exception {
        EntityRef entity = entityManager.create(new StringComponent("Test"));
        int entityId = entity.getId();

        esm.waitForCompletionOfPreviousSaveAndStartSaving();
        esm.finishSavingAndShutdown();
        EngineEntityManager newEntityManager = new EntitySystemBuilder().build(moduleManager.getEnvironment(), networkSystem, new ReflectionReflectFactory());
View Full Code Here

Examples of org.terasology.entitySystem.stubs.StringComponent

        entity = entityManager.create();
    }

    @Test
    public void testSendEventToEntity() {
        StringComponent component = entity.addComponent(new StringComponent());

        TestEventHandler handler = new TestEventHandler();
        eventSystem.registerEventHandler(handler);

        TestEvent event = new TestEvent();
View Full Code Here

Examples of org.terasology.entitySystem.stubs.StringComponent

    }

    @Test
    public void testSendEventToEntityWithMultipleComponents() {
        StringComponent stringComponent = entity.addComponent(new StringComponent());
        IntegerComponent intComponent = entity.addComponent(new IntegerComponent());

        TestEventHandler handler = new TestEventHandler();
        eventSystem.registerEventHandler(handler);
View Full Code Here

Examples of org.terasology.entitySystem.stubs.StringComponent

    }

    @Test
    public void testSendEventToEntityComponent() {
        StringComponent component = entity.addComponent(new StringComponent());
        IntegerComponent intComponent = entity.addComponent(new IntegerComponent());

        TestEventHandler handler = new TestEventHandler();
        eventSystem.registerEventHandler(handler);
View Full Code Here

Examples of org.terasology.entitySystem.stubs.StringComponent

        assertEquals(entity, handler.receivedList.get(0).entity);
    }

    @Test
    public void testNoReceiveEventWhenMissingComponents() {
        StringComponent component = entity.addComponent(new StringComponent());

        TestCompoundComponentEventHandler handler = new TestCompoundComponentEventHandler();
        eventSystem.registerEventHandler(handler);

        TestEvent event = new TestEvent();
View Full Code Here

Examples of org.terasology.entitySystem.stubs.StringComponent

        assertEquals(0, handler.receivedList.size());
    }

    @Test
    public void testReceiveEventRequiringMultipleComponents() {
        StringComponent stringComponent = entity.addComponent(new StringComponent());
        IntegerComponent intComponent = entity.addComponent(new IntegerComponent());

        TestCompoundComponentEventHandler handler = new TestCompoundComponentEventHandler();
        eventSystem.registerEventHandler(handler);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.