public abstract class GroupView extends AbstractMonitorView
All methods defined by this class should be called on EDT.
All setter methods should be called before getPage(), install(), and uninstall().
| Modifier and Type | Class and Description |
|---|---|
static class |
GroupView.Descriptor
JavaBean that contains information required to re-create this view in its current state.
|
protected class |
GroupView.Filter
Filter to be associated with a group view.
|
| Modifier and Type | Field and Description |
|---|---|
protected String |
currentGroup |
protected int |
depth |
protected GroupView.Descriptor |
descriptor |
protected LinkedList<String> |
selectionHistory |
compactFields, data, fields, filter, formatterCATEGORY| Constructor and Description |
|---|
GroupView() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChannels(List<org.lsst.ccs.bus.data.AgentInfo> agents,
List<Map.Entry<String,AgentChannel>> channels)
Updates
views or calls addChannels(...) on a child view if it already exists. |
protected AbstractMonitorView |
createView(String group)
Creates a view for the specified group.
|
GroupView.Descriptor |
getDescriptor()
Returns a reference to the descriptor maintained by this component.
|
protected String[] |
getPath(String group)
Splits the group name into segments.
|
protected String[] |
getSubgroups(String parent) |
protected AbstractMonitorView |
getView(String group) |
protected abstract void |
groupsAdded(List<String> groups) |
protected abstract void |
groupSelected() |
protected abstract void |
groupsRemoved(List<String> groups) |
protected boolean |
hasGroup(String group) |
protected String |
mergeGroup(String group,
String path)
Reverse
separateGroup(...). |
void |
removeChannels(List<org.lsst.ccs.bus.data.AgentInfo> agents,
List<Map.Entry<String,AgentChannel>> channels)
Updates
views or calls removeChannels(...) on a child view if it exists. |
void |
restore(Persistable.Descriptor descriptor)
Restores this view to the state described by the provided descriptor, to the extent possible.
|
GroupView.Descriptor |
save()
Returns a descriptor that contains information required to re-create this view in its current state.
|
protected void |
selectGroup(String group)
Selects and displays the view for the specified group.
|
protected String[] |
separateGroup(String displayPath)
Splits display path produced by the filter into group and path inside group.
|
void |
setFormatter(MonitorFormat formatter)
Associates a formatter with this view.
|
static AbstractChannelsFilter |
test1() |
void |
updateChannels(List<Map.Entry<String,Map.Entry<AgentChannel,List<String>>>> channels)
Forward updates to the current view, if any.
|
configure, connect, createChannel, disconnect, getFilter, getFormater, getGroup, getGroupFields, getGroups, isEmpty, resetChannels, setDiscardRemovedChannels, setFilter, statusChanged, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitedit, getNamegetPanel, install, setName, uninstallgetCategory, getPath, restoreprotected GroupView.Descriptor descriptor
protected int depth
protected String currentGroup
protected LinkedList<String> selectionHistory
public final void addChannels(List<org.lsst.ccs.bus.data.AgentInfo> agents, List<Map.Entry<String,AgentChannel>> channels)
views or calls addChannels(...) on a child view if it already exists.
If there is no current group, call selectGroup(null).addChannels in class AbstractMonitorViewagents - Newly connected agents these channels belong to.channels - New channels, each entry contains display path and channel.public final void removeChannels(List<org.lsst.ccs.bus.data.AgentInfo> agents, List<Map.Entry<String,AgentChannel>> channels)
views or calls removeChannels(...) on a child view if it exists.removeChannels in class AbstractMonitorViewagents - Names of disconnected agents.channels - Removed channels, each entry contains display path and channel.public final void updateChannels(List<Map.Entry<String,Map.Entry<AgentChannel,List<String>>>> channels)
updateChannels in class AbstractMonitorViewchannels - Updated channels, each element contains: {display path : {channel : list of modified attributes}}.protected String[] separateGroup(String displayPath)
null.
If this method returns null, the channel should not be displayed.
The implementation provided by this class splits around "//" if this view has depth 0,
chop off first depth segments (separated by slashes) otherwise.
displayPath - Display path produced by the filter.protected String mergeGroup(String group, String path)
separateGroup(...).group - Group.path - Local display path inside group.protected String[] getPath(String group)
group - Group name.protected AbstractMonitorView createView(String group)
group - Group name.protected void selectGroup(String group)
"", the default group is selected.
On exit from this method currentGroup is set and selectionHistory is updated.group - Group or prefix that specifies a group of groups.public void setFormatter(MonitorFormat formatter)
MonitorViewsetFormatter in interface MonitorViewsetFormatter in class AbstractMonitorViewformatter - Formatter to be associated with this view.protected abstract void groupSelected()
protected final AbstractMonitorView getView(String group)
protected final boolean hasGroup(String group)
protected final String[] getSubgroups(String parent)
parent - Full or partial group (x0/.../xN), or null to get top-level subgroups.null if parent is neither a valid group nor a partial group;
empty array if parent is a valid group but not a partial group (no subgroups);
contains "" if parent is both a valid group and a partial group (has subgroups).public GroupView.Descriptor save()
save in interface Persistablesave in interface Savablesave in class AbstractMonitorViewpublic void restore(Persistable.Descriptor descriptor)
descriptor - View descriptor.public GroupView.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 PersistablegetDescriptor in class AbstractMonitorView@Create(category="AgentChannelsFilter", name="Explicit group tester", path="Test/Explicit group", description="") public static AbstractChannelsFilter test1()
Copyright © 2023 LSST. All rights reserved.