Package net.helipilot50.stocktrade.framework

Examples of net.helipilot50.stocktrade.framework.TextData


  //PM:23/4/08
  public void loadColumnHeadings(int setNumber, MsgCatalog mcat){
        for (OutlineColumnDesc col : columns){
            if (col.getTitleMsgNum() > 0){
              String titleString = mcat.getString(setNumber, col.getTitleMsgNum(), TextData.valueOf(col.getTitle()));
              col.setTitle(new TextData(titleString));
            }
        }
  }
View Full Code Here


        return this.sp;
    }

    public Object getCellEditorValue() {
        if (this.mappedToTextData) {
            return new TextData(this.getMultiLineTextField().getText());
        }
        return this.getMultiLineTextField().getText();
    }
View Full Code Here

            }
        }
    }
  //PM:14/3/08 properties for binding the text value
    public void setText(String value){
      this.setTextValue(new TextData(value));
    }
View Full Code Here

    public void setText(String value){
      this.setTextValue(new TextData(value));
    }
  //PM:14/3/08 properties for binding the text value
    public String getText(){
      TextData value = getTextValue();
      return value == null ? null : value.toString();
    }
View Full Code Here

            }
            else if (str == null){
              pDataValue.setValue((TextData)null);
            }
            else {
              TextData aTD = new TextData(determineStringToReturn(str, pColumnID, type));
              pDataValue.setValue(aTD);
            }
          }
          break;
View Full Code Here

            if (o == null || resultSet.wasNull()) {
                throw new UsageException(
                        "getTextData(int) could not handle column " + pColumnID + ". Result =" + o,
                        SP_ER_PARAMETERERROR, SP_ER_USER, UsageException.qq_Resolver.cMESSAGE_REASONCODE_SEVERITY);
            }
            return new TextData(determineStringToReturn(resultSet.getString(pColumnID), pColumnID));
        } catch (SQLException e) {
          throw processException(e);
        }
    }
View Full Code Here

        {
            //  This method fills the calendar window with the dates in the right places
            //  Set the label of the window with month and year
            //  It looks like this: February - 1964
            net.helipilot50.stocktrade.framework.DateFormat Fmt = new net.helipilot50.stocktrade.framework.DateFormat();
            Fmt.setTemplate(new TextData("m"));
            TextData Month = Fmt.formatDate(DateInput);
            Fmt.setTemplate(new TextData("mmmm - yyyy")); //$NON-NLS-1$
            this.getqq_MonthYear().setText(Fmt.formatDate(DateInput).toString());

            //  Change the color of the label to BLUE if it is the
            //  current month. All other months stays BLACK
            DateTimeData CurrentMonthYear = new DateTimeData();
            CurrentMonthYear.setCurrent();

            if (this.getqq_MonthYear().getText().equals(Fmt.formatDate(CurrentMonthYear))) {
                UIutils.setForeground(this.getqq_MonthYear(), Color.blue);
            }
            else {
                UIutils.setForeground(this.getqq_MonthYear(), Color.black);
            }

            //  Get the current day of the month
            //  so that it can be highlighted
            Fmt.setTemplate(new TextData("d"));
            this.setCurrentDay(Fmt.formatDate(DateInput).getValue());

            //  Find out what day of the week does the 1st of the month fall on
            Fmt.setTemplate(new TextData("m/yyyy")); //$NON-NLS-1$
            TextData FirstOfMonthText = new TextData("1/"); //$NON-NLS-1$
            FirstOfMonthText.concat( Fmt.formatDate(DateInput) );
            Fmt.setTemplate(new TextData("d/m/yyyy"));
            DateTimeData FirstOfMonth = Fmt.decodeDate(FirstOfMonthText);
            int DateStart = FirstOfMonth.dayOfWeek();

            //  Find out how many days are there in this month
            //  Note that we need to deal with leap year
            int DateEnd = 0;

            if (Month.toString().equals("4") || Month.toString().equals("6") || Month.toString().equals("9") || Month.toString().equals("11")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
                DateEnd = DateStart+29;
            }
            else if (Month.toString().equals("2")) { //$NON-NLS-1$
                IntervalData Days28 = new IntervalData();
                Days28.addUnit(0, 0, 28, 0, 0, 0, 0);
                FirstOfMonth.add(Days28);
                Fmt.setTemplate(new TextData("m"));
                TextData FebOrMarch = Fmt.formatDate(FirstOfMonth);

                if (FebOrMarch.toString().equals("2")) { //$NON-NLS-1$
                    //  Leap year
                    DateEnd = DateStart+28;
                }
                else {
                    DateEnd = DateStart+27;
View Full Code Here

     * <p>
     * @param DateInput Type: DateTimeData
     */
        public void setSelection(ParameterHolder_DateTimeData DateInput)
        {
            net.helipilot50.stocktrade.framework.DateFormat Fmt = new net.helipilot50.stocktrade.framework.DateFormat(new TextData("m/yyyy"), net.helipilot50.stocktrade.framework.DateFormat.qq_Resolver.cTEMPLATE);
            TextData Selection = new TextData();
            Selection.setValue( this.getCurrentDay() );
            Selection.concat( "/" ); //$NON-NLS-1$
            Selection.concat( Fmt.formatDate(((DateTimeData)DateInput.getObject())) );
            Fmt.setTemplate(new TextData(Messages.getString("CalendarWindow.0"))); //$NON-NLS-1$

            DateInput.setObject(Fmt.decodeDate(Selection));
        }
View Full Code Here

                    ((RadioListModel)rl.getModel()).setIntegerValue(((IntegerData)value).intValue());
                }
            else if (value instanceof TextData)
                ((RadioListModel)rl.getModel()).setTextValue((TextData)value);
            else if (value instanceof String)
                ((RadioListModel)rl.getModel()).setTextValue(new TextData((String)value));
            else
                ((RadioListModel)rl.getModel()).setObjectValue(value);
        }
        return result;
    }
View Full Code Here

                return new IntegerData(element.getIntegerValue());
            }
        }
        else if (TextData.class.isAssignableFrom(mapType))
            try {
                TextData newValue = (TextData)mapType.newInstance();
                newValue.setValue(element.getTextValue());
                return newValue;
            }
            catch (Exception e) {
                // Shouldn't get here, let's keep the compiler happy
                return element == null ? null : element.getTextValue();
View Full Code Here

TOP

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

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.