org.objectweb.jac.aspects.gui
Interface AbstractCollectionItemView

All Known Implementing Classes:
CollectionItemView, CollectionItemView

public interface AbstractCollectionItemView

Interface for the component used to display elements of a collection, with "prev" and "next" buttons to go to the previous or next element of the collection easily.


Method Summary
 CollectionItem getCollection()
          Gets the collection item associated with the view
 int getCurrent()
          Gets the position in the collection of the current item
 View getView()
           
 void onBackToCollection()
          Displays the collection instead of the current item
 void onNextInCollection()
          Displays next object in collection
 void onPreviousInCollection()
          Displays previous object in collection
 void onRemoveInCollection()
          Remove current object from collection
 void setCollection(CollectionItem coll)
          Sets the collection item associated with the view
 void setCurrent(int index)
          Sets the position in the collection of the current item
 

Method Detail

getView

public View getView()

setCollection

public void setCollection(CollectionItem coll)
Sets the collection item associated with the view

Parameters:
coll - a collection item

getCollection

public CollectionItem getCollection()
Gets the collection item associated with the view

Returns:
collection item

setCurrent

public void setCurrent(int index)
Sets the position in the collection of the current item

Parameters:
index - position in collection (from 0 to collection size-1)

getCurrent

public int getCurrent()
Gets the position in the collection of the current item

Returns:
position in collection

onNextInCollection

public void onNextInCollection()
Displays next object in collection


onPreviousInCollection

public void onPreviousInCollection()
Displays previous object in collection


onBackToCollection

public void onBackToCollection()
Displays the collection instead of the current item


onRemoveInCollection

public void onRemoveInCollection()
Remove current object from collection