Examples of JaspiraEventHandlerCode


Examples of org.openbp.jaspira.event.JaspiraEventHandlerCode

   *    true  The event has been consumed by an event handler.<br>
   *    false  The event has not been consumed.
   */
  public boolean eventFired(JaspiraEvent je)
  {
    JaspiraEventHandlerCode result = null;

    // Find handler method for event
    String eventname = je.getEventName();
    Method method = (Method) eventMethods.get(eventname);
    if (method != null)
View Full Code Here

Examples of org.openbp.jaspira.event.JaspiraEventHandlerCode

      return EVENT_HANDLED;
    }

    private JaspiraEventHandlerCode eventOpen(JaspiraEvent event, int priority)
    {
      JaspiraEventHandlerCode ret = eventTryOpen(event, priority);

      if (ret == EVENT_IGNORED)
      {
        // Open failed, issue an error message
View Full Code Here

Examples of org.openbp.jaspira.event.JaspiraEventHandlerCode

    {
      Object o = event.getObject();

      if (event instanceof OpenEvent)
      {
        JaspiraEventHandlerCode ret = doOpen(null, false, event);
        if (ret != EventModule.EVENT_IGNORED)
          return ret;
      }
      else if (o instanceof Transferable)
      {
        Transferable transferable = (Transferable) o;

        if (transferable.isDataFlavorSupported(ClientFlavors.MODEL_OBJECT))
        {
          ModelObject mo = null;
          try
          {
            mo = (ModelObject) transferable.getTransferData(ClientFlavors.MODEL_OBJECT);
          }
          catch (IOException e)
          {
            return EVENT_IGNORED;
          }
          catch (UnsupportedFlavorException e)
          {
            // Does not happen
            return EVENT_IGNORED;
          }

          if (mo != null)
          {
            List associations = mo.getAssociations();
            if (associations != null)
            {
              int n = associations.size();
              for (int i = 0; i < n; ++i)
              {
                Association assoc = (Association) associations.get(i);
                if (assoc.getAssociationPriority() == priority)
                {
                 
                  JaspiraEventHandlerCode ret = doOpen(assoc, !mo.isModifiable(), event);
                  if (ret != EventModule.EVENT_IGNORED)
                    return ret;
                }
              }
            }
            else
            {
              // No associations defined for this model object;
              // Assume this is ok and prevent an error message
              // TODONOW return EVENT_CONSUMED;
            }
          }
        }
      }
      else if (o instanceof Association)
      {
        Association assoc = (Association) o;
        if (assoc.getAssociationPriority() == Association.PRIMARY)
        {
          JaspiraEventHandlerCode ret = doOpen(assoc, false, event);
          if (ret != EventModule.EVENT_IGNORED)
            return ret;
        }
      }
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.