jawpoptionsvo.java
来自「Java mulitplayer strategy game. Adaptati」· Java 代码 · 共 107 行
JAVA
107 行
/*
* JAWPOptionsVO.java
*
* Created on 1 listopad 2005, 12:03
*
* To change this template, choose Tools | Options and locate the template under
* the Source Creation and Management node. Right-click the template and choose
* Open. You can then make changes to the template in the Source Editor.
*/
package net.sf.jawp.api.domain.stub;
import net.sf.jawp.api.domain.Density;
import net.sf.jawp.api.domain.GameSpeed;
import net.sf.jawp.api.domain.JAWPOptions;
import net.sf.jbull.util.BeanHelper;
import net.sf.jbull.util.BeanWorker;
/**
*
* @author jarek
*/
public class JAWPOptionsVO extends JAWPOptions
{
public static final int INITIAL_NUMBER_OF_PLANETS = 5;
private static final long serialVersionUID = 1L;
private static final BeanWorker<JAWPOptions, JAWPOptionsVO> COPIER =
BeanHelper.getInstance().getWorker( JAWPOptions.class, JAWPOptionsVO.class, JAWPOptions.class);
private GameSpeed gameSpeed;
private int neutralPlanets;
private Density planetsDensity;
private int cpuPlayers;
public JAWPOptionsVO(final JAWPOptions src)
{
COPIER.copy( src, this);
}
/**
*
*/
private JAWPOptionsVO()
{
}
public static JAWPOptionsVO createDefault()
{
final JAWPOptionsVO result = new JAWPOptionsVO();
result.setGameSpeed( new GameSpeed());
result.setPlanetsDensity(Density.NORMAL);
result.setNeutralPlanets(INITIAL_NUMBER_OF_PLANETS );
result.setCpuPlayers(2);
return result;
}
public final GameSpeed getGameSpeed()
{
return this.gameSpeed;
}
public final int getNeutralPlanets()
{
return this.neutralPlanets;
}
public final Density getPlanetsDensity()
{
return this.planetsDensity;
}
public final void setGameSpeed(final GameSpeed gameSpeed)
{
this.gameSpeed = gameSpeed;
}
public final void setNeutralPlanets(final int neutralPlanets)
{
this.neutralPlanets = neutralPlanets;
}
public final void setPlanetsDensity(final Density planetsDensity)
{
this.planetsDensity = planetsDensity;
}
public final int getCpuPlayers()
{
return cpuPlayers;
}
public final void setCpuPlayers(int cpuPlayers)
{
this.cpuPlayers = cpuPlayers;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?