public interface IViewpointManager
IViewpointManager
is responsible for managing the
viewpoint preferences.Modifier and Type | Field and Description |
---|---|
static IViewpointManager |
INSTANCE
Return the singleton instance of the viewpoint manager.
|
Modifier and Type | Method and Description |
---|---|
void |
addViewpointListener(IViewpointListener viewpointListener)
Adds an instance of
IViewpointListener to
listen for changes. |
java.util.Collection<ICategory> |
getAllCategories()
Return all categories.
|
ICategory |
getCategory(java.lang.String categoryId)
Get the category with given ID.
|
Viewpoint |
getEnabledViewpoint()
Gets the enabled
Viewpoint . |
java.util.List<com.ibm.xtools.common.ui.reduction.internal.viewpoints.ViewpointElement> |
getPreDefinedViewpointElements()
Returns a list of pre-defined Viewpoint Elements.
|
java.util.List<Viewpoint> |
getPreDefinedViewpoints(boolean reduced)
Gets the list of pre-defined
Viewpoint s. |
java.util.List<com.ibm.xtools.common.ui.reduction.internal.viewpoints.ViewpointElement> |
getUserDefinedViewpointElements()
Returns a list of user-defined viewpoint elements.
|
java.util.List<Viewpoint> |
getUserDefinedViewpoints()
Return a list of all user-defined viewpoints.
|
Viewpoint |
getViewpoint(java.lang.String id)
Return the
Viewpoint for the given ID. |
IViewpointElement |
getViewpointElement(Viewpoint viewpoint,
java.lang.String type)
Return the viewpoint element for the given
Viewpoint
and type . |
java.util.List<java.lang.String> |
getViewpointElementTypes()
Return the
List of registered ViewpointElement types. |
java.util.Collection<Viewpoint> |
getViewpoints(java.lang.String categoryId,
boolean reduced)
Return the
Viewpoint s within the given category. |
void |
register(Viewpoint viewpoint)
Registers a new user-defined viewpoint.
|
void |
registerViewpointElement(com.ibm.xtools.common.ui.reduction.internal.viewpoints.ViewpointElement viewpointElement)
Registers a new user-defined viewpoint element.
|
void |
removeViewpointListener(IViewpointListener viewpointListener)
Removes an instance of
IViewpointListener
listening for changes. |
void |
setEnabledViewpoint(Viewpoint viewpoint)
Sets the enabled
Viewpoint . |
void |
unregister(Viewpoint viewpoint)
Unregister a user-defined viewpoint.
|
void |
unregisterViewpointElement(com.ibm.xtools.common.ui.reduction.internal.viewpoints.ViewpointElement viewpointElement)
Unregister a user-defined viewpoint element.
|
static final IViewpointManager INSTANCE
ICategory getCategory(java.lang.String categoryId)
categoryId
- the ID of the categoryjava.util.Collection<Viewpoint> getViewpoints(java.lang.String categoryId, boolean reduced)
Viewpoint
s within the given category.categoryId
- the ID of the category to get Viewpoint
s forreduced
- use true
Viewpoint
s should be reduced by capabilities,
false
otherwiseViewpoint
s within the given categoryjava.util.Collection<ICategory> getAllCategories()
java.util.List<Viewpoint> getPreDefinedViewpoints(boolean reduced)
Viewpoint
s.reduced
- use true
Viewpoint
s should be reduced by capabilities,
false
otherwiseViewpoint
sjava.util.List<com.ibm.xtools.common.ui.reduction.internal.viewpoints.ViewpointElement> getPreDefinedViewpointElements()
java.util.List<com.ibm.xtools.common.ui.reduction.internal.viewpoints.ViewpointElement> getUserDefinedViewpointElements()
java.util.List<Viewpoint> getUserDefinedViewpoints()
Viewpoint getEnabledViewpoint()
Viewpoint
.Viewpoint
void setEnabledViewpoint(Viewpoint viewpoint)
Viewpoint
.viewpoint
- the Viewpoint
to enableViewpoint getViewpoint(java.lang.String id)
Viewpoint
for the given ID.id
- the Viewpoint
IDViewpoint
for the given IDvoid register(Viewpoint viewpoint)
viewpoint
- the new user-defined viewpoint.void registerViewpointElement(com.ibm.xtools.common.ui.reduction.internal.viewpoints.ViewpointElement viewpointElement)
viewpointElement
- element the new user-defined viewpoint element.void unregister(Viewpoint viewpoint)
viewpoint
- the user-defined viewpointvoid unregisterViewpointElement(com.ibm.xtools.common.ui.reduction.internal.viewpoints.ViewpointElement viewpointElement)
viewpointElement
- element the user-defined viewpoint elementvoid addViewpointListener(IViewpointListener viewpointListener)
IViewpointListener
to
listen for changes.viewpointListener
- the listener to addvoid removeViewpointListener(IViewpointListener viewpointListener)
IViewpointListener
listening for changes.viewpointListener
- the listener to removejava.util.List<java.lang.String> getViewpointElementTypes()
List
of registered ViewpointElement
types.List
of ViewpointElement
typesIViewpointElement getViewpointElement(Viewpoint viewpoint, java.lang.String type)
Viewpoint
and type
.
If no viewpoint element currently exists for the given Viewpoint
and
type
then a user defined viewpoint element is created and
registered with this IViewpointManager
.
If the given Viewpoint
is not registered, or the type
does not correspond to a viewpoint element type, then this method returns
null
.
viewpoint
- the viewpointtype
- the viewpoint element type