コード例 #1
0
 public static void openProducedItemDescription(
     final MouseEvent e, final RecipeView recipeView, final Window window) {
   if (e.getButton() != 3) {
     return;
   }
   final UICraftItemDetailMessage msg = new UICraftItemDetailMessage();
   msg.setParentWindowId((window == null) ? null : window.getElementMap().getId());
   msg.setItem(recipeView);
   Worker.getInstance().pushMessage(msg);
 }
コード例 #2
0
 public static void openProducedItemDescription(
     final MouseEvent e, final AbstractCraftHarvestElement element, final Window window) {
   if (e.getButton() != 3) {
     return;
   }
   final AbstractReferenceItem referenceItem =
       ReferenceItemManager.getInstance().getReferenceItem(element.getItemId());
   if (referenceItem == null) {
     return;
   }
   final Item item = new Item(referenceItem.getId());
   item.initializeWithReferenceItem(referenceItem);
   final UIItemDetailMessage msg = new UIItemDetailMessage();
   msg.setId(16415);
   msg.setParentWindowId((window == null) ? null : window.getElementMap().getId());
   msg.setItem(item);
   Worker.getInstance().pushMessage(msg);
 }
コード例 #3
0
 public static void switchToFreeMode(final SelectionChangedEvent e) {
   final UIMessage msg = new UIMessage();
   msg.setId(16851);
   msg.setBooleanValue(e.isSelected());
   Worker.getInstance().pushMessage(msg);
 }