本文整理匯總了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