Package net.helipilot50.stocktrade.framework

Examples of net.helipilot50.stocktrade.framework.EventHandle


        qq_Params.put("column", new ParameterHolder(0));
        if (e.getSource() instanceof JRadioButtonMenuItem) {
            ButtonGroup bg = ((DefaultButtonModel) ((JRadioButtonMenuItem) e
                    .getSource()).getModel()).getGroup();
            _log.debug("Activate on ["+ bg.toString() + "]");
            eventsToPost.add(new EventHandle(bg, "Activate", qq_Params));
        } else {
            Component me = (Component) e.getSource();
            _log.debug("Activate on ["+ me.toString() + "]");
            eventsToPost.add(new EventHandle(me, "Activate", qq_Params));
            //PM:10/11/07 - added the child parameter
            Hashtable<String, Object> qq_Params_child = new Hashtable<String, Object>();
            qq_Params_child.put("Child", new ParameterHolder(me));
            ChildEventHelper.postEventToAllParents(me, "ChildActivate", qq_Params_child, eventsToPost);
        }
View Full Code Here


        }
        FocusHelper.menuActivate((JComponent) e.getSource(), eventsToPost);

    }
    private void afterValueChange(Component me, List<EventHandle> eventsToPost) {
        eventsToPost.add(new EventHandle(me, "AfterValueChange"));
        ChildEventHelper.postEventToAllParents(me, "ChildAfterValueChange", null, eventsToPost);
    }
View Full Code Here

    public void actionPerformed(ActionEvent e) {
        ArrayList<EventHandle> eventsToPost = new ArrayList<EventHandle>();
        Hashtable<String, Object> qq_Params = new Hashtable<String, Object>();
        Component me = (Component) e.getSource();
        _log.debug("Activate on ["+ me.toString() + "]");
        eventsToPost.add(new EventHandle(WindowSystem.class, "AboutMenuActivate", qq_Params));
        FocusHelper.menuActivate((JComponent) e.getSource(), eventsToPost);

    }
View Full Code Here

                    params.put( "row", new ParameterHolder(row+1) );
                    params.put( "column", new ParameterHolder(column+1) );
                }
                owningArray = null;
            }
            pList.add(new EventHandle(mum, pEventName, params));
            // TF:18/06/2008:Fixed this so menus work properly
            if (mum instanceof JPopupMenu)
                mum = (Container)((JPopupMenu)mum).getInvoker();
            else
                mum = mum.getParent();
        }

        if (owningArray != null) {
            // Now the X and Y coordinates are in the array space, we need to translate them to the child coordinate space and get
            // the correct row and column
            if (pX != null && pY != null) {
                Point p = new Point(UIutils.milsToPixels(pX.getInt()), UIutils.milsToPixels(pY.getInt()));
                row = owningArray.rowAtPoint(p);
                column = owningArray.columnAtPoint(p);
                // Store the real row and column in the array. This isn't actually done in Forte, but makes life
                // much easier if we want to determine which cell generated the click.
                params.put( "row", new ParameterHolder(row+1) );
                params.put( "column", new ParameterHolder(column+1) );

                Rectangle r = owningArray.getCellRect(row, column, false);
                p.x -= r.x;
                p.y -= r.y;
                // Now X and Y are in owningArray coordinate space, need to translate them into pChild's
//              Point childLoc = SwingUtilities.convertPoint(owningArray, p, pChild);
                Point childLoc = p;
                pX.setInt(UIutils.pixelsToMils(childLoc.x));
                pY.setInt(UIutils.pixelsToMils(childLoc.y));
            }
            // Go through and post this to the parent of the array also.
            mum = owningArray;
            while (mum != null){
                pList.add(new EventHandle(mum, pEventName, params));
                mum = mum.getParent();
            }
        }
    }
View Full Code Here

      EventManager.postEvent(handle);
    }
   
  @SuppressWarnings("unchecked")
  public static void postEvent(Object pObject, String pEvent, Hashtable pParameters) {
    ClientEventManager.postEvent(new EventHandle(pObject, pEvent, pParameters));
  }
View Full Code Here

  public static void postEvent(Object pObject, String pEvent, Hashtable pParameters) {
    ClientEventManager.postEvent(new EventHandle(pObject, pEvent, pParameters));
  }

  public static void postEvent(Object pObject, String pEvent) {
    ClientEventManager.postEvent(new EventHandle(pObject, pEvent));
  }
View Full Code Here

      }
    };
    if (pReason != Constants.FC_SUPRESS) {
      Hashtable<String, Object> params = new Hashtable<String, Object>();
      params.put("reason", new ParameterHolder(pReason));
      EventHandle handle = new EventHandle(pObject, "AfterFocusGain", params);
      handle.setForceReceiptOfEvent(windowThread);
      handle.setCommencementNotifier(action);
      ClientEventManager.postEvent(handle);
    }
  }
View Full Code Here

        }
      }, this, "AfterRowAppend");
      Hashtable<String, Object> params = new Hashtable<String, Object>();
      params.put("row", new ParameterHolder(pRow));
      params.put("newObject", new ParameterHolder(newObject));
      EventHandle handle = new EventHandle(pObject, "AfterRowAppend", params);
      Window topLevel = (Window)this.getTopLevelAncestor();
      Thread windowThread = WindowManager.getOwningThread(topLevel);
      handle.setForceReceiptOfEvent(windowThread);
      handle.setCommencementNotifier(new Runnable() {
        public void run() {
          isAddRowEventPending = false;
        }
      });         
      ClientEventManager.postEvent(handle);
View Full Code Here

      EventManager.endEventChain();
    }
    // TF:11/10/07:Create a special event to reset the flag back to the default value, as the row
    // should change between these events
    // Create a dummy event to which to attach the interceptor
    EventHandle handle = new EventHandle(this, "dummy, cannot be caught");
    Window topLevel = (Window)this.getTopLevelAncestor();
    Thread windowThread = WindowManager.getOwningThread(topLevel);
    handle.setForceReceiptOfEvent(windowThread);
    handle.setCommencementNotifier(new Runnable() {
      public void run() {
        setRowForEvents(-1);
      }
    });         
    ClientEventManager.postEvent(handle);
View Full Code Here

            EventRegistration PushButton_Click_getqq_CancelBtn = ClientEventManager.register( this.getqq_CancelBtn(), "Click" );

            while (true) {

                UIutils.processGUIActions();
                EventHandle qq_currentEvent = EventManager.waitForEvent();
                if (qq_currentEvent == null)
                    break;

                // -------------
                // task.Shutdown
                // -------------
                if (qq_currentEvent.isEvent(TaskHandle_Shutdown_langThreadcurrentThread)) {
                    try {
                        CursorMgr.startEvent();
                        // ================ Begin Forte Event Handler Translation ================
                        if (UIutils.hasDataChanged(this.getForm())) {
                            Log.standardLog().info("Exiting with some data changed");
                        }
                        break;

                        // ================ End Forte Event Handler Translation ================
                    }
                    finally {
                        CursorMgr.endEvent();
                    }
                }

                // -----------------
                // <SubmitBtn>.Click
                // -----------------
                else if (qq_currentEvent.isEvent(PushButton_Click_getqq_SubmitBtn)) {
                    try {
                        CursorMgr.startEvent();
                        // ================ Begin Forte Event Handler Translation ================
                        //self.Window.MessageDialog(MessageText='Not yet implemented',
                        //              MessageType=MT_INFO);
                        this.getNewOrderGrid().setType(pOrderType);
                        TradeSO_proxy.getInstance().takeOrder(this.getNewOrderGrid());
                        WindowManager.messageDialog(this, "Submit Order Successful", 1, 50);
                        break;

                        // ================ End Forte Event Handler Translation ================
                    }
                    finally {
                        CursorMgr.endEvent();
                    }
                }

                // -----------------
                // <CancelBtn>.Click
                // -----------------
                else if (qq_currentEvent.isEvent(PushButton_Click_getqq_CancelBtn)) {
                    try {
                        CursorMgr.startEvent();
                        // ================ Begin Forte Event Handler Translation ================
                        break;
                        // ================ End Forte Event Handler Translation ================
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.framework.EventHandle

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.