it.amattioli.applicate.browsing
Interface ObjectBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>

Show UML class diagram
Type Parameters:
I - the identifier class of the entities that can be browsed
T - the class of the entities that can be browsed
All Superinterfaces:
Browser<I,T>, CommandListener, EventListener, it.amattioli.dominate.util.PropertyChangeEmitter, PropertyChangeListener, SelectionListener, Selector<T>
All Known Implementing Classes:
ObjectBrowserImpl

public interface ObjectBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
extends Browser<I,T>, CommandListener, SelectionListener, PropertyChangeListener, it.amattioli.dominate.util.PropertyChangeEmitter

An ObjectBrowser acts like a place-holder for entities of a certain type. Form this browser you can access the hold object simple properties or obtain a ListBrowser to access its Collection properties.

This browser can act as a BrowserSelectionListener too. Every time it receives a SelectionEvent it change the hold object so to reflect the currently selected object.

As any other browser it listen to command events so to refresh its content every time a command gets executed.

Author:
andrea

Method Summary
 ListBrowserImpl<?,?> getDetailsBrowser(String propertyName)
          Retrieves a ListBrowser to navigate the collection of objects contained in a property.
 Map<String,ListBrowserImpl<?,?>> getDetailsBrowsers()
          Retrieves a map containing all the possible browsers that getDetailsBrowser(String) will return.
 T getHold()
          Retrieves the object that this browser is holding.
 void refresh()
          Refresh the object that this browser is holding retrieving a fresh copy from the repository.
 
Methods inherited from interface it.amattioli.applicate.browsing.Browser
addContentChangeListener, release, removeContentChangeListener
 
Methods inherited from interface it.amattioli.applicate.selection.Selector
addSelectionListener, getSelectedObject, removeSelectionListener
 
Methods inherited from interface it.amattioli.applicate.commands.CommandListener
commandDone
 
Methods inherited from interface it.amattioli.applicate.selection.SelectionListener
objectSelected
 
Methods inherited from interface java.beans.PropertyChangeListener
propertyChange
 
Methods inherited from interface it.amattioli.dominate.util.PropertyChangeEmitter
addPropertyChangeListener, removePropertyChangeListener
 

Method Detail

getHold

T getHold()
Retrieves the object that this browser is holding.

Returns:
the object that this browser is holding

refresh

void refresh()
Refresh the object that this browser is holding retrieving a fresh copy from the repository.


getDetailsBrowsers

Map<String,ListBrowserImpl<?,?>> getDetailsBrowsers()
Retrieves a map containing all the possible browsers that getDetailsBrowser(String) will return.

Returns:

getDetailsBrowser

ListBrowserImpl<?,?> getDetailsBrowser(String propertyName)
Retrieves a ListBrowser to navigate the collection of objects contained in a property.

If the hold object has a property whose name is the passed string and whose type is a collection of entities, this method returns a ListBrowser to navigate the entities contained in this collection.

If such a property does not exists, null will be returned.

Parameters:
propertyName - the name of the property whose content will be browsed
Returns:
a ListBrowser to navigate the collection of objects contained in a property


Copyright © 2011. All Rights Reserved.