📄 colorshelper.java
字号:
/*
* ColorsHelper.java
*
* Created on 30 pa焏ziernik 2005, 23:19
*
* 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.gui.client;
import java.awt.Color;
import net.sf.jawp.api.domain.Planet;
import net.sf.jawp.client.GameData;
/**
*
* @author jarek
*/
public class ColorsHelper
{
private static final Color OWN = new Color( 0.0f, 0.5f, 0.0f);
private static final Color NEUTRAL = Color.GRAY;
private static final Color ENEMY = new Color( 1.0f, 0.2f, 0.2f);
public static final Color getColorFor( final Planet pl, final GameData mgr)
{
if ( mgr.isOwn( pl) )
{
return OWN;
}
if ( mgr.isNeutral( pl ))
{
return NEUTRAL;
}
return ENEMY;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -