Package de.sciss.app

Examples of de.sciss.app.AbstractWindow$Event


// the next event cycle) and re-put it in the front\
// coz setAlwaysOnTop came "too late"
EventQueue.invokeLater( new Runnable() {
  public void run()
  {
    final AbstractWindow fw = FloatingPaletteHandler.getInstance().getFocussedWindow();
    if( fw != null ) fw.toFront();
  }
});
            } else {
              jif.setLayer( JLayeredPane.DEFAULT_LAYER );
            }
View Full Code Here


  private void instShowDialog( Dialog dlg )
  {
//    System.out.println( "instShowDialog" );
   
    final AbstractWindow  w;
    final List        wasOnTop  = new ArrayList();
    final boolean      modal    = dlg.isModal() && (fph != null);
    AbstractWindow      w2;
//boolean gaga = false;
   
    // temporarily disable alwaysOnTop
    if( !internalFrames && floating ) {
      for( Iterator iter = getWindows(); iter.hasNext(); ) {
        w2 = (AbstractWindow) iter.next();
        if( GUIUtil.isAlwaysOnTop( w2.getWindow() )) {
//gaga = true;
//break;
          wasOnTop.add( w2 );
          GUIUtil.setAlwaysOnTop( w2.getWindow(), false );
        }
      }
    }
    try {
      w = new AppWindow( dlg );
      w.init()// calls addWindow
//      ((AppWindow) w).gaga();
       
      // --- modal interruption ---
      if( modal ) fph.addModalDialog(); // this shit is necessary because java.awt.FileDialog doesn't fire windowActivated ...
//      if( gaga ) GUIUtil.setAlwaysOnTop( dlg, true );
      w.setVisible( true );
      if( modal ) fph.removeModalDialog();
     
  //    wh.removeWindow( w, null );
      w.dispose()// calls removeWindow

    } finally { // make sure to restore original state
      for( int i = 0; i < wasOnTop.size(); i++ ) {
        w2 = (AbstractWindow) wasOnTop.get( i );
//        System.out.println( "wasOnTop " + i + " : " + w2.getClass().getName() );
        GUIUtil.setAlwaysOnTop( w2.getWindow(), true );
      }
    }
  }
View Full Code Here

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.EVENT: {
            Event event = (Event) theEObject;
            T result = caseEvent(event);
            if (result == null)
                result = caseFlowNode(event);
            if (result == null)
                result = caseInteractionNode(event);
View Full Code Here

    ProcessInstanceEntity processInstanceImpl = processInstanceManager.findProcessInstanceById(processInstanceId, processDefinition);
    TokenEntity tokenEntity = processInstanceImpl.getTokenMap().get(tokenId);
    processInstanceImpl.getContextInstance().setTransientVariableMap(transientVariables);
   
    if(nodeId==null){
      Event event=(Event)tokenEntity.getFlowNode();
      if(event instanceof BoundaryEvent){
        BoundaryEvent boundaryEvent=(BoundaryEvent)event;
        Activity activity =boundaryEvent.getAttachedToRef();
        boolean isCancelActivity=boundaryEvent.isCancelActivity();
        if(isCancelActivity){
View Full Code Here

    return bo != null && bo instanceof Event;
  }

  @Override
  public Object[] create(ICreateContext context) {
    Event e = (Event) getBusinessObjectForPictogramElement(context.getTargetContainer());
    EventWithDefinitions event = support.create(e);
    EventDefinition definition = createEventDefinition(context);
    event.getEventDefinitions().add(definition);
    addGraphicalRepresentation(context, definition);
    return new Object[] { definition };
View Full Code Here

  }

  @Override
  public PictogramElement add(IAddContext context) {
    ContainerShape container = context.getTargetContainer();
    Event event = (Event) getBusinessObjectForPictogramElement(container);

    EventWithDefinitions definitions = support.create(event);
    int size = definitions.getEventDefinitions().size();

    if (size > 1) {
View Full Code Here

    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

TOP

Related Classes of de.sciss.app.AbstractWindow$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.