Package org.astrogrid.samp.gui
Class MessageTrackerHubConnector
java.lang.Object
org.astrogrid.samp.client.HubConnector
org.astrogrid.samp.gui.GuiHubConnector
org.astrogrid.samp.gui.MessageTrackerHubConnector
HubConnector implementation which provides facilities for keeping track
of incoming and outgoing messages as well as the other GUI features.
- Since:
- 26 Nov 2008
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionMessageTrackerHubConnector
(ClientProfile profile) Constructs a hub connector with default message tracker GUI expiry times.MessageTrackerHubConnector
(ClientProfile profile, int listRemoveDelay, int tableRemoveDelay, int tableMaxRows) Constructs a hub connector with specified message tracker GUI expiry times. -
Method Summary
Modifier and TypeMethodDescriptionReturns a list cell renderer suitable for use with the client list model returned byGuiHubConnector.getClientListModel()
.protected HubConnection
Invoked by this class to create a hub connection.createMessageBox
(int iconSize) Returns a component which displays messages currently being sent/received by this connector.static JComponent
createMessageBox
(int iconSize, ListModel rxListModel, ListModel txListModel) Returns a component which displays messages in receiver and/or sender list models.Returns a new component which displays status for this connector.Returns a ListModel representing the pending messages received using this connector.getRxListModel
(Client client) Returns a ListModel representing the pending messages sent using this connector.getTxListModel
(Client client) Methods inherited from class org.astrogrid.samp.gui.GuiHubConnector
addConnectionListener, connectionChanged, createClientBox, createConnectionIndicator, createConnectionIndicator, createHubAction, createRegisterAction, createRegisterOrHubAction, createShowMonitorAction, createToggleRegisterAction, createUnregisterAction, getClientListModel, removeConnectionListener
Methods inherited from class org.astrogrid.samp.client.HubConnector
addMessageHandler, addResponseHandler, call, callAll, callAndWait, computeSubscriptions, configureConnection, createTag, declareMetadata, declareSubscriptions, disconnect, getClientMap, getClientSet, getConnection, getMetadata, getSubscriptions, isActive, isConnected, removeMessageHandler, removeResponseHandler, setActive, setAutoconnect
-
Constructor Details
-
MessageTrackerHubConnector
Constructs a hub connector with default message tracker GUI expiry times.- Parameters:
profile
- profile implementation
-
MessageTrackerHubConnector
public MessageTrackerHubConnector(ClientProfile profile, int listRemoveDelay, int tableRemoveDelay, int tableMaxRows) Constructs a hub connector with specified message tracker GUI expiry times. The delay times are times in milliseconds after message resolution before message representations expire and hence remove themselves from gui components.- Parameters:
profile
- profile implementationlistRemoveDelay
- expiry delay for summary icons in client list displaytableRemoveDelay
- expiry delay for rows in message table displaytableMaxRows
- maximum number of rows in message table (beyond this limit resolved messages may be removed early)
-
-
Method Details
-
getTxListModel
Returns a ListModel representing the pending messages sent using this connector. Elements of the model areTransmission
objects.- Returns:
- transmission list model
-
getRxListModel
Returns a ListModel representing the pending messages received using this connector. Elements of the model areTransmission
objects.- Returns:
- transmission list model
-
getTxListModel
-
getRxListModel
-
createMessageBox
Returns a component which displays messages currently being sent/received by this connector.- Returns:
- iconSize height of icons in box
-
createMessageBox
public static JComponent createMessageBox(int iconSize, ListModel rxListModel, ListModel txListModel) Returns a component which displays messages in receiver and/or sender list models.- Parameters:
iconSize
- height of iconsrxListModel
- list model containing receivedTransmission
objectstxListModel
- list model containing sentTransmission
objects
-
createClientListCellRenderer
Description copied from class:GuiHubConnector
Returns a list cell renderer suitable for use with the client list model returned byGuiHubConnector.getClientListModel()
.- Overrides:
createClientListCellRenderer
in classGuiHubConnector
- Returns:
- list cell renderer for Client objects
-
createMonitorPanel
Description copied from class:GuiHubConnector
Returns a new component which displays status for this connector.- Overrides:
createMonitorPanel
in classGuiHubConnector
- Returns:
- new hub connection monitor component
-
createConnection
Description copied from class:HubConnector
Invoked by this class to create a hub connection. The default implementation just callsprofile.register()
.- Overrides:
createConnection
in classHubConnector
- Returns:
- new hub connection
- Throws:
SampException
-