Package org.astrogrid.samp.gui
Class GuiHubConnector.ListModelTrackedClientSet
- java.lang.Object
-
- org.astrogrid.samp.client.TrackedClientSet
-
- org.astrogrid.samp.gui.GuiHubConnector.ListModelTrackedClientSet
-
- All Implemented Interfaces:
javax.swing.ListModel
- Enclosing class:
- GuiHubConnector
private static class GuiHubConnector.ListModelTrackedClientSet extends TrackedClientSet implements javax.swing.ListModel
TrackedClientSet implementation used by this class. Implements ListModel as well.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ListclientList_private java.util.ListlistenerList_
-
Constructor Summary
Constructors Constructor Description ListModelTrackedClientSet()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddClient(Client client)Adds a client to this model.voidaddListDataListener(javax.swing.event.ListDataListener listener)java.lang.ObjectgetElementAt(int index)intgetSize()voidremoveClient(Client client)Removes a client from this model.voidremoveListDataListener(javax.swing.event.ListDataListener listener)voidsetClients(Client[] clients)Sets the contents of this model to a given list.voidupdateClient(Client client, boolean metaChanged, boolean subsChanged)Notifies listeners that a given client's attributes (may) have changed.-
Methods inherited from class org.astrogrid.samp.client.TrackedClientSet
getClientMap
-
-
-
-
Method Detail
-
getSize
public int getSize()
- Specified by:
getSizein interfacejavax.swing.ListModel
-
getElementAt
public java.lang.Object getElementAt(int index)
- Specified by:
getElementAtin interfacejavax.swing.ListModel
-
addListDataListener
public void addListDataListener(javax.swing.event.ListDataListener listener)
- Specified by:
addListDataListenerin interfacejavax.swing.ListModel
-
removeListDataListener
public void removeListDataListener(javax.swing.event.ListDataListener listener)
- Specified by:
removeListDataListenerin interfacejavax.swing.ListModel
-
addClient
public void addClient(Client client)
Description copied from class:TrackedClientSetAdds a client to this model. Listeners are informed. May be called from any thread.- Overrides:
addClientin classTrackedClientSet- Parameters:
client- client to add
-
removeClient
public void removeClient(Client client)
Description copied from class:TrackedClientSetRemoves a client from this model. Listeners are informed. May be called from any thread.- Overrides:
removeClientin classTrackedClientSet- Parameters:
client- client to remove
-
setClients
public void setClients(Client[] clients)
Description copied from class:TrackedClientSetSets the contents of this model to a given list. Listeners are informed. May be called from any thread.- Overrides:
setClientsin classTrackedClientSet- Parameters:
clients- current client list
-
updateClient
public void updateClient(Client client, boolean metaChanged, boolean subsChanged)
Description copied from class:TrackedClientSetNotifies listeners that a given client's attributes (may) have changed. May be called from any thread.- Overrides:
updateClientin classTrackedClientSet- Parameters:
client- modified clientmetaChanged- true if metadata may have changed (false if known unchanged)subsChanged- true if subscriptions may have changed (false if known unchanged)
-
-