Package uk.ac.starlink.topcat.plot2
Class SingleAdapterAxesController<P,A>
java.lang.Object
uk.ac.starlink.topcat.plot2.SingleAdapterAxesController<P,A>
- All Implemented Interfaces:
AxesController<P,
,A> Configger
AxesController implementation for use with one-zone plots.
This is a wrapper around the legacy
AxisController
class.- Since:
- 18 Aug 2023
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionSingleAdapterAxesController
(AxisController<P, A> axisController) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addActionListener
(ActionListener listener) Adds a listener notified when any of the controls changes.void
configureForLayers
(LayerControl[] layerControls) Provides a hook for implementations to adjust their GUI state based on the layer controls which will be supplying layers for them to plot.static <P,
A> SingleAdapterAxesController <P, A> create
(AxisController<P, A> axisController) Utiilty method for instance construction.uk.ac.starlink.ttools.plot2.config.ConfigMap
Returns a configuration map.Control[]
Returns all the controls for user configuration of this controller.List
<ZoneController<P, A>> getZoneControllers
(uk.ac.starlink.ttools.plot2.Ganger<P, A> ganger) Returns a list of zone contollers, one for each zone defined by a supplied ganger.void
removeActionListener
(ActionListener listener) Removes a listener previously added by addActionListener.
-
Constructor Details
-
SingleAdapterAxesController
Constructor. The supplied axisController provides the behaviour for the methods of both this instance and of the sole ZoneController which it dispenses.- Parameters:
axisController
- object to which behaviour is delegated- See Also:
-
-
Method Details
-
configureForLayers
Description copied from interface:AxesController
Provides a hook for implementations to adjust their GUI state based on the layer controls which will be supplying layers for them to plot.- Specified by:
configureForLayers
in interfaceAxesController<P,
A> - Parameters:
layerControls
- layer controls expected to provide layers to be plotted on these axes
-
getZoneControllers
Description copied from interface:AxesController
Returns a list of zone contollers, one for each zone defined by a supplied ganger.- Specified by:
getZoneControllers
in interfaceAxesController<P,
A> - Parameters:
ganger
- ganger, assumed to be compatible with this controller- Returns:
- list of zone controllers, one for each zone defined by the ganger
-
getStackControls
Description copied from interface:AxesController
Returns all the controls for user configuration of this controller. This includes the main control and possibly others.- Specified by:
getStackControls
in interfaceAxesController<P,
A> - Returns:
- user controls
-
getConfig
public uk.ac.starlink.ttools.plot2.config.ConfigMap getConfig()Description copied from interface:Configger
Returns a configuration map. Calling this method will typically gather information from a GUI to return. -
addActionListener
Description copied from interface:AxesController
Adds a listener notified when any of the controls changes.- Specified by:
addActionListener
in interfaceAxesController<P,
A> - Parameters:
listener
- listener to add
-
removeActionListener
Description copied from interface:AxesController
Removes a listener previously added by addActionListener.- Specified by:
removeActionListener
in interfaceAxesController<P,
A> - Parameters:
listener
- listener to remove
-
create
Utiilty method for instance construction. Convenient for use with generics.- Parameters:
axisController
- object to which behaviour is delegated- Returns:
- new instance
-