Package net.helipilot50.stocktrade.framework

Examples of net.helipilot50.stocktrade.framework.EventHandle


              cachedRowSet.updateBigDecimal(pColOrdinal, value.getBigDecimal());
            } else if (pValue instanceof BooleanData) {
              BooleanData value = (BooleanData) pValue;
              cachedRowSet.updateBoolean(pColOrdinal, value.getBooleanValue());
            } else if (pValue instanceof DateTimeData) {
              DateTimeData value = (DateTimeData) pValue;
              cachedRowSet.updateDate(pColOrdinal, new Date(value.asDate().getTime()));
            } else if (pValue instanceof BinaryData) {
              BinaryData value = (BinaryData) pValue;
              cachedRowSet.updateBinaryStream(pColOrdinal, new ByteArrayInputStream(value.getValue()), value.getActualSize());
            }
          } catch (SQLException e) {
            UsageException errorVar = new UsageException(e.getMessage(), net.helipilot50.stocktrade.framework.Constants.SP_ER_USER, net.helipilot50.stocktrade.framework.Constants.SP_ER_PARAMETERERROR, e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
View Full Code Here


              cachedRowSet.updateInt(pColOrdinal, integerValue.getIntegerValue());
            } else if (pValue instanceof DoubleData) {
              DoubleData doubleValue = (DoubleData) pValue;
              cachedRowSet.updateDouble(pColOrdinal, doubleValue.getDoubleValue());
            } else if (pValue instanceof DecimalData) {
              DecimalData value = (DecimalData) pValue;
              cachedRowSet.updateBigDecimal(pColOrdinal, value.getBigDecimal());
            } else if (pValue instanceof BooleanData) {
              BooleanData value = (BooleanData) pValue;
              cachedRowSet.updateBoolean(pColOrdinal, value.getBooleanValue());
            } else if (pValue instanceof DateTimeData) {
              DateTimeData value = (DateTimeData) pValue;
              cachedRowSet.updateDate(pColOrdinal, new Date(value.asDate().getTime()));
            } else if (pValue instanceof BinaryData) {
              BinaryData value = (BinaryData) pValue;
              cachedRowSet.updateBinaryStream(pColOrdinal, new ByteArrayInputStream(value.getValue()), value.getActualSize());
            }
          } catch (SQLException e) {
            UsageException errorVar = new UsageException(e.getMessage(), net.helipilot50.stocktrade.framework.Constants.SP_ER_USER, net.helipilot50.stocktrade.framework.Constants.SP_ER_PARAMETERERROR, e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
View Full Code Here

              cachedRowSet.updateString(pColOrdinal, textValue.toString());
            } else if (pValue instanceof IntegerData) {
              IntegerData integerValue = (IntegerData) pValue;
              cachedRowSet.updateInt(pColOrdinal, integerValue.getIntegerValue());
            } else if (pValue instanceof DoubleData) {
              DoubleData doubleValue = (DoubleData) pValue;
              cachedRowSet.updateDouble(pColOrdinal, doubleValue.getDoubleValue());
            } else if (pValue instanceof DecimalData) {
              DecimalData value = (DecimalData) pValue;
              cachedRowSet.updateBigDecimal(pColOrdinal, value.getBigDecimal());
            } else if (pValue instanceof BooleanData) {
              BooleanData value = (BooleanData) pValue;
View Full Code Here

            DataValue theAttribute = null;
            if (attribute.getValue() instanceof java.lang.Integer) {
                theAttribute = new IntegerData((Integer)attribute.getValue());
            }
            if (attribute.getValue() instanceof java.lang.Double) {
                theAttribute = new DoubleData((Double)attribute.getValue());
            }
            if (attribute.getValue() instanceof java.lang.String) {
                theAttribute = new TextData((String)attribute.getValue());
            }
            ((ConfigValueInst)instrument).updateData(theAttribute);
View Full Code Here

        qq_Params.put("row", new ParameterHolder(0));
        qq_Params.put("column", new ParameterHolder(0));
        if (e.getSource() instanceof JRadioButtonMenuItem) {
            ButtonGroup bg = ((DefaultButtonModel) ((JRadioButtonMenuItem) e
                    .getSource()).getModel()).getGroup();
            eventsToPost.add(new EventHandle(bg, "Activate", qq_Params));
        } else {
            Component me = (Component) e.getSource();

            //System.out.println("Activate on ["+ me.toString() + "]");
            eventsToPost.add(new EventHandle(me, "Activate", qq_Params));
            // TF:13/11/07:Commented this out as there is now a childActivateListener to take care of this
            //ChildEventHelper.postEventToAllParents(me, "ChildActivate", null, eventsToPost);
        }
        /*
         * toData() must be called to update the mapped data object.
View Full Code Here

    public void toData() {

    }

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

                      JButton defaultBtn = FillInField.this.getRootPane().getDefaultButton();
                     
                      if (defaultBtn != null) {
                        FocusHelper.buttonClick(
                            defaultBtn,
                            new EventHandle(defaultBtn, "Click", ClickListener.makeParamList(e)));
                      }
                    }
                }
            });
        }
View Full Code Here

            modifiers = modifiers | Constants.KM_CMD;

        Hashtable qq_Params = new Hashtable();
        qq_Params.put( "keyID", new ParameterHolder(this.keyID) );
        qq_Params.put( "modifier", new ParameterHolder(modifiers) );
        FocusHelper.functionKeyActivate(new EventHandle(sink, "FunctionKeyPress", qq_Params));
        // AD:2/9/2008 If the F1 key is pressed also post HelpRequest to be consistent with Forte
        // Investigated using a separate KeyAction and KeyListeners but neither functioned exactly like Forte.
        // Having a separate HelpRequestKeyAction overrode the FunctionKeyPress.
        // KeyListeners needed to have focus to work correctly.
        if (this.keyID == Constants.FN_F1) {
            FocusHelper.functionKeyActivate(new EventHandle(sink, "HelpRequest"));
    }

    }
View Full Code Here

     */
    public void actionPerformed(ActionEvent e) {
        if (((JComponent)e.getSource()).isEnabled() &&
                (e.getModifiers() & ActionEvent.MOUSE_EVENT_MASK) == 0) {

            FocusHelper.buttonClick((JButton)e.getSource(), new EventHandle(e.getSource(), "Click", makeParamList(e)));
//            ClientEventManager.postEvent( e.getSource(), "Click", makeParamList(e) );
        }
    }
View Full Code Here

                this.dateCellHandler();

                while (true) {

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

                    // -------------
                    // task.Shutdown
                    // -------------
                    if (qq_currentEvent.isEvent(TaskHandle_Shutdown_task)) {
                        // ================ Begin Forte Event Handler Translation ================
                        break;
                        // ================ End Forte Event Handler Translation ================
                    }

                    // ----------------------------
                    // <MonthYear>.AfterValueChange
                    // ----------------------------
                    else if (qq_currentEvent.isEvent(TextGraphic_AfterValueChange_getqq_MonthYear)) {
                        try {
                            UIutils.startWaitCursor();
                            // ================ Begin Forte Event Handler Translation ================
                            break;
                            // ================ End Forte Event Handler Translation ================
                        }
                        finally {
                            UIutils.stopWaitCursor();
                        }
                    }

                    // -----------------
                    // <LeftArrow>.Click
                    // -----------------
                    else if (qq_currentEvent.isEvent(PictureButton_Click_getqq_LeftArrow)) {
                        try {
                            UIutils.startWaitCursor();
                            // ================ Begin Forte Event Handler Translation ================
                            this.fillCalendar(((DateTimeData)DateInput.getObject()).subtract(OneYear));
                            this.highlightDay();
                            // ================ End Forte Event Handler Translation ================
                        }
                        finally {
                            UIutils.stopWaitCursor();
                        }
                    }

                    // ------------------
                    // <RightArrow>.Click
                    // ------------------
                    else if (qq_currentEvent.isEvent(PictureButton_Click_getqq_RightArrow)) {
                        try {
                            UIutils.startWaitCursor();
                            // ================ Begin Forte Event Handler Translation ================
                            this.fillCalendar(((DateTimeData)DateInput.getObject()).add(OneYear));
                            this.highlightDay();
                            // ================ End Forte Event Handler Translation ================
                        }
                        finally {
                            UIutils.stopWaitCursor();
                        }
                    }

                    // ------------------
                    // <LeftArrow2>.Click
                    // ------------------
                    else if (qq_currentEvent.isEvent(PictureButton_Click_getqq_LeftArrow2)) {
                        try {
                            UIutils.startWaitCursor();
                            // ================ Begin Forte Event Handler Translation ================
                            this.fillCalendar(((DateTimeData)DateInput.getObject()).subtract(OneMonth));
                            this.highlightDay();
                            // ================ End Forte Event Handler Translation ================
                        }
                        finally {
                            UIutils.stopWaitCursor();
                        }
                    }

                    // -------------------
                    // <RightArrow2>.Click
                    // -------------------
                    else if (qq_currentEvent.isEvent(PictureButton_Click_getqq_RightArrow2)) {
                        try {
                            UIutils.startWaitCursor();
                            // ================ Begin Forte Event Handler Translation ================
                            this.fillCalendar(((DateTimeData)DateInput.getObject()).add(OneMonth));
                            this.highlightDay();
                            // ================ End Forte Event Handler Translation ================
                        }
                        finally {
                            UIutils.stopWaitCursor();
                        }
                    }
                    // ------------------
                    // <CancelDate>.Click
                    // ------------------
                    else if (qq_currentEvent.isEvent(PushButton_Click_getqq_CancelDate)) {
                        try {
                            UIutils.startWaitCursor();
                            // ================ Begin Forte Event Handler Translation ================
                            CancelEntry = true;
                            UIutils.setBackground(this.getCurrentHighlight(), Color.lightGray);
                            ((DateTimeData)DateInput.getObject()).setValue(OldDate);
                            this.fillCalendar((DateTimeData)DateInput.getObject());
                            this.highlightDay();
                            break;
                            // ================ End Forte Event Handler Translation ================
                        }
                        finally {
                            UIutils.stopWaitCursor();
                        }
                    }

                    // -----------------------
                    // Window.FunctionKeyPress
                    // -----------------------
                    else if (qq_currentEvent.isEvent(Window_FunctionKeyPress_this)) {
                        try {
                            UIutils.startWaitCursor();
                            // ================ Begin Forte Event Handler Translation ================
                            int key = ((ParameterHolder)qq_currentEvent.getParameter("keyID")).getInt();

                            if (key == Constants.VK_ESCAPE) {
                                CancelEntry = true;
                                UIutils.setBackground(this.getCurrentHighlight(), Color.lightGray);
                                ((DateTimeData)DateInput.getObject()).setValue(OldDate);
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.