Examples of GradientColoredArea


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

  }
 
  protected static void addGradientColoredArea(EList<GradientColoredArea> gcas, String colorStart, int locationValueStart,
          LocationType locationTypeStart, String colorEnd, int locationValueEnd, LocationType locationTypeEnd
          , Diagram diagram) {
    final GradientColoredArea gca = StylesFactory.eINSTANCE.createGradientColoredArea();
    gcas.add(gca);
    gca.setStart(StylesFactory.eINSTANCE.createGradientColoredLocation());
   
    IGaService gaService = Graphiti.getGaService();
   
    final Color startColor = gaService.manageColor(diagram, ColorUtil.getRedFromHex(colorStart)
                          , ColorUtil.getGreenFromHex(colorStart)
                          , ColorUtil.getBlueFromHex(colorStart));
    gca.getStart().setColor(startColor);
   
//    gca.getStart().setColor(StylesFactory.eINSTANCE.createColor());
//    gca.getStart().getColor().setBlue(ColorUtil.getBlueFromHex(colorStart));
//    gca.getStart().getColor().setGreen(ColorUtil.getGreenFromHex(colorStart));
//    gca.getStart().getColor().setRed(ColorUtil.getRedFromHex(colorStart));
    gca.getStart().setLocationType(locationTypeStart);
    gca.getStart().setLocationValue(locationValueStart);
    gca.setEnd(StylesFactory.eINSTANCE.createGradientColoredLocation());
   
    final Color endColor = gaService.manageColor(diagram, ColorUtil.getRedFromHex(colorEnd)
      , ColorUtil.getGreenFromHex(colorEnd)
      , ColorUtil.getBlueFromHex(colorEnd));
   
    gca.getEnd().setColor(endColor);
    gca.getEnd().setLocationType(locationTypeEnd);
    gca.getEnd().setLocationValue(locationValueEnd);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.