com.mindoo.remote.api.com.ibm.rcp.ui.shelf
Interface IRemoteShelfPage

All Superinterfaces:
IRemoteEclipseWrapper

public interface IRemoteShelfPage
extends IRemoteEclipseWrapper

Remote API Wrapper for the com.ibm.rcp.ui.shelf.ShelfPage (Online documentation)

Original documentation:
A "sidebar" or peripheral view on the right or left side of the client, containing panels that display Eclipse view parts.


Field Summary
static int COLLAPSED
          Specifies sidebar is in closed (or collapsed) mode.
static int EXPANDED
          Specifies sidebar is in open (or expanded) mode.
static int LEFT
          Specifies LEFT orientation for the sidebar.
static int RIGHT
          Specifies RIGHT orientation for the sidebar.
static int THIN
          Specifies sidebar is in thin mode.
 
Method Summary
 void addViewtoSideShelf(java.lang.String secondaryIdBase, java.lang.String viewTitle, java.lang.String className, java.lang.String iconPath)
          Helper method to add a view to the sideshelf
 IRemoteViewReference findView(java.lang.String viewId)
          Returns the view reference of the given ID
 IRemoteViewReference findViewReference(java.lang.String viewId, java.lang.String secondaryId)
          Returns the view reference with the specified id and secondary id.
 int getDefaultMode()
          Returns the mode that the shelf is set to by default when not restoring state.
 java.lang.String getId()
          Returns the String identifier for the shelf page.
 int getMode()
          Returns the mode that the shelf is currently in.
 IRemoteShelfViewReference[] getShelfViewReferences()
          Returns an array of view references that comprise the shelf view stack.
 void hideView(IRemoteViewReference ref)
          Hides the view that belongs to the given reference, if any.
 void removeViewFromSideShelf(java.lang.String secondaryIdBase)
          Helper method to unregister a view from the sideshelf
 void setDefaultMode(int mode)
          Sets the default mode the shelf should start out in if state is not restored.
 void setMode(int mode)
          Sets the width of the shelf area appropriately for the given mode.
 IRemoteViewPart showView(java.lang.String viewId)
          Shows a view in the shelf page if it is not open in a new window.
 IRemoteViewPart showView(java.lang.String viewId, java.lang.String secondaryId, int mode)
          Shows a shelf panel in this page with the given view id and optional secondary id.
 
Methods inherited from interface com.mindoo.remote.api.IRemoteEclipseWrapper
_internalGetId, equalWrappedObjects
 

Field Detail

LEFT

static final int LEFT
Specifies LEFT orientation for the sidebar.

See Also:
Constant Field Values

RIGHT

static final int RIGHT
Specifies RIGHT orientation for the sidebar.

See Also:
Constant Field Values

COLLAPSED

static final int COLLAPSED
Specifies sidebar is in closed (or collapsed) mode.

See Also:
Constant Field Values

THIN

static final int THIN
Specifies sidebar is in thin mode.

See Also:
Constant Field Values

EXPANDED

static final int EXPANDED
Specifies sidebar is in open (or expanded) mode.

See Also:
Constant Field Values
Method Detail

findView

IRemoteViewReference findView(java.lang.String viewId)
                              throws RemoteEclipseAPIException
Returns the view reference of the given ID

Parameters:
viewId - view ID to find
Returns:
IRemoteViewReference the view reference of the given ID if the view is visible otherwise null
Throws:
RemoteEclipseAPIException

findViewReference

IRemoteViewReference findViewReference(java.lang.String viewId,
                                       java.lang.String secondaryId)
                                       throws RemoteEclipseAPIException
Returns the view reference with the specified id and secondary id.

Parameters:
viewId - the id of the view extension to use
secondaryId - the secondary id to use, or null for no secondary id
Returns:
the view reference, or null if none is found
Throws:
RemoteEclipseAPIException

getId

java.lang.String getId()
                       throws RemoteEclipseAPIException
Returns the String identifier for the shelf page.

Returns:
String identifier for the shelf.
Throws:
RemoteEclipseAPIException

hideView

void hideView(IRemoteViewReference ref)
              throws RemoteEclipseAPIException
Hides the view that belongs to the given reference, if any.

Parameters:
ref - the reference whose view is to be hidden
Throws:
RemoteEclipseAPIException

setMode

void setMode(int mode)
             throws RemoteEclipseAPIException
Sets the width of the shelf area appropriately for the given mode.

Parameters:
mode - int representing one of three modes: COLLAPSED if in collapsed state (only collapse arrow showing) THIN if in thin mode (only icons showing) EXPANDED if in expanded mode (fully expanded)
Throws:
RemoteEclipseAPIException

setDefaultMode

void setDefaultMode(int mode)
                    throws RemoteEclipseAPIException
Sets the default mode the shelf should start out in if state is not restored.

Parameters:
mode - int representing one of three modes: collapsed, thin, or expanded.
Throws:
RemoteEclipseAPIException

getMode

int getMode()
            throws RemoteEclipseAPIException
Returns the mode that the shelf is currently in.

Returns:
COLLAPSED if in collapsed state (only collapse arrow showing) THIN if in thin mode (only icons showing) EXPANDED if in expanded mode (fully expanded)
Throws:
RemoteEclipseAPIException

getDefaultMode

int getDefaultMode()
                   throws RemoteEclipseAPIException
Returns the mode that the shelf is set to by default when not restoring state.

Returns:
defaultMode COLLAPSED if in collapsed state (only collapse arrow showing) THIN if in thin mode (only icons showing) EXPANDED if in expanded mode (fully expanded)
Throws:
RemoteEclipseAPIException

showView

IRemoteViewPart showView(java.lang.String viewId)
                         throws RemoteEclipseAPIException
Shows a view in the shelf page if it is not open in a new window.

Parameters:
viewId - the id of the view part to show
Returns:
the view part
Throws:
RemoteEclipseAPIException

showView

IRemoteViewPart showView(java.lang.String viewId,
                         java.lang.String secondaryId,
                         int mode)
                         throws RemoteEclipseAPIException
Shows a shelf panel in this page with the given view id and optional secondary id. The behavior of this method varies based on the specified mode. If VIEW_ACTIVATE is supplied, the view will be made visible and given focus. If VIEW_VISIBLE is specified, the shelf panel is made visible but not given focus. Finally, if VIEW_CREATE is specified, the shelf panel is created but not made visible if the ShelfPage already contains visible views.

This allows multiple instances of a particular view to be created. They are disambiguated using the secondary id. If a secondary id is given, the view must allow multiple instances by having specified allowMultiple="true" in its extension.

Parameters:
viewId - the id of the view specified in the view extension
secondaryId - the secondary id specified, or null for if there is no secondary id
mode - the activation mode. Must be VIEW_ACTIVATE, VIEW_VISIBLE or VIEW_CREATE
Returns:
a view
Throws:
RemoteEclipseAPIException

getShelfViewReferences

IRemoteShelfViewReference[] getShelfViewReferences()
                                                   throws RemoteEclipseAPIException
Returns an array of view references that comprise the shelf view stack. This does not include hidden or floating views.

Returns:
the view references.
Throws:
RemoteEclipseAPIException

addViewtoSideShelf

void addViewtoSideShelf(java.lang.String secondaryIdBase,
                        java.lang.String viewTitle,
                        java.lang.String className,
                        java.lang.String iconPath)
                        throws RemoteEclipseAPIException
Helper method to add a view to the sideshelf

Parameters:
secondaryIdBase - base name for secondary id; the method registers a new with secondaryIdBase+".view" and a new shelf view with secondaryIdBase+".sideshelf" in the extension registry
viewTitle - title
className - java class name
iconPath - path to icon or empty string
Throws:
RemoteEclipseAPIException

removeViewFromSideShelf

void removeViewFromSideShelf(java.lang.String secondaryIdBase)
                             throws RemoteEclipseAPIException
Helper method to unregister a view from the sideshelf

Parameters:
secondaryIdBase - base name for secondary id; the method zbregisters a dynamic view contribution with secondaryIdBase+".view" and a dynamic shelf view contribution with secondaryIdBase+".sideshelf" in the extension registry
Throws:
RemoteEclipseAPIException