Package org.eclipse.graphiti.util

Examples of org.eclipse.graphiti.util.IColorConstant


    }
    return null;
  }

  public static IColorConstant getColorConstant(String rgb) {
    IColorConstant cc = null;
    String[] parts = rgb.split(",");
    if (parts.length != 3) {
      return null;
    }
    String hex = "";
View Full Code Here


      GraphicalViewer graphicalViewer = designEditor.getGraphicalViewer();
      if (graphicalViewer != null
          && graphicalViewer.getEditPartRegistry() != null) {
        ScalableFreeformRootEditPart rootEditPart = (ScalableFreeformRootEditPart) graphicalViewer.getEditPartRegistry().get(LayerManager.ID);
        IFigure gridFigure = ((LayerManager) rootEditPart).getLayer(LayerConstants.GRID_LAYER);
        IColorConstant cc = StyleUtil.getColorConstant(PreferenceManager.getInstance().loadPreferenceAsString(PreferencesConstants.EDITOR_GRID_COLOR));
        Diagram diagram = designEditor.getDiagram();
        if (cc != null && diagram != null) {
          GraphicsAlgorithm ga = diagram.getGraphicsAlgorithm();
          if (ga != null){
            ga.setForeground(GraphitiUi.getGaService().manageColor(diagram, cc));
View Full Code Here

    gaService.setLocation(invisibleRectangle, x, y);
    gaService.setSize(invisibleRectangle, ENV_W + 50, ENV_H);

    Shape envelopeShape = peService.createShape(envelope, false);
    Envelope envelopeGa = GraphicsUtil.createEnvelope(envelopeShape, 0, 0, ENV_W, ENV_H);
    IColorConstant color = filled ? IColorConstant.LIGHT_GRAY : IColorConstant.WHITE;
    envelopeGa.rect.setFilled(true);
    envelopeGa.rect.setBackground(gaService.manageColor(diagram, color));
    envelopeGa.rect.setForeground(gaService.manageColor(diagram, StyleUtil.CLASS_FOREGROUND));
    envelopeGa.line.setForeground(gaService.manageColor(diagram, StyleUtil.CLASS_FOREGROUND));
    AnchorUtil.addFixedPointAnchors(envelope, envelopeGa.rect);
View Full Code Here

TOP

Related Classes of org.eclipse.graphiti.util.IColorConstant

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.