Package org.eclipse.graphiti.mm.algorithms.styles

Examples of org.eclipse.graphiti.mm.algorithms.styles.Style


  }

  public static Style getStyleForPolygon(Diagram diagram) {
    final String styleId = "FUSE-CAMEL-POLYGON-ARROW"; //$NON-NLS-1$

    Style style = findStyle(diagram, styleId);
    IGaService gaService = Graphiti.getGaService();

    if (style == null) { // style not found - create new style
      style = gaService.createStyle(diagram, styleId);
      style.setForeground(gaService.manageColor(diagram, getColorConstant(PreferenceManager.getInstance().loadPreferenceAsString(PreferencesConstants.EDITOR_CONNECTION_COLOR))));
      style.setBackground(gaService.manageColor(diagram, getColorConstant(PreferenceManager.getInstance().loadPreferenceAsString(PreferencesConstants.EDITOR_CONNECTION_COLOR))));
      style.setLineWidth(1);
    }
    return style;
  }
View Full Code Here


      final Shape shape = peCreateService.createShape(containerShape, false);

      // create and set text graphics algorithm
      final Text text = gaService.createDefaultText(getDiagram(), shape, label);

      Style style = StyleUtil.getStyleForCamelText(getDiagram());
      text.setStyle(style);
      text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
      text.setVerticalAlignment(Orientation.ALIGNMENT_CENTER);
      text.setFont(style.getFont());

      gaService.setLocationAndSize(text, labelRect.x, labelRect.y, labelRect.width, labelRect.height);

      // create link and wire it
      //        link(shape, addedClass);
View Full Code Here

   
    return s;
  }

  public static Style getStyleForText(Diagram diagram) {
    Style parentStyle = getStyleForClass(diagram);
    Style s = findStyle(parentStyle, TEXT_ID);
   
    if(s == null) {
      IGaService gaService = Graphiti.getGaService();
      s = gaService.createStyle(diagram, TEXT_ID);
      s.setForeground(gaService.manageColor(diagram, CLASS_TEXT_FOREGROUND));
    }
   
    return s;
  }
View Full Code Here

 
  //public static final IColorConstant CLASS_BACKGROUND = new ColorConstant(220, 220, 255);
  public static final IColorConstant CLASS_BACKGROUND = new ColorConstant(220, 233, 255);

  public static Style getStyleForClass(Diagram diagram) {
    Style s = findStyle(diagram, CLASS_ID);
   
    if(s == null) {
      IGaService gaService = Graphiti.getGaService();
      s = gaService.createStyle(diagram, CLASS_ID);
      s.setForeground(gaService.manageColor(diagram, CLASS_FOREGROUND));
      s.setBackground(gaService.manageColor(diagram, CLASS_BACKGROUND));
      s.setLineWidth(1);
    }
   
    return s;
  }
View Full Code Here

  private static final IColorConstant BPMN_CLASS_FOREGROUND = new ColorConstant(0, 0, 0);
 
  public static Style getStyleForTask(Diagram diagram) {
    final String styleId = "TASK"; //$NON-NLS-1$

    Style style = findStyle(diagram, styleId);
    if (style == null) { // style not found - create new style
      IGaService gaService = Graphiti.getGaService();
      style = gaService.createStyle(diagram, styleId);
      style.setForeground(gaService.manageColor(diagram, BPMN_CLASS_FOREGROUND));
      gaService.setRenderingStyle(style, getDefaultTaskColor(diagram));
      style.setLineWidth(20);
    }
    return style;
  }
View Full Code Here

  }
 
  public static Style getStyleForPool(Diagram diagram) {
    final String styleId = "POOL"; //$NON-NLS-1$

    Style style = findStyle(diagram, styleId);
    if (style == null) { // style not found - create new style
      IGaService gaService = Graphiti.getGaService();
      style = gaService.createStyle(diagram, styleId);
      style.setForeground(gaService.manageColor(diagram, BPMN_CLASS_FOREGROUND));
      style.setBackground(gaService.manageColor(diagram, ColorConstant.WHITE));
      style.setLineWidth(20);
    }
    return style;
  }
View Full Code Here

  }
 
  public static Style getStyleForEvent(Diagram diagram) {
    final String styleId = "EVENT"; //$NON-NLS-1$

    Style style = findStyle(diagram, styleId);
    if (style == null) { // style not found - create new style
      IGaService gaService = Graphiti.getGaService();
      style = gaService.createStyle(diagram, styleId);
      style.setForeground(gaService.manageColor(diagram, BPMN_CLASS_FOREGROUND));
      gaService.setRenderingStyle(style, getDefaultEventColor(diagram));
      style.setLineWidth(20);
    }
    return style;
  }
View Full Code Here

  }

  public static Style getStyleForPolygon(Diagram diagram) {
    final String styleId = "BPMN-POLYGON-ARROW"; //$NON-NLS-1$

    Style style = findStyle(diagram, styleId);

    if (style == null) { // style not found - create new style
      IGaService gaService = Graphiti.getGaService();
      style = gaService.createStyle(diagram, styleId);
      style.setForeground(gaService.manageColor(diagram, IColorConstant.BLACK));
      style.setBackground(gaService.manageColor(diagram, IColorConstant.BLACK));
      style.setLineWidth(1);
    }
    return style;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.graphiti.mm.algorithms.styles.Style

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.