public class CompoundView extends Object implements PersistableMonitorView
DefaultView for an example of use).
The current implementation supports two simple child view modes:
AbstractMonitorView SPI on
child views can be added if necessary.
Calls to setFilter(...) are forwarded to children as well.
That means children added before and after this call are treated differently.
All setters should be called before install().
| Modifier and Type | Class and Description |
|---|---|
static class |
CompoundView.Descriptor
JavaBean that contains information required to re-create this view in its current state.
|
static class |
CompoundView.Mode
Enumeration of management modes for child views.
|
| Modifier and Type | Field and Description |
|---|---|
protected CompoundView.Descriptor |
descriptor |
CATEGORY| Constructor and Description |
|---|
CompoundView(JComponent panel) |
| Modifier and Type | Method and Description |
|---|---|
void |
addView(PersistableMonitorView view,
CompoundView.Mode mode) |
void |
configure(AgentStatusEvent event)
Called when the source agent reaches OPERATIONAL state and its all static information
(including channels dictionary) becomes available.
|
void |
connect(AgentStatusEvent event)
Called when a new agent connects to the buses.
|
void |
disconnect(AgentStatusEvent event)
Called when an agent disconnects from the buses or goes into OFFLINE state.
|
CompoundView.Descriptor |
getDescriptor()
Returns a reference to the descriptor maintained by this component.
|
AgentChannelsFilter |
getFilter()
Returns the filter associated with this view, or
null if there is none. |
JComponent |
getPanel()
Returns the graphical component maintained by this view.
|
void |
install()
Installs this view, connecting it to the data source.
|
void |
restore(Persistable.Descriptor descriptor)
Restores this view to the state described by the provided descriptor, to the extent possible.
|
CompoundView.Descriptor |
save()
Returns a descriptor that contains information required to re-create this view in its current state.
|
void |
setFilter(AgentChannelsFilter filter)
Sets a channels filter.
|
void |
statusChanged(AgentStatusEvent event)
Called on data change.
|
void |
uninstall()
Uninstalls this view, disconnecting it from the data source.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitedit, getNamegetFormater, isEmpty, setFormatter, setNamegetCategory, getPath, restoreprotected CompoundView.Descriptor descriptor
public CompoundView(JComponent panel)
public JComponent getPanel()
getPanel in interface MonitorViewpublic void setFilter(AgentChannelsFilter filter)
INDEPENDENT and FORWARD modes.setFilter in interface MonitorViewfilter - Channels filter to be used by this view.public AgentChannelsFilter getFilter()
MonitorViewnull if there is none.getFilter in interface MonitorViewpublic void addView(PersistableMonitorView view, CompoundView.Mode mode)
public void connect(AgentStatusEvent event)
AgentStatusListener
The event passed to this method does not contain any information on channels
(corresponding methods return empty collections) or a reference to a status message.
The event can only be used to retrieve AgentInfo descriptor and a reference
to the AgentStatusAggregator instance.
connect in interface AgentStatusListenerevent - Event.public void configure(AgentStatusEvent event)
AgentStatusListener
The event passed to this method contains a list of added channels. Methods accessing lists
of changed and removed channels will return empty collections. Since the configuration event
is not necessarily triggered by a status message, getMessage() method returns null.
configure in interface AgentStatusListenerevent - Event.public void statusChanged(AgentStatusEvent event)
AgentStatusListenerstatusChanged in interface AgentStatusListenerevent - event Event.public void disconnect(AgentStatusEvent event)
AgentStatusListener
The event passed to this method does not have any added or modified channels, but all previously existing
channels are listed as removed. Since the disconnection event might or might not
be triggered by a status message, getMessage() method might return null.
disconnect in interface AgentStatusListenerevent - Event.public void install()
MonitorViewinstall in interface MonitorViewpublic void uninstall()
MonitorViewuninstall in interface MonitorViewpublic CompoundView.Descriptor getDescriptor()
Persistablenull, and
that any properties set on the descriptor returned by this method are reflected by
descriptors subsequently returned by save(), unless modified between the two calls.getDescriptor in interface Persistablepublic CompoundView.Descriptor save()
save in interface Persistablesave in interface Savablepublic void restore(Persistable.Descriptor descriptor)
restore in interface Persistabledescriptor - View descriptor.Copyright © 2023 LSST. All rights reserved.