⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 selectioncontroller.java

📁 Java mulitplayer strategy game. Adaptation of KDE Galaxy Conquest. (rules are changed - but still th
💻 JAVA
字号:
/*
 * SelectionController.java
 *
 * Created on 16 pa焏ziernik 2005, 21:49
 *
 * 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.util.ArrayList;

import net.sf.jawp.api.domain.Planet;

/**
 * 
 * @author jarek
 */
public class SelectionController
{
	private final ArrayList<SelectionListener> listeners;

	/** Creates a new instance of SelectionController */
	public SelectionController()
	{
		this.listeners = new ArrayList<SelectionListener>(5);
	}

	public final void addListener(final SelectionListener listener)
	{
		this.listeners.add(listener);
	}

	public final void removeListener(final SelectionListener listener)
	{
		listeners.remove(listener);
	}

	public final void selectPlanet(final Planet p, final MouseButton button)
	{
		for (final SelectionListener list : this.listeners)
		{
			list.onPlanetSelected(p, button);
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -