note
	description: "[
		The widget representing this port
		]"
	author: "Jimmy J. Johnson"

class
	MIDWAY_WIDGET

inherit

--	GREEN_PORT_WIDGET
--		undefine
--			paint
--		redefine
--			create_interface_objects,
--			initialize,
--			position_widgets,
--			build_land
--		end

	ISLAND_PORT_WIDGET
		redefine
			create_interface_objects,
--			initialize,
			position_widgets,
			build_land,
			rotation_amount
		end

create
	make

feature {NONE} -- Initialization

	create_interface_objects
			-- Initialize attributes
		do
			henderson_field := henderson_field_imp
			aux_field := aux_field_imp
			Precursor {ISLAND_PORT_WIDGET}
--			Precursor {GREEN_PORT_WIDGET}
		end

--	initialize
--			-- Set up the widgets in Current.
--		do
--			Precursor {ISLAND_PORT_WIDGET}
----			Precursor {GREEN_PORT_WIDGET}
--		end

	position_widgets
			-- Move Current and contained widgets to correct
			-- location and set their their sizes
		do
			Precursor {ISLAND_PORT_WIDGET}
--			Precursor {GREEN_PORT_WIDGET}
			center_on (565, 217)
			translate_widget (land, -24, 0)
			translate_widget (name_mt, 1, 1)
			translate_widget (dot, 3, 3)
			scale_widget (land, 0.07)
			rotate_widget (land, 13.0)
--			marker.center_on_dot (dot)
			marker.set_x_y (dot.x, dot.y)
			translate_widget (marker, 5, 7)
		end

	build_land
			-- Add widgets to Current
		do
			Precursor {ISLAND_PORT_WIDGET}
			land.extend (henderson_field)
			land.extend (aux_field)
		end

feature -- Status report

	is_red: BOOLEAN = False
			-- Does Current represent a red (i.e. major) port?

feature {NONE} -- Implementation

	henderson_field: EV_MODEL_POLYGON
	aux_field: EV_MODEL_POLYGON

feature {NONE} -- Implementation

	henderson_field_imp: EV_MODEL_POLYGON
			-- Make the polygon
		do
			create Result
				-- Points generated by Grabber application
			Result.extend_point (create {EV_COORDINATE}.make_precise (0, 0))
			Result.extend_point (create {EV_COORDINATE}.make_precise (18, -15))
			Result.extend_point (create {EV_COORDINATE}.make_precise (55, -15))
			Result.extend_point (create {EV_COORDINATE}.make_precise (91, -24))
			Result.extend_point (create {EV_COORDINATE}.make_precise (110, -11))
			Result.extend_point (create {EV_COORDINATE}.make_precise (127, -6))
			Result.extend_point (create {EV_COORDINATE}.make_precise (144, -9))
			Result.extend_point (create {EV_COORDINATE}.make_precise (153, -5))
			Result.extend_point (create {EV_COORDINATE}.make_precise (152, 6))
			Result.extend_point (create {EV_COORDINATE}.make_precise (138, 8))
			Result.extend_point (create {EV_COORDINATE}.make_precise (130, 7))
			Result.extend_point (create {EV_COORDINATE}.make_precise (111, 14))
			Result.extend_point (create {EV_COORDINATE}.make_precise (106, 31))
			Result.extend_point (create {EV_COORDINATE}.make_precise (127, 34))
			Result.extend_point (create {EV_COORDINATE}.make_precise (139, 35))
			Result.extend_point (create {EV_COORDINATE}.make_precise (152, 32))
			Result.extend_point (create {EV_COORDINATE}.make_precise (155, 44))
			Result.extend_point (create {EV_COORDINATE}.make_precise (79, 80))
			Result.extend_point (create {EV_COORDINATE}.make_precise (80, 104))
			Result.extend_point (create {EV_COORDINATE}.make_precise (70, 86))
			Result.extend_point (create {EV_COORDINATE}.make_precise (48, 92))
			Result.extend_point (create {EV_COORDINATE}.make_precise (43, 99))
			Result.extend_point (create {EV_COORDINATE}.make_precise (-44, 131))
			Result.extend_point (create {EV_COORDINATE}.make_precise (-54, 125))
			Result.extend_point (create {EV_COORDINATE}.make_precise (-54, 119))
			Result.extend_point (create {EV_COORDINATE}.make_precise (-14, 67))
			Result.extend_point (create {EV_COORDINATE}.make_precise (-6, 41))
			Result.extend_point (create {EV_COORDINATE}.make_precise (-2, 19))
		end

	aux_field_imp: EV_MODEL_POLYGON
			-- Make the polygon
		do
			create Result
				-- Points generated by Grabber application
			Result.extend_point (create {EV_COORDINATE}.make_precise (237, 53))
			Result.extend_point (create {EV_COORDINATE}.make_precise (277, 40))
			Result.extend_point (create {EV_COORDINATE}.make_precise (306, 26))
			Result.extend_point (create {EV_COORDINATE}.make_precise (340, -9))
			Result.extend_point (create {EV_COORDINATE}.make_precise (344, -23))
			Result.extend_point (create {EV_COORDINATE}.make_precise (351, -16))
			Result.extend_point (create {EV_COORDINATE}.make_precise (366, 30))
			Result.extend_point (create {EV_COORDINATE}.make_precise (373, 37))
			Result.extend_point (create {EV_COORDINATE}.make_precise (370, 51))
			Result.extend_point (create {EV_COORDINATE}.make_precise (348, 57))
			Result.extend_point (create {EV_COORDINATE}.make_precise (342, 55))
			Result.extend_point (create {EV_COORDINATE}.make_precise (333, 61))
			Result.extend_point (create {EV_COORDINATE}.make_precise (310, 64))
			Result.extend_point (create {EV_COORDINATE}.make_precise (298, 62))
			Result.extend_point (create {EV_COORDINATE}.make_precise (284, 68))
			Result.extend_point (create {EV_COORDINATE}.make_precise (267, 62))
		end

feature {NONE} -- Implementation

	rotation_amount: REAL_64 = 45.0
			-- Make the arrow point north-east

end
