当前位置: 首页>>代码示例>>Java>>正文


Java EventDispatcher类代码示例

本文整理汇总了Java中com.github.czyzby.autumn.processor.event.EventDispatcher的典型用法代码示例。如果您正苦于以下问题:Java EventDispatcher类的具体用法?Java EventDispatcher怎么用?Java EventDispatcher使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


EventDispatcher类属于com.github.czyzby.autumn.processor.event包,在下文中一共展示了EventDispatcher类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ContextInitializer

import com.github.czyzby.autumn.processor.event.EventDispatcher; //导入依赖的package包/类
/** Creates a new context initializer with default annotation processors. */
public ContextInitializer() {
    // Default annotations:
    scannedMetaAnnotations.add(Processor.class);
    scannedMetaAnnotations.add(Provider.class);
    scannedAnnotations.add(Component.class);
    scannedAnnotations.add(Dispose.class);
    scannedAnnotations.add(OnEvent.class);
    scannedAnnotations.add(OnMessage.class);
    // Default processors:
    addProcessor(new MetaAnnotationProcessor()); // Registers annotation processors.
    addProcessor(new ProviderAnnotationProcessor()); // Registers dependency providers.
    addProcessor(new InjectAnnotationProcessor()); // Injects field dependencies.
    addProcessor(new InitiateAnnotationProcessor()); // Invokes initiation methods.
    addProcessor(new DestroyAnnotationProcessor()); // Schedules destruction methods upon disposing.
    addProcessor(new DisposeAnnotationProcessor()); // Schedules disposing of fields and components.
    addProcessor(new EventDispatcher()); // Registers event listeners. Allows to post events.
    addProcessor(new MessageDispatcher()); // Registers message listeners. Allows to post messages.
}
 
开发者ID:gdx-libs,项目名称:gdx-autumn,代码行数:20,代码来源:ContextInitializer.java

示例2: ContextInitializer

import com.github.czyzby.autumn.processor.event.EventDispatcher; //导入依赖的package包/类
/** Creates a new context initializer with default annotation processors. */
public ContextInitializer() {
    // Default annotations:
    scannedMetaAnnotations.add(Processor.class);
    scannedMetaAnnotations.add(Provider.class);
    scannedAnnotations.add(Component.class);
    scannedAnnotations.add(Dispose.class);
    scannedAnnotations.add(OnEvent.class);
    scannedAnnotations.add(OnMessage.class);
    // Default processors:
    addProcessor(new ComponentAnnotationProcessor()); // Maps components by interfaces.
    addProcessor(new MetaAnnotationProcessor()); // Registers annotation processors.
    addProcessor(new ProviderAnnotationProcessor()); // Registers dependency providers.
    addProcessor(new InjectAnnotationProcessor()); // Injects field dependencies.
    addProcessor(new InitiateAnnotationProcessor()); // Invokes initiation methods.
    addProcessor(new DestroyAnnotationProcessor()); // Schedules destruction methods upon disposing.
    addProcessor(new DisposeAnnotationProcessor()); // Schedules disposing of fields and components.
    addProcessor(new EventDispatcher()); // Registers event listeners. Allows to post events.
    addProcessor(new MessageDispatcher()); // Registers message listeners. Allows to post messages.
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:21,代码来源:ContextInitializer.java

示例3: setEventDispatcher

import com.github.czyzby.autumn.processor.event.EventDispatcher; //导入依赖的package包/类
public void setEventDispatcher(EventDispatcher eventDispatcher) {
    this.eventDispatcher = eventDispatcher;

    for (InputFile inputFile : inputFiles) {
        inputFile.setEventDispatcher(eventDispatcher);
    }
}
 
开发者ID:crashinvaders,项目名称:gdx-texture-packer-gui,代码行数:8,代码来源:PackModel.java

示例4: setEventDispatcher

import com.github.czyzby.autumn.processor.event.EventDispatcher; //导入依赖的package包/类
public void setEventDispatcher(EventDispatcher eventDispatcher) {
    this.eventDispatcher = eventDispatcher;
    fileType.setEventDispatcher(eventDispatcher);
    for (PackModel pack : packs) {
        pack.setEventDispatcher(eventDispatcher);
    }
}
 
开发者ID:crashinvaders,项目名称:gdx-texture-packer-gui,代码行数:8,代码来源:ProjectModel.java

示例5: onMessage

import com.github.czyzby.autumn.processor.event.EventDispatcher; //导入依赖的package包/类
/** Will be invoked any time "myMessage" is posted using {@link MessageDispatcher}. Note that annotated listener
 * methods can contain any injectable parameters, using the same mechanism as {@link Inject} or {@link Initiate}
 * annotations.
 *
 * @param eventDispatcher will be automatically injected. */
@OnMessage("myMessage")
public void onMessage(final EventDispatcher eventDispatcher) {
    LOGGER.info("I detected 'myMessage'. Posting MyEvent.");
    final MyEvent event = new MyEvent("MyHandler#onMessage");
    eventDispatcher.postEvent(event);
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:12,代码来源:MyHandler.java

示例6: setEventDispatcher

import com.github.czyzby.autumn.processor.event.EventDispatcher; //导入依赖的package包/类
public void setEventDispatcher(EventDispatcher eventDispatcher) {
    this.eventDispatcher = eventDispatcher;
}
 
开发者ID:crashinvaders,项目名称:gdx-texture-packer-gui,代码行数:4,代码来源:FileTypeModel.java

示例7: extractComponents

import com.github.czyzby.autumn.processor.event.EventDispatcher; //导入依赖的package包/类
@Initiate() void extractComponents(Context context, EventDispatcher eventDispatcher, MessageDispatcher messageDispatcher) {
    App.this.context = context;
    App.this.eventDispatcher = eventDispatcher;
    App.this.messageDispatcher = messageDispatcher;
}
 
开发者ID:crashinvaders,项目名称:gdx-texture-packer-gui,代码行数:6,代码来源:App.java

示例8: getEventDispatcher

import com.github.czyzby.autumn.processor.event.EventDispatcher; //导入依赖的package包/类
/** @return {@link EventDispatcher} allowing to post events to notify event listeners. */
public EventDispatcher getEventDispatcher() {
    return eventDispatcher;
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:5,代码来源:MyManualComponent.java

示例9: getEventDispatcher

import com.github.czyzby.autumn.processor.event.EventDispatcher; //导入依赖的package包/类
public EventDispatcher getEventDispatcher() { return eventDispatcher; } 
开发者ID:crashinvaders,项目名称:gdx-texture-packer-gui,代码行数:2,代码来源:App.java


注:本文中的com.github.czyzby.autumn.processor.event.EventDispatcher类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。