本文整理汇总了Java中net.mostlyoriginal.api.event.common.Subscribe类的典型用法代码示例。如果您正苦于以下问题:Java Subscribe类的具体用法?Java Subscribe怎么用?Java Subscribe使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Subscribe类属于net.mostlyoriginal.api.event.common包,在下文中一共展示了Subscribe类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: distanceChanged
import net.mostlyoriginal.api.event.common.Subscribe; //导入依赖的package包/类
@Subscribe
protected void distanceChanged( EditEvent event )
{
if ( mDistanceIndicator.has(event.entity) && mLabel.has(event.entity))
{
Label label = mLabel.get(event.entity);
DistanceIndicator distanceIndicator = mDistanceIndicator.get(event.entity);
try {
int distanceTraveled = Integer.valueOf(label.text);
if ( distanceIndicator.travelTime > 0 && distanceTraveled > 0 ) {
float scale = distanceTraveled / distanceIndicator.travelTime;
if ( scale != 1) {
MapMetadata metadata = mapMetadataManager.getMetadata();
metadata.unitsPerPixel = MathUtils.clamp(metadata.unitsPerPixel*scale,0.01f,10f);
refreshHandlerSystem.restart();
}
}
} catch ( NumberFormatException e ) {
}
}
}
示例2: handleConstruction
import net.mostlyoriginal.api.event.common.Subscribe; //导入依赖的package包/类
/** Construction started on parts. */
@Subscribe
public void handleConstruction( StartConstructionEvent event )
{
switch ( event.type ) {
case ENGINE : complete(TutorialSystem.Step.PLACE_ENGINE);
case STORAGEPOD : complete(TutorialSystem.Step.PLACE_STORAGEPOD);
}
}
示例3: handleConstructableSelection
import net.mostlyoriginal.api.event.common.Subscribe; //导入依赖的package包/类
/** Constructable selected in UI. */
@Subscribe
public void handleConstructableSelection ( SelectConstructionEvent event )
{
switch ( event.type ) {
case ENGINE : complete(TutorialSystem.Step.SELECT_ENGINE);
case STORAGEPOD : complete(TutorialSystem.Step.SELECT_STORAGEPOD);
}
}
示例4: listenerMoved
import net.mostlyoriginal.api.event.common.Subscribe; //导入依赖的package包/类
@Subscribe
public void listenerMoved(DragEvent event) {
delayedRestart();
}
示例5: testListener
import net.mostlyoriginal.api.event.common.Subscribe; //导入依赖的package包/类
@Subscribe
public void testListener(BasicEvent event) { }
示例6: testListener2
import net.mostlyoriginal.api.event.common.Subscribe; //导入依赖的package包/类
@Subscribe
public void testListener2(Event2 event) { }
示例7: testEvent
import net.mostlyoriginal.api.event.common.Subscribe; //导入依赖的package包/类
@Subscribe
public void testEvent(BasicTestEvent event) {
count++;
}
示例8: testEvent
import net.mostlyoriginal.api.event.common.Subscribe; //导入依赖的package包/类
@Subscribe
public void testEvent(BasicTestEvent event) {
count++;
}
示例9: testListener
import net.mostlyoriginal.api.event.common.Subscribe; //导入依赖的package包/类
@Subscribe
public void testListener(ExtendedBasicTestEvent event) { }
示例10: testListener2
import net.mostlyoriginal.api.event.common.Subscribe; //导入依赖的package包/类
@Subscribe
public void testListener2(BasicTestEvent event) { }
示例11: testListener
import net.mostlyoriginal.api.event.common.Subscribe; //导入依赖的package包/类
@Subscribe(priority = 5, ignoreCancelledEvents = true)
public void testListener(ExtendedBasicTestEvent event) { }
开发者ID:DaanVanYperen,项目名称:artemis-odb-contrib,代码行数:3,代码来源:SubscribeAnnotationParameterTestSystem.java