19928/jj_vitp/Interface/views/location_widgits_factory.e
Jocelyn Fiat 6dde6425c2 init
2024-06-17 09:09:33 +02:00

78 lines
1.5 KiB
Plaintext

note
description: "[
One of the classes that decompose the numourous VITP widgets
into more managable groups. This class models the widgets
that contain the ports AND sea areas.
]"
author: "Jimmy J. Johnson"
date: "5/15/24"
copyright: "Copyright (c) 2024, Jimmy J. Johnson"
license: "Eiffel Forum v2 (http://www.eiffel.com/licensing/forum.txt)"
class
LOCATION_WIDGITS_FACTORY
inherit
PORT_WIDGET_FACTORY
redefine
make_widgets,
extend_widgets,
pair_widgets,
fill_widgets
end
SEA_AREAS_FACTORY
redefine
make_widgets,
extend_widgets,
pair_widgets,
fill_widgets
end
create
make
feature -- Initialization
make_widgets
-- Create the widgets in Current
do
create location_widgets.make (100)
Precursor {PORT_WIDGET_FACTORY}
Precursor {SEA_AREAS_FACTORY}
end
feature -- Access
location_widgets: VITP_WIDGET_TABLE [LOCATION_WIDGET, LOCATION]
-- Keeps track of widgets
feature {NONE} -- Implementation
extend_widgets
-- Put each widget into `world'.
do
Precursor {PORT_WIDGET_FACTORY}
Precursor {SEA_AREAS_FACTORY}
location_widgets.merge (port_widgets)
location_widgets.merge (sea_area_widgets)
end
pair_widgets
-- Associate each widget with a unit
do
Precursor {PORT_WIDGET_FACTORY}
Precursor {SEA_AREAS_FACTORY}
end
fill_widgets
-- Call `set_target' to give each widget a target.
do
Precursor {PORT_WIDGET_FACTORY}
Precursor {SEA_AREAS_FACTORY}
end
end