Package org.gphoto2

Examples of org.gphoto2.Camera$Event


    return intoDiagram || intoLane || intoParticipant || intoFlowELementContainer;
  }

  @Override
  public PictogramElement add(IAddContext context) {
    Event e = (Event) context.getNewObject();

    IPeService peService = Graphiti.getPeService();
    ContainerShape containerShape = peService.createContainerShape(context.getTargetContainer(), true);

    IGaService gaService = Graphiti.getGaService();

    Rectangle invisibleRect = gaService.createInvisibleRectangle(containerShape);
    gaService.setLocationAndSize(invisibleRect, context.getX(), context.getY(), EVENT_SIZE, EVENT_SIZE
            + EVENT_TEXT_AREA);

    Shape ellipseShape = peService.createShape(containerShape, false);
    peService.setPropertyValue(ellipseShape, EVENT_ELEMENT, EVENT_CIRCLE);
    Ellipse ellipse = createEventShape(ellipseShape);
    StyleUtil.applyBGStyle(ellipse, this);
    decorateEllipse(ellipse);

    Shape textShape = peService.createShape(containerShape, false);
    peService.setPropertyValue(textShape, UpdateBaseElementNameFeature.TEXT_ELEMENT, Boolean.toString(true));
    Text text = gaService.createDefaultText(getDiagram(), textShape, e.getName());
    text.setStyle(StyleUtil.getStyleForText(getDiagram()));
    text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
    text.setVerticalAlignment(Orientation.ALIGNMENT_TOP);
    gaService.setLocationAndSize(text, 0, EVENT_SIZE, EVENT_SIZE, EVENT_TEXT_AREA);
View Full Code Here


    public boolean canCreate(ICreateContext context) {
      if (!super.canCreate(context)) {
        return false;
      }

      Event e = (Event) getBusinessObjectForPictogramElement(context.getTargetContainer());

      if (e instanceof StartEvent) {
        EObject container = context.getTargetContainer().eContainer();
        if (container instanceof Shape) {
          Object o = getBusinessObjectForPictogramElement((Shape) container);
View Full Code Here

    public boolean canCreate(ICreateContext context) {
      if (!super.canCreate(context)) {
        return false;
      }

      Event e = (Event) getBusinessObjectForPictogramElement(context.getTargetContainer());
      if (e instanceof ThrowEvent) {
        return false;
      }

      return true;
View Full Code Here

    public boolean canCreate(ICreateContext context) {
      if (!super.canCreate(context)) {
        return false;
      }

      Event e = (Event) getBusinessObjectForPictogramElement(context.getTargetContainer());

      return e instanceof EndEvent;
    }
View Full Code Here

    public boolean canCreate(ICreateContext context) {
      if (!super.canCreate(context)) {
        return false;
      }

      Event e = (Event) getBusinessObjectForPictogramElement(context.getTargetContainer());

      if (e instanceof BoundaryEvent) {
        BoundaryEvent be = (BoundaryEvent) e;
        return be.isCancelActivity();
      }
View Full Code Here

    public boolean canCreate(ICreateContext context) {
      if (!super.canCreate(context)) {
        return false;
      }

      Event e = (Event) getBusinessObjectForPictogramElement(context.getTargetContainer());

      if (e instanceof BoundaryEvent) {
        BoundaryEvent be = (BoundaryEvent) e;
        return be.isCancelActivity();
      }
View Full Code Here

    public boolean canCreate(ICreateContext context) {
      if (!super.canCreate(context)) {
        return false;
      }

      Event e = (Event) getBusinessObjectForPictogramElement(context.getTargetContainer());

      if (e instanceof BoundaryEvent) {
        BoundaryEvent be = (BoundaryEvent) e;
        return be.isCancelActivity();
      }
View Full Code Here

    public boolean canCreate(ICreateContext context) {
      if (!super.canCreate(context)) {
        return false;
      }

      Event e = (Event) getBusinessObjectForPictogramElement(context.getTargetContainer());

      if (e instanceof IntermediateCatchEvent || e instanceof IntermediateThrowEvent) {
        return true;
      }
View Full Code Here

    public boolean canCreate(ICreateContext context) {
      if (!super.canCreate(context)) {
        return false;
      }

      Event e = (Event) getBusinessObjectForPictogramElement(context.getTargetContainer());
      if (e instanceof ThrowEvent) {
        return false;
      }

      return true;
View Full Code Here

public class CameraListTest {
  @Test
  public void test() {
    CameraList list = new CameraList();
    assertEquals(0, list.size());
    list.add(new CameraEntry("Foo", "Bar"));
    list.add(new CameraEntry("A", "B"));
    list.add(new CameraEntry("X", "Z"));

    assertEquals(3, list.size());
    list.sort();
    assertEquals("A", list.get(0).getName());
    assertEquals("B", list.get(0).getValue());
View Full Code Here

TOP

Related Classes of org.gphoto2.Camera$Event

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.