fr.esrf.tangoatk.core
Class AEntityList
java.lang.Object
javax.swing.AbstractListModel
javax.swing.DefaultListModel
fr.esrf.tangoatk.core.AEntityList
- All Implemented Interfaces:
- IEntityCollection, IEntityList, IRefreshee, java.io.Serializable, javax.swing.ComboBoxModel, javax.swing.ListModel
- Direct Known Subclasses:
- AttributeList, CommandList
public abstract class AEntityList
- extends javax.swing.DefaultListModel
- implements IEntityCollection, javax.swing.ComboBoxModel, IEntityList
- See Also:
- Serialized Form
| Fields inherited from class javax.swing.AbstractListModel |
listenerList |
| Methods inherited from class javax.swing.DefaultListModel |
add, addElement, capacity, clear, contains, copyInto, elementAt, elements, ensureCapacity, firstElement, get, getElementAt, getSize, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, removeAllElements, removeElement, removeElementAt, removeRange, set, setElementAt, setSize, size, toArray, toString, trimToSize |
| Methods inherited from class javax.swing.AbstractListModel |
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.swing.ListModel |
addListDataListener, getElementAt, getSize, removeListDataListener |
refreshInterval
protected int refreshInterval
factory
protected AEntityFactory factory
refresher
protected Refresher refresher
errorListeners
protected java.util.List<IErrorListener> errorListeners
refresherListeners
protected java.util.List<IRefresherListener> refresherListeners
setErrorListeners
protected java.util.List<ISetErrorListener> setErrorListeners
selectedItem
protected IEntity selectedItem
filter
protected IEntityFilter filter
synchronizedPeriod
protected boolean synchronizedPeriod
traceUnexpected
protected boolean traceUnexpected
AEntityList
public AEntityList()
setRefreshInterval
public void setRefreshInterval(int milliSeconds)
- Description copied from interface:
IEntityList
setRefreshInterval sets the refresh interval for
the EntityList. This interval decides how often an entity is polled
to see if its value has changed. The default value is 1000, that is,
the entity is polled once a second.
- Specified by:
setRefreshInterval in interface IEntityList
- Parameters:
milliSeconds - an int value
getRefreshInterval
public int getRefreshInterval()
- Description copied from interface:
IEntityList
getRefreshInterval gets the refresh-interval for
the entity list. The default value is 1000 milliseconds.
- Specified by:
getRefreshInterval in interface IEntityList
- Returns:
- an
int value which is the refresh-interval
getSelectedItem
public java.lang.Object getSelectedItem()
- Specified by:
getSelectedItem in interface javax.swing.ComboBoxModel
setSelectedItem
public void setSelectedItem(java.lang.Object obj)
- Specified by:
setSelectedItem in interface javax.swing.ComboBoxModel
refresh
public void refresh()
- Description copied from interface:
IEntityList
refresh refreshes the EntityList, that is, it asks
all its entities to poll its Tango peer to see if its value has
changed.
- Specified by:
refresh in interface IEntityList- Specified by:
refresh in interface IRefreshee
isRefresherStarted
public boolean isRefresherStarted()
- Specified by:
isRefresherStarted in interface IEntityList
stopRefresher
public void stopRefresher()
- Specified by:
stopRefresher in interface IEntityList
startRefresher
public void startRefresher()
- Description copied from interface:
IEntityList
startRefresher starts the default refresher thread
for the entity list,which sleeps for refreshInterval seconds.
- Specified by:
startRefresher in interface IEntityList
- See Also:
setRefreshInterval(int),
Thread
setRefresher
public void setRefresher(Refresher r)
- Description copied from interface:
IEntityList
setRefresher sets the resher thread
for this EntityList.
- Specified by:
setRefresher in interface IEntityList
- Parameters:
r - an Refresher value- See Also:
Refresher
setFilter
public void setFilter(IEntityFilter filter)
- Description copied from interface:
IEntityList
setFilter to filter out which IEntities
should be added to the list and which should not be added.
- Specified by:
setFilter in interface IEntityList
- Parameters:
filter - an IEntityFilter value- See Also:
IEntityFilter
getFilter
public IEntityFilter getFilter()
- Specified by:
getFilter in interface IEntityList
get
public java.util.List<IEntity> get(java.lang.String[] names)
- Specified by:
get in interface IEntityCollection- Specified by:
get in interface IEntityList
get
public IEntity get(java.lang.String attributeName)
- Specified by:
get in interface IEntityCollection- Specified by:
get in interface IEntityList
add
public void add(java.lang.String[] names)
throws ConnectionException
- Specified by:
add in interface IEntityCollection- Specified by:
add in interface IEntityList
- Throws:
ConnectionException
add
public void add(IEntity entity)
- Specified by:
add in interface IEntityList
add
public IEntity add(java.lang.String name)
throws ConnectionException
- Specified by:
add in interface IEntityCollection- Specified by:
add in interface IEntityList
- Throws:
ConnectionException
remove
public boolean remove(java.lang.String entityName)
- Specified by:
remove in interface IEntityCollection- Specified by:
remove in interface IEntityList
addErrorListener
public void addErrorListener(IErrorListener l)
- Specified by:
addErrorListener in interface IEntityList
addSetErrorListener
public void addSetErrorListener(ISetErrorListener l)
- Specified by:
addSetErrorListener in interface IEntityList
removeErrorListener
public void removeErrorListener(IErrorListener errl)
- Description copied from interface:
IEntityList
- Remove an ErrorListener for all entities in the entitylist. Invokes
removeErrorListener on all list members.
- Specified by:
removeErrorListener in interface IEntityList
- Parameters:
errl - Error Listener
removeSetErrorListener
public void removeSetErrorListener(ISetErrorListener setErrl)
- Description copied from interface:
IEntityList
- Remove a SetErrorListener for all entities in the entitylist. Invokes
removeSetErrorListener on all list members.
- Specified by:
removeSetErrorListener in interface IEntityList
- Parameters:
setErrl - SetError Listener
addRefresherListener
public void addRefresherListener(IRefresherListener l)
- Description copied from interface:
IEntityList
- Add a listener on the refresher. Listeners are triggered
at each refresher step after models refresh.
- Specified by:
addRefresherListener in interface IEntityList
- Parameters:
l - Refresher listener
removeRefresherListener
public void removeRefresherListener(IRefresherListener l)
- Specified by:
removeRefresherListener in interface IEntityList
clearRefresherListener
public void clearRefresherListener()
- Specified by:
clearRefresherListener in interface IEntityList
fireRefresherStepEvent
protected void fireRefresherStepEvent()
finalize
public void finalize()
- Overrides:
finalize in class java.lang.Object
getVersion
public java.lang.String getVersion()
- Specified by:
getVersion in interface IEntityList
setSynchronizedPeriod
public void setSynchronizedPeriod(boolean synchro)
- Specified by:
setSynchronizedPeriod in interface IEntityList
setTraceUnexpected
public void setTraceUnexpected(boolean trace)
- Specified by:
setTraceUnexpected in interface IEntityList