當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。