public class BrowserController extends java.lang.Object implements BrowserModelListener, KeyValueRecordListener<KeyValueFilteredTableModel<PVRecord>,PVRecord>
| Modifier and Type | Field and Description |
|---|---|
protected BrowserModel |
_model
browser model
|
protected MachineSnapshot |
_selectedSnapshot
selected Machine snapshot
|
| Constructor and Description |
|---|
BrowserController(BrowserModel model)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBrowserControllerListener(BrowserControllerListener listener)
Add a listener of controller events from this controller
|
void |
connectionChanged(BrowserModel model)
The model's connection has changed
|
protected static java.lang.String[] |
convertToPVs(ChannelWrapper[] wrappers)
Convert the array of channel wrappers to an array of signals.
|
ChannelSnapshot[] |
filterSnapshots(ChannelSnapshot[] snapshots)
Filter each channel snapshot based on whether its signal is selected
|
KeyValueTableModel<ChannelSnapshot> |
getChannelSnapshotTableModel()
get the table model of channel snapshots
|
KeyValueTableModel<MachineSnapshot> |
getMachineSnapshotTableModel()
get the table model of machine snapshots
|
BrowserModel |
getModel()
Get the main model
|
KeyValueFilteredTableModel<PVRecord> |
getPVTableModel()
get the table model of PVs
|
java.util.List<java.lang.String> |
getSelectedSignals()
get the list of selected signals
|
void |
machineSnapshotsFetched(BrowserModel model,
MachineSnapshot[] snapshots)
Handle the "machine snapshot fetched" event.
|
void |
recordModified(KeyValueFilteredTableModel<PVRecord> tableModel,
PVRecord record,
java.lang.String keyPath,
java.lang.Object value)
forward message that table record changed
|
void |
removeBrowserControllerListener(BrowserControllerListener listener)
Remove the listener from receiving controller events from this controller
|
void |
selectedChannelGroupChanged(BrowserModel model,
ChannelGroup newGroup)
Update the channel wrappers for the newly selected channel group and
forward this event to the browser controller listeners.
|
void |
selectSignals(boolean select)
Select or deselect the collection of signals without affecting the selection status of other signals.
|
void |
setSelectedSnapshot(MachineSnapshot snapshot)
Set the snapshot which is selected by the user
|
protected BrowserModel _model
protected MachineSnapshot _selectedSnapshot
public BrowserController(BrowserModel model)
public void addBrowserControllerListener(BrowserControllerListener listener)
listener - the listener to addpublic void removeBrowserControllerListener(BrowserControllerListener listener)
listener - the listener to removepublic KeyValueFilteredTableModel<PVRecord> getPVTableModel()
public KeyValueTableModel<MachineSnapshot> getMachineSnapshotTableModel()
public KeyValueTableModel<ChannelSnapshot> getChannelSnapshotTableModel()
protected static java.lang.String[] convertToPVs(ChannelWrapper[] wrappers)
wrappers - the array of channel wrapperspublic void selectSignals(boolean select)
select - true to select signals and false to deselect signalspublic java.util.List<java.lang.String> getSelectedSignals()
public ChannelSnapshot[] filterSnapshots(ChannelSnapshot[] snapshots)
snapshots - The snapshots to filterpublic BrowserModel getModel()
public void setSelectedSnapshot(MachineSnapshot snapshot)
snapshot - the machine snapshot to selectpublic void connectionChanged(BrowserModel model)
connectionChanged in interface BrowserModelListenermodel - The model whose connection changedpublic void selectedChannelGroupChanged(BrowserModel model, ChannelGroup newGroup)
selectedChannelGroupChanged in interface BrowserModelListenermodel - the source of the eventnewGroup - the newly selected channel grouppublic void machineSnapshotsFetched(BrowserModel model, MachineSnapshot[] snapshots)
machineSnapshotsFetched in interface BrowserModelListenermodel - the model providing the eventsnapshots - the new snapshots that have been fetchedpublic void recordModified(KeyValueFilteredTableModel<PVRecord> tableModel, PVRecord record, java.lang.String keyPath, java.lang.Object value)
recordModified in interface KeyValueRecordListener<KeyValueFilteredTableModel<PVRecord>,PVRecord>tableModel - the source posting the modification eventrecord - the record which was modifiedkeyPath - the key path to the modified valuevalue - the new value