Examples of PictogramElement


Examples of org.eclipse.graphiti.mm.pictograms.PictogramElement

    Anchor sAnchor = context.getSourceAnchor();
   
    //Move the source anchor to CI if we have a literal
    Object o = getBusinessObjectForPictogramElement(sAnchor.getParent());
    if (Utility.isObjectLiteral(o)) {
      PictogramElement pe = getFeatureProvider(
          ).getPictogramElementForBusinessObject(
              Utility.getParentLocalVariableStatement(
                  (EObject) o));
      if (pe instanceof AnchorContainer) {
        sAnchor = ((AnchorContainer) pe).getAnchors().get(0);
View Full Code Here

Examples of org.eclipse.graphiti.mm.pictograms.PictogramElement

     *
     */
    public IReason updateNeeded(IUpdateContext context) {
        // retrieve name from pictogram model
        String pictogramName = null;
        PictogramElement pictogramElement = context.getPictogramElement();
        if (pictogramElement instanceof ContainerShape) {
            ContainerShape cs = (ContainerShape) pictogramElement;
            for (Shape shape : cs.getChildren()) {
                if (shape.getGraphicsAlgorithm() instanceof Text) {
                    Text text = (Text) shape.getGraphicsAlgorithm();
View Full Code Here

Examples of org.eclipse.graphiti.mm.pictograms.PictogramElement

     * Updates PE variable name in line with model.
     */
    public boolean update(IUpdateContext context) {
        // retrieve name from business model
        String businessName = null;
        PictogramElement pictogramElement = context.getPictogramElement();
        Object bo = getBusinessObjectForPictogramElement(pictogramElement);
        if (bo instanceof LocalVariableStatement) {
          LocalVariableStatement lvs = (LocalVariableStatement) bo;
            businessName = lvs.getVariable().getName();
        }
View Full Code Here

Examples of org.eclipse.graphiti.mm.pictograms.PictogramElement

     * We need to do an update if pictogram value doesn't match model.
     */
    public IReason updateNeeded(IUpdateContext context) {
        // retrieve name from pictogram model
        String pictogramValue = null;
        PictogramElement pictogramElement = context.getPictogramElement();
        if (pictogramElement instanceof ContainerShape) {
            ContainerShape cs = (ContainerShape) pictogramElement;
            for (Shape shape : cs.getChildren()) {
                if (shape.getGraphicsAlgorithm() instanceof MultiText) {
                  MultiText text = (MultiText) shape.getGraphicsAlgorithm();
View Full Code Here

Examples of org.eclipse.graphiti.mm.pictograms.PictogramElement

     * Update pictogram value for literal to be in-line with model value.
     */
    public boolean update(IUpdateContext context) {
        // retrieve name from business model
        String businessValue = null;
        PictogramElement pictogramElement = context.getPictogramElement();
        Object bo = getBusinessObjectForPictogramElement(pictogramElement);
        if (Utility.isObjectLiteral(bo)) {
          businessValue = Utility.getLiteralValue((EObject) bo);
        }

View Full Code Here

Examples of org.eclipse.graphiti.mm.pictograms.PictogramElement

   * Only allow editing of text.
   */
  @Override
  public boolean canDirectEdit(IDirectEditingContext context) {

    PictogramElement pe = context.getPictogramElement();
    Object bo = getBusinessObjectForPictogramElement(pe);
    GraphicsAlgorithm ga = context.getGraphicsAlgorithm();

    // support direct editing if it is a literal
    if (Utility.isObjectLiteral(bo)) {
View Full Code Here

Examples of org.eclipse.graphiti.mm.pictograms.PictogramElement

  /**
   * Gets current model value for literal.
   */
  public String getInitialValue(IDirectEditingContext context) {

    PictogramElement pe = context.getPictogramElement();
    EObject eo = (EObject)
        getBusinessObjectForPictogramElement(pe);

    return Utility.getLiteralValue(eo);
  }
View Full Code Here

Examples of org.eclipse.graphiti.mm.pictograms.PictogramElement

   */
  @Override
  public void setValue(String value, IDirectEditingContext context) {

    // set the new value for the literal
    PictogramElement pe = context.getPictogramElement();
 
    EObject eo = (EObject) getBusinessObjectForPictogramElement(pe);
   
    Utility.setLiteralValue(eo, value);

View Full Code Here

Examples of org.eclipse.graphiti.mm.pictograms.PictogramElement

  /**
   * Removes bolierplate holding the CI as well as CI itself.
   */
  public void preDelete(IDeleteContext context) {
   
    PictogramElement pe = context.getPictogramElement();
    Object obj = getBusinessObjectForPictogramElement(pe);
    if (obj instanceof LocalVariableStatement) {
      //Get the anchors and delete any connections
     
      if (pe instanceof ContainerShape) {
View Full Code Here

Examples of org.eclipse.graphiti.mm.pictograms.PictogramElement

     */
    @Override
    public IDirectEditingFeature getDirectEditingFeature(
        IDirectEditingContext context) {

        PictogramElement pe = context.getPictogramElement();
        Object bo = getBusinessObjectForPictogramElement(pe);
       
        if (bo instanceof LocalVariableStatement) {
          if (Utility.isPEVariable((LocalVariableStatement) bo)) {
            return new DirectEditProcessingElementFeature(this);
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.