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.List
clientList_
private java.util.List
listenerList_
-
Constructor Summary
Constructors Constructor Description ListModelTrackedClientSet()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addClient(Client client)
Adds a client to this model.void
addListDataListener(javax.swing.event.ListDataListener listener)
java.lang.Object
getElementAt(int index)
int
getSize()
void
removeClient(Client client)
Removes a client from this model.void
removeListDataListener(javax.swing.event.ListDataListener listener)
void
setClients(Client[] clients)
Sets the contents of this model to a given list.void
updateClient(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:
getSize
in interfacejavax.swing.ListModel
-
getElementAt
public java.lang.Object getElementAt(int index)
- Specified by:
getElementAt
in interfacejavax.swing.ListModel
-
addListDataListener
public void addListDataListener(javax.swing.event.ListDataListener listener)
- Specified by:
addListDataListener
in interfacejavax.swing.ListModel
-
removeListDataListener
public void removeListDataListener(javax.swing.event.ListDataListener listener)
- Specified by:
removeListDataListener
in interfacejavax.swing.ListModel
-
addClient
public void addClient(Client client)
Description copied from class:TrackedClientSet
Adds a client to this model. Listeners are informed. May be called from any thread.- Overrides:
addClient
in classTrackedClientSet
- Parameters:
client
- client to add
-
removeClient
public void removeClient(Client client)
Description copied from class:TrackedClientSet
Removes a client from this model. Listeners are informed. May be called from any thread.- Overrides:
removeClient
in classTrackedClientSet
- Parameters:
client
- client to remove
-
setClients
public void setClients(Client[] clients)
Description copied from class:TrackedClientSet
Sets the contents of this model to a given list. Listeners are informed. May be called from any thread.- Overrides:
setClients
in classTrackedClientSet
- Parameters:
clients
- current client list
-
updateClient
public void updateClient(Client client, boolean metaChanged, boolean subsChanged)
Description copied from class:TrackedClientSet
Notifies listeners that a given client's attributes (may) have changed. May be called from any thread.- Overrides:
updateClient
in 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)
-
-