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

📄 copilothelpergui.java.svn-base

📁 這是一個JAVA語言寫的多代理人程式用來模擬飛機起飛或是降落的程式
💻 SVN-BASE
字号:
package gui;

import java.util.Collection;

import world.Airport;
import world.Runway;
import world.Taxiway;
import world.Gate;
import world.Strip;
import world.TRACON;
import world.Weather;
import world.Waypoint;
import base.WorldObject;
//import interfaces.PilotInterface;

//import agents.GroundControllerAgent;
//import agents.LocalControllerAgent;
import agents.CoPilotAgent;

public class CoPilotHelperGUI extends WorldObject
{
	//private Airport airport;
	private CoPilotGUI coPilotGUI;
	private PilotHelperGUI pilot;
	
	private ClearanceDeliveryHelper clearanceDelivery;

	//arrival
	private String callNumber;
	private Runway runway;
	private Gate gate;
	private String approach;
	private String destination;
	private Collection<Runway> path;
	private LocalControlHelperGUI localController;
	private Runway lastPath;
	private Collection<Taxiway> taxiInstruction;
	private Strip arrival;

	//departure
	private Weather report;
	private GroundControlHelperGUI groundController;
	private Collection<Waypoint> procedure;
	private Runway takeoffRunway;
	private TRACON departureControl;
	private Taxiway currentPosition;
	
	public CoPilotHelperGUI( Airport airportTemp, CoPilotGUI coPilotGUITemp, PilotHelperGUI pilotTemp )
	{
		//airport = airportTemp;
		coPilotGUI = coPilotGUITemp;
		pilot = pilotTemp;

		clearanceDelivery = null;
		
		callNumber = "";
		runway = null;
		gate = null;
		approach = "";
		destination = "";
		path = null;
		localController = null;
		lastPath = null;
		taxiInstruction = null;
		arrival = null;

		report = null;
		groundController = null;
		procedure = null;
		takeoffRunway = null;
		departureControl = null;
		currentPosition = null;
		
		updateInfo();
	}
	
	private void updateInfo()
	{
		coPilotGUI.update( runway, gate, approach, destination, path, localController, lastPath, taxiInstruction, arrival, report, groundController, procedure, takeoffRunway, departureControl );
	}
	
	public void setClearanceDelivery( ClearanceDeliveryHelper clearanceDelivery )
	{
		this.clearanceDelivery = clearanceDelivery;
	}
	
	/*incoming messages*/
	
	//arrivals
	public void msgPrepareForLanding()
	{
		coPilotGUI.getMessageWindow().addMessage( "Prepare For Landing" );
		String[] options = { "Arrival Checklist Successful" };
		coPilotGUI.getRadioWindow().changeOptions( options );
	}
	
	//departures
	public void msgPrepareForDeparture()
	{
		coPilotGUI.getMessageWindow().addMessage( "Prepare For Departure" );
		String[] options = { "Departure Checklist Successful" };
		coPilotGUI.getRadioWindow().changeOptions( options );	
	}
	
	//non normative
	public void pilotUnavailable()
	{
		coPilotGUI.getMessageWindow().addMessage( "Pilot Unavailable" );
		String[] options = { "CoPilot Taking Over As Pilot" };
		coPilotGUI.getRadioWindow().changeOptions( options );
	}
	
	public void pilotIsBack()
	{
		coPilotGUI.getMessageWindow().addMessage( "Pilot Is Back" );
	}
	
	public void prepareForArrival()
	{
		coPilotGUI.getMessageWindow().addMessage( "Prepare For Arrival" );
		String[] options = { "Arrival Checklist Successful", "Arrival Checklist Unsuccessful" };
		coPilotGUI.getRadioWindow().changeOptions( options );
	}
	
	public void prepareForDeparture()
	{
		coPilotGUI.getMessageWindow().addMessage( "Prepare For Departure" );
		String[] options = { "Departure Checklist Successful", "Departure Checklist Unsuccessful" };
		coPilotGUI.getRadioWindow().changeOptions( options );
	}
	
	/*outgoing messages*/
	
	//arrivals
	public void msgArrivalChecklistSuccessful()
	{
		pilot.msgArrivalChecklistSuccessful();
	}
	
	//departures
	public void msgDepartureChecklistSuccessful()
	{
		pilot.msgDepartureChecklistSuccessful();
	}
	
	//non normative
	public void coPilotTakingOverAsPilot()
	{
		pilot.coPilotTakingOverAsPilot();
	}
	
	public void arrivalChecklistUnsuccessful()
	{
		pilot.arrivalChecklistUnsuccessful();
	}
	
	public void arrivalChecklistSuccessful()
	{
		pilot.arrivalChecklistSuccessful();
	}
	
	public void departureChecklistUnsuccessful()
	{
		pilot.departureChecklistUnsuccessful();
	}
	
	public void departureChecklistSuccessful()
	{
		pilot.departureChecklistSuccessful();
	}
}

⌨️ 快捷键说明

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