|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.core.model.gmf.effects.FocusContextEffect
public class FocusContextEffect
A FocusContextEffect implements the Focus & Context behavior for graphical models for their diagrams
in the KIELER View Management.
After creating the effect, it allows to add semantical EObject
s to the focus. These
elements will be shown with most detail. Other objects will form the context and will be shown
with the least detail. Currently full detail means that all compartments of the element are
expanded while less detail means that all compartments get collapsed.
In the future this could be extended to also support multiple levels of focus and/or context and even different ways of reducing the level of detail. This could include complete hiding of elements (i.e. use only a subset of elements as the context to reduce overall size of a model) or to hide text labels, e.g. at connections or nodes.
Next to an object added to the focus it can be specified how many containment levels of this particular object should be added to the focus, e.g. none, all (i.e. adding the complete children hierarchy of this object) or a specific level.
In opposite to the children hierarchy the parent hierarchy is always added completely for one element. Therefore for one element, all of its ancestors will be added to the focus. Only after the whole focus has been set, this transitive focus gets calculated and the context will be set as its complement.
This class implements IEffectCompound
as it is composed out of many
CompartmentCollapseExpandEffect
s and in future may also contain other effects. While
an IEffectCompound
itself is no IEffect
, it can be asked for a list of
the primitive effects by getPrimitiveEffects()
. An AbstractCombination
is able
to schedule an IEffectCompound
just like it can schedule an IEffect
. However,
this is just some convenience function to schedule all primitive effects successively.
Constructor Summary | |
---|---|
FocusContextEffect(IWorkbenchPart editor)
Construct a FocusContextEffect at a given diagram (Editor or View). |
Method Summary | |
---|---|
void |
addFocus(Collection<EObject> focusedObjects,
boolean addDescendants)
Add multiple elements to the focus. |
void |
addFocus(Collection<EObject> focusedObjects,
int childrenLevel)
Add multiple elements to the focus. |
void |
addFocus(EObject focusedObject,
boolean addDescendants)
Add one element to the focus. |
void |
addFocus(EObject focusedObject,
int childrenLevel)
Add one element to the focus. |
List<IEffect> |
getPrimitiveEffects()
Get the list of primitive IEffects that this compound effect is composed of. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FocusContextEffect(IWorkbenchPart editor)
editor
- a GraphicalFrameworkService compatible Editor or ViewMethod Detail |
---|
public List<IEffect> getPrimitiveEffects()
getPrimitiveEffects
in interface IEffectCompound
public void addFocus(EObject focusedObject, boolean addDescendants)
focusedObject
- the object to add to the focusaddDescendants
- true if all descendants (all deeply nested children) should also be addedpublic void addFocus(EObject focusedObject, int childrenLevel)
focusedObject
- the object to add to the focuschildrenLevel
- adds children up to this given hierarchy levelpublic void addFocus(Collection<EObject> focusedObjects, boolean addDescendants)
focusedObjects
- the objects to add to the focusaddDescendants
- true if all descendants (all deeply nested children) should also be addedpublic void addFocus(Collection<EObject> focusedObjects, int childrenLevel)
focusedObjects
- the objects to add to the focuschildrenLevel
- adds children up to this given hierarchy level
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |