Package org.eclipse.bpmn2.modeler.ui.features.artifact

Source Code of org.eclipse.bpmn2.modeler.ui.features.artifact.TextAnnotationFeatureContainer

/*******************************************************************************
* Copyright (c) 2011 Red Hat, Inc.
*  All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.artifact;

import org.eclipse.bpmn2.TextAnnotation;
import org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.DefaultBPMNResizeFeature;
import org.eclipse.bpmn2.modeler.core.features.artifact.AddTextAnnotationFeature;
import org.eclipse.bpmn2.modeler.core.features.artifact.DirectEditTextAnnotationFeature;
import org.eclipse.bpmn2.modeler.core.features.artifact.LayoutTextAnnotationFeature;
import org.eclipse.bpmn2.modeler.core.features.artifact.MoveTextAnnotationFeature;
import org.eclipse.bpmn2.modeler.core.features.artifact.UpdateTextAnnotationFeature;
import org.eclipse.bpmn2.modeler.ui.features.AbstractDefaultDeleteFeature;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IDeleteFeature;
import org.eclipse.graphiti.features.IDirectEditingFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.ILayoutFeature;
import org.eclipse.graphiti.features.IMoveShapeFeature;
import org.eclipse.graphiti.features.IResizeShapeFeature;
import org.eclipse.graphiti.features.IUpdateFeature;

public class TextAnnotationFeatureContainer extends BaseElementFeatureContainer {

  @Override
  public boolean canApplyTo(Object o) {
    return super.canApplyTo(o) && o instanceof TextAnnotation;
  }

  @Override
  public ICreateFeature getCreateFeature(IFeatureProvider fp) {
    return new CreateTextAnnotationFeature(fp);
  }

  @Override
  public IAddFeature getAddFeature(IFeatureProvider fp) {
    return new AddTextAnnotationFeature(fp);
  }

  @Override
  public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
    return new UpdateTextAnnotationFeature(fp);
  }

  @Override
  public IDirectEditingFeature getDirectEditingFeature(IFeatureProvider fp) {
    return new DirectEditTextAnnotationFeature(fp);
  }

  @Override
  public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
    return new LayoutTextAnnotationFeature(fp);
  }

  @Override
  public IMoveShapeFeature getMoveFeature(IFeatureProvider fp) {
    return new MoveTextAnnotationFeature(fp);
  }

  @Override
  public IResizeShapeFeature getResizeFeature(IFeatureProvider fp) {
    return new DefaultBPMNResizeFeature(fp);
  }

  @Override
  public IDeleteFeature getDeleteFeature(IFeatureProvider fp) {
    return new AbstractDefaultDeleteFeature(fp);
  }

}
TOP

Related Classes of org.eclipse.bpmn2.modeler.ui.features.artifact.TextAnnotationFeatureContainer

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.