Package org.emftrace.quarc.ui.zest.figures

Examples of org.emftrace.quarc.ui.zest.figures.AbstractDecoratorFigure


    globalTopFigureLayout.setMinorAlignment(OrderedLayout.ALIGN_BOTTOMRIGHT);
    globalTopFigure.setLayoutManager(globalTopFigureLayout);
    globalTopFigure.setOpaque(false);

    AbstractDecoratorFigure bodyFigure = null;
    if (element instanceof Goal) {
      bodyFigure = new SoftGoalFigure(element.getName(), isExpandable);
      elementFigure = new ElementFigure(bodyFigure,
          decompostionTypeFigure, globalTopFigure);
    } else if (element instanceof Flaw) {
      bodyFigure = new FlawFigure(element.getName(),
          ((Flaw) element).getInterpretationRule(), ((Flaw) element).getMetrics(), isExpandable);
      elementFigure = new ElementFigure(bodyFigure,
          decompostionTypeFigure, globalTopFigure);
    } else if (element instanceof Principle) {
      bodyFigure = new PrincipleFigure(element.getName(), isExpandable);
      elementFigure = new ElementFigure(bodyFigure,
          decompostionTypeFigure, globalTopFigure);
    } else if (element instanceof Refactoring) {
      bodyFigure = new SolutionInstrumentFigure(element.getName(), isExpandable);
      elementFigure = new ElementFigure(bodyFigure,
          decompostionTypeFigure, globalTopFigure);
    } else if (element instanceof Pattern) {
      bodyFigure = new SolutionInstrumentFigure(element.getName(), isExpandable);
      elementFigure = new ElementFigure(bodyFigure,
          decompostionTypeFigure, globalTopFigure);
    }
    if (bodyFigure != null && element != null) {
      final AbstractDecoratorFigure finalBodyFigure = bodyFigure;

      ModelElementChangeListener modelChangeListener = new ModelElementChangeListener() {

        @Override
        public void onRuntimeExceptionInListener(
            RuntimeException exception) {

        }

        @Override
        public void onChange(Notification notification) {
          finalBodyFigure.setName(element.getName());

        }
      };
      modelChangeListenerMap.put(modelChangeListener, element);
      element.addModelElementChangeListener(modelChangeListener);
View Full Code Here

TOP

Related Classes of org.emftrace.quarc.ui.zest.figures.AbstractDecoratorFigure

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.