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

class
	KWAJALEIN_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
			kwajalein_atoll := kwajalein_atoll_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 (469, 350)
			scale_widget (land, 0.27)
			rotate_widget (land, 13.0)
			translate_widget (land, 0, -20)
			translate_widget (name_mt, 0, 2)
			translate_widget (dot, 2, -2)
--			marker.center_on_dot (dot)
			marker.set_x_y (dot.x, dot.y)
		end

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

feature -- Status report

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

feature {NONE} -- Implementation

	kwajalein_atoll: EV_MODEL_POLYGON

feature {NONE} -- Implementation

	kwajalein_atoll_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 (14.222222222222229, 0.59259259259272312))
			Result.extend_point (create {EV_COORDINATE}.make_precise (24.888888888888914, -2.9629629629630472))
			Result.extend_point (create {EV_COORDINATE}.make_precise (43.259259259259068, 2.074074074074133))
			Result.extend_point (create {EV_COORDINATE}.make_precise (52.148148148147982, -0.88888888888902784))
			Result.extend_point (create {EV_COORDINATE}.make_precise (55.407407407407334, -0.59259259259249575))
			Result.extend_point (create {EV_COORDINATE}.make_precise (62.222222222222229, -6.8148148148146674))
			Result.extend_point (create {EV_COORDINATE}.make_precise (64.296296296296248, 2.074074074074133))
			Result.extend_point (create {EV_COORDINATE}.make_precise (75.5555555555556, 13.333333333333258))
			Result.extend_point (create {EV_COORDINATE}.make_precise (85.92592592592581, 23.111111111110972))
			Result.extend_point (create {EV_COORDINATE}.make_precise (83.851851851851791, 28.444444444444457))
			Result.extend_point (create {EV_COORDINATE}.make_precise (87.999999999999716, 39.703703703703582))
			Result.extend_point (create {EV_COORDINATE}.make_precise (83.851851851851791, 44.740740740740875))
			Result.extend_point (create {EV_COORDINATE}.make_precise (84.148148148147982, 58.37037037037021))
			Result.extend_point (create {EV_COORDINATE}.make_precise (72.296296296296248, 51.259259259259352))
			Result.extend_point (create {EV_COORDINATE}.make_precise (66.666666666666686, 44.148148148148266))
			Result.extend_point (create {EV_COORDINATE}.make_precise (65.185185185185162, 35.851851851851507))
			Result.extend_point (create {EV_COORDINATE}.make_precise (67.5555555555556, 31.111111111110972))
			Result.extend_point (create {EV_COORDINATE}.make_precise (59.5555555555556, 24.592592592592723))
			Result.extend_point (create {EV_COORDINATE}.make_precise (50.370370370370381, 21.62962962962979))
			Result.extend_point (create {EV_COORDINATE}.make_precise (39.703703703703525, 24))
			Result.extend_point (create {EV_COORDINATE}.make_precise (32.88888888888863, 19.555555555555657))
			Result.extend_point (create {EV_COORDINATE}.make_precise (27.259259259259125, 20.740740740740875))
			Result.extend_point (create {EV_COORDINATE}.make_precise (26.074074074073962, 14.814814814814895))
			Result.extend_point (create {EV_COORDINATE}.make_precise (24.296296296296248, 17.185185185185333))
			Result.extend_point (create {EV_COORDINATE}.make_precise (15.407407407407334, 11.259259259259352))
			Result.extend_point (create {EV_COORDINATE}.make_precise (8.5925925925924389, 7.4074074074075043))
			Result.extend_point (create {EV_COORDINATE}.make_precise (2.9629629629628198, 4.4444444444444571))
		end

feature {NONE} -- Implementation

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

end
