Package net.helipilot50.stocktrade.framework

Examples of net.helipilot50.stocktrade.framework.EventRegistration


        // ----------
        // Event Loop
        // ----------
        EventManager.startEventLoop();
        try {
            EventRegistration TaskHandle_Shutdown_langThreadcurrentThread = ClientEventManager.register( Thread.currentThread(), "Shutdown" );
            EventRegistration TradeMgr_OrderProcessed_getInstance = ClientEventManager.register( TradeSO_proxy.getInstance(), TradeMgr.cEVENT_ORDER_PROCESSED );
            EventRegistration TradeMgr_NewOrderAdded_getInstance = ClientEventManager.register( TradeSO_proxy.getInstance(), TradeMgr.cEVENT_NEW_ORDER_ADDED );
            EventRegistration PushButton_ObjectDrop_getqq_ViewHoldingsBtn = ClientEventManager.register( this.getqq_ViewHoldingsBtn(), "ObjectDrop" );
            EventRegistration PushButton_Click_getqq_ViewHoldingsBtn = ClientEventManager.register( this.getqq_ViewHoldingsBtn(), "Click" );
            EventRegistration PushButton_Click_getqq_MakeTradeBtn = ClientEventManager.register( this.getqq_MakeTradeBtn(), "Click" );
            EventRegistration TradeMgr_MakeTrade_return_getInstance = ClientEventManager.register( TradeSO_proxy.getInstance(), TradeMgr.cEVENT_MAKE_TRADE_RETURN );
            EventRegistration TradeMgr_MakeTrade_exception_getInstance = ClientEventManager.register( TradeSO_proxy.getInstance(), TradeMgr.cEVENT_MAKE_TRADE_EXCEPTION );
            EventRegistration PushButton_Click_getqq_ExitBtn = ClientEventManager.register( this.getqq_ExitBtn(), "Click" );

            while (true) {

                UIutils.processGUIActions();
                EventHandle qq_currentEvent = EventManager.waitForEvent();
View Full Code Here


            // ----------
            // Event Loop
            // ----------
            EventManager.startEventLoop();
            try {
                EventRegistration TaskHandle_Shutdown_langThreadcurrentThread = ClientEventManager.register( Thread.currentThread(), "Shutdown" );
                EventRegistration TradeMgr_OrderProcessed_getInstance = ClientEventManager.register( TradeSO_proxy.getInstance(), TradeMgr.cEVENT_ORDER_PROCESSED );
                EventRegistration PushButton_Click_getqq_BuyBtn = ClientEventManager.register( this.getqq_BuyBtn(), "Click" );
                EventRegistration PushButton_Click_getqq_SellBtn = ClientEventManager.register( this.getqq_SellBtn(), "Click" );
                EventRegistration PushButton_Click_getqq_ExitBtn = ClientEventManager.register( this.getqq_ExitBtn(), "Click" );
   
                while (true) {
   
                    UIutils.processGUIActions();
                    EventHandle qq_currentEvent = EventManager.waitForEvent();
View Full Code Here

        // ----------
        // Event Loop
        // ----------
        EventManager.startEventLoop();
        try {
            EventRegistration TaskHandle_Shutdown_langThreadcurrentThread = ClientEventManager.register( Thread.currentThread(), "Shutdown" );
            EventRegistration PushButton_Click_getqq_AsCustomerBtn = ClientEventManager.register( this.getqq_AsCustomerBtn(), "Click" );
            EventRegistration PushButton_Click_getqq_AsTraderBtn = ClientEventManager.register( this.getqq_AsTraderBtn(), "Click" );
            EventRegistration MenuCommand_Activate_getqq_AsCustomerMC = ClientEventManager.register( this.getqq_AsCustomerMC(), "Activate" );
            EventRegistration MenuCommand_Activate_getqq_AsTraderMC = ClientEventManager.register( this.getqq_AsTraderMC(), "Activate" );
            EventRegistration MenuCommand_Activate_getqq_fileExit = ClientEventManager.register( this.getqq_fileExit(), "Activate" );

            while (true) {

                UIutils.processGUIActions();
                EventHandle qq_currentEvent = EventManager.waitForEvent();
View Full Code Here

   */
    private static int lastCID;

    public SystemAgent() {
        String logLocation = PropertiesMgr.getProperty(PropertiesMgr.cLOGS_LOCATION);
        this.logFile = new File();
        this.logFile.setLocalName(logLocation + "/" + this.getClass().getName() + ".log");
        this.logFile.open(net.helipilot50.stocktrade.framework.Constants.SP_AM_READ_WRITE);

        this.initCmdProcessor();

View Full Code Here

          try {
            if (pValue instanceof TextData) {
              TextData textValue = (TextData) pValue;
              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;
View Full Code Here

    public void setAttribute (Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException {
        Instrument instrument = this.findInstrument(attribute.getName());
        if (instrument instanceof ConfigValueInst) {
            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) {
View Full Code Here

    public void setIntegerValue(int value) {
        if (scrollList != null) {
            int limit = this.list.getSize();
            for (int i = 0; i < limit; i++) {
                ListElement el = (ListElement)this.list.getElementAt(i);
                if (el.getIntegerValue() == value) {
                    this.list.setSelection(el);
                    return;
                }
            }
        }
View Full Code Here

    public void setObjectValue(Object value) {
        if (scrollList != null) {
            if (scrollList != null) {
                int limit = this.list.getSize();
                for (int i = 0; i < limit; i++) {
                    ListElement el = (ListElement)this.list.getElementAt(i);
                    if (el.getObjectValue() != null && el.getObjectValue().equals(value)) {
                        this.list.setSelection(el);
                        return;
                    }
                }
            }
View Full Code Here

    public void setTextValue(TextData value) {
        if (scrollList != null) {
            if (scrollList != null) {
                int limit = this.list.getSize();
                for (int i = 0; i < limit; i++) {
                    ListElement el = (ListElement)this.list.getElementAt(i);
                    if (el.getTextValue() == value) {
                        this.list.setSelection(el);
                        return;
                    }
                }
            }
View Full Code Here

   
    public void setElementList(Array_Of_ListElement<ListElement> les) {
        // TF:8/8/07:Made a shallow clone in case there is a really big object attached to the list element
        Array_Of_ListElement<ListElement> clonedList = CloneHelper.clone(les, false);
        Object currentValue = this.list.getValue();
        ListElement valueToReselect = null;
        if (currentValue instanceof ListElement && clonedList != null && this.list.getSelectionHolder() instanceof TypeAwareValueModel) {
          TypeAwareValueModel tavm = (TypeAwareValueModel)this.list.getSelectionHolder();
          // We need to find an item in the new list which is the same as an item in the old list,
          // depending on the type being considered. For example, if the list is mapped to an int,
          // we need to find an element in the new list with the same IntegerValue.
          Class<?> clazz = tavm.getValueType();
          ListElement currentSelection = (ListElement)currentValue;
          for (ListElement item : clonedList) {
            if (clazz.equals(Integer.TYPE) ||
                clazz.equals(Short.TYPE) ||
                NumericData.class.isAssignableFrom(clazz) ||
                Number.class.isAssignableFrom(clazz)) {
              if (item.getIntegerValue() == currentSelection.getIntegerValue()) {
                valueToReselect = item;
                break;
              }
            }
            else if (String.class.isAssignableFrom(clazz) || TextData.class.isAssignableFrom(clazz) && currentSelection.getTextValue() != null) {
              if (currentSelection.getTextValue().equals(item.getTextValue())) {
                valueToReselect = item;
                break;
              }
            }
            else {
              if (currentSelection.getObjectValue() != null && currentSelection.getObjectValue() == item.getObjectValue()) {
                valueToReselect = item;
                break;
              }
            }
          }
View Full Code Here

TOP

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

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.