package com.onaro.sanscreen.client.view;
import java.awt.Component;
import java.util.List;
import java.util.ResourceBundle;
import java.util.Set;
import java.util.concurrent.Future;
import javax.swing.Icon;
import javax.swing.JMenu;
import org.eclipse.core.runtime.IAdaptable;
import com.onaro.client.leekui.ui.IMemento;
import com.onaro.client.leekui.ui.IWorkbenchPart;
import com.onaro.commons.beans.IPropertyChangeSupport;
import com.onaro.sanscreen.client.view.init.ViewDirectorInitInfo;
import com.onaro.sanscreen.client.view.refresh.RefreshDataListener;
import com.onaro.sanscreen.client.view.selection.ObjectSelectionListener;
import com.onaro.sanscreen.client.view.selection.ObjectSelectionModel;
import com.onaro.sanscreen.client.view.tabular.NavigationInfo;
import com.onaro.sanscreen.server.interfaces.data.Context;
import com.onaro.util.IllegalInitException;
/**
* A ViewDirector
manages the components of a view allowing the view to setup its own menu and tool bars
* and load its content.
*
ObjectSelectionModel
to represent selection of objects it displays.
*/
public interface ViewDirector extends IPropertyChangeSupport, RefreshDataListener {
/**
* Initializes the director based on the given configuration.
* @param resources locale dependent resources
* @param menuActions actions provided by higher level director to the use of this director
* @param site context site for this view director
*/
public void init(ViewDirectorInitInfo viewDirectorInitInfo, ResourceBundle resources,
ActionFactory menuActions, IViewDirectorSite site) throws IllegalInitException;
/**
* Get the context site used to initialize the view.
* @return context site for this view director
*/
public IViewDirectorSite getSite();
/**
* Gets this director's view component.
* @param create true if the component should be created if not already initialized, false to avoid creation
*
* @return the view component if it has been initialized, otherwise {@code null}
*/
public Component getComponent(boolean create);
/**
* Displays the director's view with the given name. The data is displayed according to the specified context.
*
*If this view does work asynchronously, returns a future.
*
* @param viewName specific view name allowing a view to manage its own sub views
* @param context time context, may be null
to present "LATEST"
* @param navigationInfo
*
* @return a Future, or null
*/
public Future> show(String viewName, Listnull
*/
public Future> refresh(boolean clear);
/**
* Asks the view to request Swing to get the focus.
*
* @see IWorkbenchPart#setFocus
*/
public void setFocus();
/**
* Asks the view to react to gaining focus.
* The focus may have formerly belonged to a child of the view.
*/
public void focusGained();
/**
* Asks the view to react to losing focus.
* The focus may actually belong to a child of the view.
*/
public void focusLost();
/**
* Indicates if a view component owns the focus.
*
* @return {@code true} if view owns focus, {@code false} otherwise
*/
public boolean isFocusOwner();
/**
* Disposes of this workbench part.
*
* Within this method a part may release any resources, etc. held by this part. It is also very important to
* de-register all listeners from the workbench.
*
* @see IWorkbenchPart#dispose()
*/
public void dispose();
/**
* Which selection types can this view consume.
*
* @return null
if do not know what types.
*/
public Setnull
if do not know what types.
*/
public Set