コード例 #1
0
 public void flash(
     List<? extends EObject> semanticElements, HighlightingParameters parameters, int flashTime) {
   synchronized (semanticElements) {
     for (EObject semanticElement : semanticElements) {
       IGraphicalEditPart editPartForSemanticElement =
           getEditPartForSemanticElement(semanticElement);
       if (editPartForSemanticElement != null) {
         IFigure figure = getTargetFigure(editPartForSemanticElement);
         Fader fader =
             new Fader(
                 figure,
                 figure.getForegroundColor(),
                 parameters.foregroundFadingColor,
                 figure.getBackgroundColor(),
                 parameters.backgroundFadingColor,
                 (int) flashTime,
                 true);
         Display.getCurrent().asyncExec(fader);
       }
     }
   }
 }
コード例 #2
0
 protected ColorMemento(IFigure figure) {
   this.figure = figure;
   this.foregroundColor = figure.getForegroundColor();
   this.backgroundColor = figure.getBackgroundColor();
 }