Package net.helipilot50.stocktrade.displayproject.TMSchema

Examples of net.helipilot50.stocktrade.displayproject.TMSchema.State


          // for example)
          //this.updateInstrument(instrument);
        }
        // TF:6/6/07: if updateData() has not been called on the instrument, we won't know it's type
        // so we are going to have to assume string
        DataValue value = ((ConfigValueInst)instrument).getData();
        if (value != null) {
          String frameworkName = value.getClass().getName();
          if (frameworkName.equalsIgnoreCase("net.helipilot50.stocktrade.framework.IntegerData")) {
            typeName = "java.lang.Integer";
          }
          else if (frameworkName.equalsIgnoreCase("net.helipilot50.stocktrade.framework.DoubleData")) {
            typeName = "java.lang.Double";
View Full Code Here


    public Object getAttribute(String name) throws AttributeNotFoundException, MBeanException, ReflectionException {
        Instrument instrument = this.findInstrument(name);
        Object result = null;
        if (instrument instanceof ConfigValueInst) {
            DataValue value = ((ConfigValueInst)instrument).getData();
            result = value.toString();
        }
        if (instrument instanceof CounterInst) {
            result = ((CounterInst)instrument).getIntegerValue();
        }
        if (instrument instanceof AverageInst) {
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());
View Full Code Here

              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

TOP

Related Classes of net.helipilot50.stocktrade.displayproject.TMSchema.State

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.