de.cau.cs.kieler.karma.util
Class AdvancedRenderingEditPartUtil

java.lang.Object
  extended by de.cau.cs.kieler.karma.util.AdvancedRenderingEditPartUtil

public class AdvancedRenderingEditPartUtil
extends Object

Class containing generic method to update the figure and handle the notification. Used to eliminate redundant code from AdvancedRenderingEditParts.

Rating red

Constructor Summary
AdvancedRenderingEditPartUtil(List<HashMap<String,Object>> theConditions)
           
 
Method Summary
 void handleNotificationEvent(Notification notification, IFigure primaryShape, EObject modelElement, AbstractGraphicalEditPart editPart)
           
 boolean updateFigure(IFigure figure, EObject modelElement, AbstractGraphicalEditPart editPart, Boolean forceUpdate)
          Method to update a figure according to the conditions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdvancedRenderingEditPartUtil

public AdvancedRenderingEditPartUtil(List<HashMap<String,Object>> theConditions)
Parameters:
theConditions - The list of conditions and the corresponding string for generating the figure.
Method Detail

handleNotificationEvent

public void handleNotificationEvent(Notification notification,
                                    IFigure primaryShape,
                                    EObject modelElement,
                                    AbstractGraphicalEditPart editPart)
Parameters:
notification - the notification given to the handleNotificationEvent of the editpart.
primaryShape - the primaryShape attribute of the editpart.
modelElement - the modelelement of the editpart.
editPart - the editpart himself.

updateFigure

public boolean updateFigure(IFigure figure,
                            EObject modelElement,
                            AbstractGraphicalEditPart editPart,
                            Boolean forceUpdate)
Method to update a figure according to the conditions.

Parameters:
figure - the figure to be updated.
modelElement - the modelelement the figure belongs to.
editPart - the edit part of the model element
forceUpdate - if true the update will be done even if the same conditions have been in place before.
Returns:
true if the figure actually changed, false else.