Codota Logo
jsettlers.common.action
Code IndexAdd Codota to your IDE (free)

How to use jsettlers.common.action

Best Java code snippets using jsettlers.common.action (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: jsettlers/settlers-remake

  @Override
  public String toString() {
    return "SetAcceptedStockMaterialAction [material=" + material + ", accept=" + accept + ", getPosition()=" + getPosition() + "]";
  }
}
origin: jsettlers/settlers-remake

  @Override
  public PointAction getSelectAction(ShortPoint2D position) {
    return new SetTradingWaypointAction(wp, position);
  }
});
origin: jsettlers/settlers-remake

  @Override
  public PointAction getSelectAction(ShortPoint2D position) {
    return new SetDockAction(position);
  }
});
origin: jsettlers/settlers-remake

/**
 * This allows the current panel to catch actions that are executed.
 *
 * @param action
 *         The action to catch.
 * @return The action to override with. May be <code>null</code> to cancel.
 */
public IAction catchAction(IAction action) {
  PointAction overrideAction;
  if (action.getActionType() == EActionType.SELECT_POINT
      && (overrideAction = getSelectAction(((PointAction) action).getPosition())) != null) {
    return overrideAction;
  } else {
    return action;
  }
}
origin: jsettlers/settlers-remake

@Override
public IAction catchAction(IAction action) {
  if ((action.getActionType() == EActionType.MOVE_TO || action.getActionType() == EActionType.ABORT) && activeBuilding != null) {
    action = new ShowConstructionMarksAction(null);
  }
  if (action.getActionType() == EActionType.SHOW_CONSTRUCTION_MARK) {
    setActiveBuilding(((ShowConstructionMarksAction) action).getBuildingType());
  }
  return super.catchAction(action);
}
origin: jsettlers/settlers-remake

@Override
public void eventDataChanged(GOEvent event) {
  Action action = getActionForDraw((GODrawEvent) event);
  if (action != null && action.getActionType() == EActionType.PAN_TO) {
    minimap.getContext().scrollTo(
        ((PointAction) action).getPosition());
  }
}
origin: jsettlers/settlers-remake

/**
 * @return Returns the position of the manager whose settings will be changed.
 */
@Override
public ShortPoint2D getPosition() {
  return super.getPosition();
}
origin: jsettlers/settlers-remake

  @Override
  public IAction catchAction(IAction action) {
    if (action.getActionType() == EActionType.ABORT) {
      return new Action(EActionType.DESELECT);
    }
    return super.catchAction(action);
  }
}
origin: jsettlers/settlers-remake

  @Override
  public Action getAction(float relativeX, float relativeY) {
    int step = (int) (relativeX * NUMBER_OF_BUTTONS) - 1;
    if (step >= 0) {
      return getActionForStep(step);
    } else {
      return new Action(EActionType.ASK_SET_DOCK);
    }
  }
}
origin: jsettlers/settlers-remake

@Override
public PointAction getSelectAction(ShortPoint2D position) {
  if (activeBuilding != null) {
    return new BuildAction(activeBuilding, position);
  } else {
    return null;
  }
}
origin: jsettlers/settlers-remake

  @Override
  public PointAction getSelectAction(ShortPoint2D position) {
    return new PointAction(EActionType.SET_WORK_AREA, position);
  }
});
origin: jsettlers/settlers-remake

@Override
public Action getAction() {
  return new SetBuildingPriorityAction(next);
}
origin: jsettlers/settlers-remake

@Override
public Action getAction() {
  if (selectionManager != null) {
    EMaterialType selected = selectionManager.getSelected();
    if (selected != null) {
      return new ChangeTradingRequestAction(selected, amount, relative);
    }
  }
  return null;
}
origin: jsettlers/settlers-remake

  public Action getAction() {
    return new SetMaterialProductionAction(positionSupplier.getPosition(), materialType, productionType, 0);
  }
}
origin: jsettlers/settlers-remake

  /**
   * Create a new soldier button.
   *
   * @param actionType
   *            The action to perform on click.
   * @param type
   *            The soldier type.
   * @param image
   *            The image to use.
   */
  public SoldierButton(EActionType actionType, ESoldierType type, ImageLink image) {
    super(new SoldierAction(actionType, type), image, image, Labels.getString("action_" + actionType + "_" + type));
  }
}
origin: jsettlers/settlers-remake

@Override
public Action getAction() {
  if (selectedProvider == null || mapPositionProvider == null) {
    return null;
  }
  EMaterialType selected = selectedProvider.get();
  ShortPoint2D mapPosition = mapPositionProvider.get();
  if (selected == null || mapPosition == null) {
    return null;
  }
  return new SetAcceptedStockMaterialAction(mapPosition, selected, accept, local);
}
origin: jsettlers/settlers-remake

  @Override
  public Action getAction() {
    if (panel == null) {
      return null;
    }
    EMaterialType selected = panel.getSelected();
    ShortPoint2D mapPosition = panel.getMapPosition();
    if (selected == null || mapPosition == null) {
      return null;
    }
    EMaterialType[] order = panel.reorder(selected, panel.indexOf(selected) + add);
    return new SetMaterialPrioritiesAction(mapPosition, order);
  }
}
origin: jsettlers/settlers-remake

/**
 * @return Returns the position of the manager whose settings will be changed.
 */
@Override
public ShortPoint2D getPosition() {
  return super.getPosition();
}
origin: jsettlers/settlers-remake

public SelectPointMessage(String message) {
  super(message, null, null,
      Labels.getString("abort"), new Action(EActionType.ABORT));
}
origin: jsettlers/settlers-remake

public SimpleActionButton(EActionType actionType, ImageLink image, ImageLink active) {
  super(new Action(actionType), image, active, Labels.getName(actionType));
}
jsettlers.common.action

Most used classes

  • PointAction
    This action states that the user wants something to move to the given position.
  • IAction
  • SetAcceptedStockMaterialAction
    This Action allows you to change the partition default settings for putting materials in stock.
  • Action
    This is a action the user has requested. Each Action has an active status, that indicates that it is
  • BuildAction
    This is a build action. This happens when the user clicks on a map position to build a building ther
  • ConvertAction,
  • ScreenChangeAction,
  • SelectAreaAction,
  • SetBuildingPriorityAction,
  • SetDockAction,
  • SetMaterialDistributionSettingsAction,
  • SetMaterialPrioritiesAction,
  • SetMaterialProductionAction,
  • SetTradingWaypointAction,
  • ShowConstructionMarksAction,
  • SoldierAction,
  • SetMaterialProductionAction$EMaterialProductionType,
  • SetTradingWaypointAction$EWaypointType
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now