Package net.geco.functions

Source Code of net.geco.functions.RecheckFunction

/**
* Copyright (c) 2010 Simon Denier
* Released under the MIT License (see LICENSE file)
*/
package net.geco.functions;

import net.geco.control.GecoControl;
import net.geco.control.RunnerControl;
import net.geco.model.Messages;
import net.geco.model.RunnerRaceData;

/**
* @author Simon Denier
* @since Nov 9, 2010
*
*/
public class RecheckFunction extends AbstractRunnerFunction {

  public RecheckFunction(GecoControl gecoControl) {
    super(gecoControl);
  }

  @Override
  public String toString() {
    return Messages.uiGet("RecheckFunction.RecheckTitle"); //$NON-NLS-1$
  }

  @Override
  public String executeTooltip() {
    return Messages.uiGet("RecheckFunction.ExecuteTooltip"); //$NON-NLS-1$
  }

  @Override
  protected boolean acceptRunnerData(RunnerRaceData runnerRaceData) {
    return runnerRaceData.statusIsRecheckable();
  }

  @Override
  public void execute() {
    RunnerControl runnerControl = getService(RunnerControl.class);
    for (RunnerRaceData runnerData : selectedRunners()) {
      if( runnerData.statusIsRecheckable() ){
        runnerControl.recheckRunner(runnerData);
      }
    }
  }


}
TOP

Related Classes of net.geco.functions.RecheckFunction

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.