com.pentec.gui.aoi
Class AoiListAdapter

java.lang.Object
  extended by com.pentec.gui.aoi.AoiListAdapter
All Implemented Interfaces:
AoiList

public class AoiListAdapter
extends java.lang.Object
implements AoiList

Author:
Pender Technology

Field Summary
private  java.util.Vector aois
           
private  java.util.Vector listeners
           
 
Constructor Summary
AoiListAdapter()
           
 
Method Summary
 boolean add(AOI aoi)
          Add an AOI to the list
 boolean addChangeListener(AoiListChangeListener aoiListChangeListener)
          Add an AOI list change listener
private  void fireChangeEvent(AoiListChangeEvent event)
           
 AOI get(int iIndex)
          Get an AOI in the list at the requested index
 AOI[] getByType(java.lang.Class type)
          Get all the AOIs of a particular class type
 AoiListChangeListener[] getChangeListeners()
          Get the AOI list change listeners currently registered
 boolean remove(AOI aoi)
          Remove an AOI from the list
 AOI remove(int iIndex)
          Remove an AOI from the list at the requested index
 boolean removeChangeListener(AoiListChangeListener aoiListChangeListener)
          Remove an AOI list change listener
 AOI[] toArray()
          Convert the list to an array of AOIs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

aois

private java.util.Vector aois

listeners

private java.util.Vector listeners
Constructor Detail

AoiListAdapter

public AoiListAdapter()
Method Detail

add

public boolean add(AOI aoi)
Description copied from interface: AoiList
Add an AOI to the list

Specified by:
add in interface AoiList
Parameters:
aoi - AOI to add to the list
Returns:
true on successful add, false otherwise

addChangeListener

public boolean addChangeListener(AoiListChangeListener aoiListChangeListener)
Description copied from interface: AoiList
Add an AOI list change listener

Specified by:
addChangeListener in interface AoiList
Parameters:
aoiListChangeListener - listener to add
Returns:
true on success, false otherwise

fireChangeEvent

private void fireChangeEvent(AoiListChangeEvent event)

get

public AOI get(int iIndex)
Description copied from interface: AoiList
Get an AOI in the list at the requested index

Specified by:
get in interface AoiList
Parameters:
iIndex - index of the AOI
Returns:
AOI in the list at the requested index

getByType

public AOI[] getByType(java.lang.Class type)
Description copied from interface: AoiList
Get all the AOIs of a particular class type

Specified by:
getByType in interface AoiList
Parameters:
type - class type of AOIs to search for
Returns:
array of AOIs of the requested class type (array size will be 0 if none are found)

getChangeListeners

public AoiListChangeListener[] getChangeListeners()
Description copied from interface: AoiList
Get the AOI list change listeners currently registered

Specified by:
getChangeListeners in interface AoiList
Returns:
array of AOI list change listeners currently registered

remove

public boolean remove(AOI aoi)
Description copied from interface: AoiList
Remove an AOI from the list

Specified by:
remove in interface AoiList
Parameters:
aoi - AOI to remove from the list
Returns:
true on successful removal, false otherwise

remove

public AOI remove(int iIndex)
Description copied from interface: AoiList
Remove an AOI from the list at the requested index

Specified by:
remove in interface AoiList
Parameters:
iIndex - index of the AOI
Returns:
AOI removed or null on failure

removeChangeListener

public boolean removeChangeListener(AoiListChangeListener aoiListChangeListener)
Description copied from interface: AoiList
Remove an AOI list change listener

Specified by:
removeChangeListener in interface AoiList
Parameters:
aoiListChangeListener - change listener to remove
Returns:
true on success, false otherwise

toArray

public AOI[] toArray()
Description copied from interface: AoiList
Convert the list to an array of AOIs

Specified by:
toArray in interface AoiList
Returns:
AOI array version of the list