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

class
	GUADALCANAL_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
			mainland := mainland_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}
--			marker.center_on_dot (dot)
			marker.set_x_y (dot.x, dot.y)
			center_on (404, 458)
			translate_widget (land, 5, -18)
			scale_widget (land, 0.6)
			rotate_widget (land, 14.0)
			translate_widget (name_mt, 0, 0)
			translate_widget (marker, 5, -8)
		end

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

feature -- Status report

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

feature {NONE} -- Implementation

	mainland: EV_MODEL_POLYGON

feature {NONE} -- Implementation

	mainland_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 (5.925925925925867, -2.6666666666666856))
			Result.extend_point (create {EV_COORDINATE}.make_precise (11.259259259259238, 0.88888888888891415))
			Result.extend_point (create {EV_COORDINATE}.make_precise (16, 4.740740740740705))
			Result.extend_point (create {EV_COORDINATE}.make_precise (26.074074074074019, 4.1481481481480955))
			Result.extend_point (create {EV_COORDINATE}.make_precise (38.222222222222285, 5.6296296296296191))
			Result.extend_point (create {EV_COORDINATE}.make_precise (45.037037037037067, 6.8148148148147811))
			Result.extend_point (create {EV_COORDINATE}.make_precise (45.925925925925867, 11.555555555555543))
			Result.extend_point (create {EV_COORDINATE}.make_precise (49.185185185185219, 13.333333333333314))
			Result.extend_point (create {EV_COORDINATE}.make_precise (50.370370370370438, 17.777777777777828))
			Result.extend_point (create {EV_COORDINATE}.make_precise (54.814814814814781, 20.444444444444457))
			Result.extend_point (create {EV_COORDINATE}.make_precise (55.703703703703695, 24))
			Result.extend_point (create {EV_COORDINATE}.make_precise (57.777777777777828, 25.777777777777828))
			Result.extend_point (create {EV_COORDINATE}.make_precise (47.111111111111086, 29.629629629629619))
			Result.extend_point (create {EV_COORDINATE}.make_precise (42.370370370370438, 26.370370370370324))
			Result.extend_point (create {EV_COORDINATE}.make_precise (37.925925925925867, 27.259259259259238))
			Result.extend_point (create {EV_COORDINATE}.make_precise (29.925925925925867, 23.703703703703695))
			Result.extend_point (create {EV_COORDINATE}.make_precise (21.629629629629562, 24))
			Result.extend_point (create {EV_COORDINATE}.make_precise (13.333333333333371, 25.185185185185219))
			Result.extend_point (create {EV_COORDINATE}.make_precise (8.2962962962963047, 20.444444444444457))
			Result.extend_point (create {EV_COORDINATE}.make_precise (5.3333333333333712, 19.555555555555543))
			Result.extend_point (create {EV_COORDINATE}.make_precise (4.4444444444444571, 16))
			Result.extend_point (create {EV_COORDINATE}.make_precise (0.88888888888891415, 10.666666666666629))
			Result.extend_point (create {EV_COORDINATE}.make_precise (1.4814814814815236, 8.2962962962963047))
			Result.extend_point (create {EV_COORDINATE}.make_precise (0.29629629629630472, 5.6296296296296191))
		end

feature {NONE} -- Implementation

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

end
