public interface DisplaySettingsChangedEvent extends MMEvent
DataViewer implementations post an instance of this
event when told to change the display settings (this is usually handled by
AbstractDataViewer). Implementations then subscribe to this event,
and in their handler(s) arrange to apply the new settings.
DataViewer.setDisplaySettings and other methods that can result in
new display settings can be called on any thread. This event is posted from
any such calling thread. Thus, handlers for this event must be prepared to
be called on any thread, including the Swing/AWT event dispatch thread
It is guaranteed that only a single instance of this event will ever be posted concurrently for a given data viewer, and that such posting will happen in the correct order.
Although applying display settings almost always requires interaction with
UI components, handlers for this event must not perform any action
synchronously on the EDT (such as by calling
SwingUtilities.invokeAndWait). Instead, actions on the EDT should be
deferred until a later time (such as by calling
This event may be posted at a relatively high frequency (up to 60 times per second under normal conditions, though there is no guaranteed upper limit), so well-designed handlers should defer time-consuming operations to a later time.
It is okay for objects not directly related to the data viewer to subscribe to this event, but they must obey the same rules regarding threading and performance.
The default implementation of this event posts on the DataViewer event bus.
|Modifier and Type||Method and Description|
Get the data viewer.
Get the new display settings.
Get the display settings before the change being handled.
Comparing this with the return value of
reveal what exactly is to be changed.
@Deprecated DataViewer getDisplay()