Examples of RelativeDateValueNode


Examples of org.openquark.cal.valuenode.RelativeDateValueNode

        Time timeValue = (Time)getJTimeValueNode().getValue();
        Date dateTimeValue = timeValue.toDate();
        TypeExpr dateType = valueEditorManager.getValueNodeBuilderHelper().getTypeConstructorForName(CAL_RelativeTime.TypeConstructors.RelativeDate);
        TypeExpr timeType = valueEditorManager.getValueNodeBuilderHelper().getTypeConstructorForName(CAL_RelativeTime.TypeConstructors.RelativeTime);
       
        dateValueEditor.setOwnerValueNode(new RelativeDateValueNode(dateTimeValue, dateType));
        timeValueEditor.setOwnerValueNode(new RelativeTimeValueNode(dateTimeValue, timeType));
    }
View Full Code Here

Examples of org.openquark.cal.valuenode.RelativeDateValueNode

       
        Date dateTimeValue = getDateTimeValueNode().getDateTimeValue();
        TypeExpr dateType = valueEditorManager.getValueNodeBuilderHelper().getTypeConstructorForName(CAL_RelativeTime.TypeConstructors.RelativeDate);
        TypeExpr timeType = valueEditorManager.getValueNodeBuilderHelper().getTypeConstructorForName(CAL_RelativeTime.TypeConstructors.RelativeTime);
       
        dateValueEditor.setOwnerValueNode(new RelativeDateValueNode(dateTimeValue, dateType));
        timeValueEditor.setOwnerValueNode(new RelativeTimeValueNode(dateTimeValue, timeType));
    }
View Full Code Here

Examples of org.openquark.cal.valuenode.RelativeDateValueNode

                changed = true;
            }

        } else if (typeExpr.isNonParametricType(CAL_RelativeTime.TypeConstructors.RelativeDate)) {

            RelativeDateValueNode dateValueNode = (RelativeDateValueNode) valueEntryPanel.getValueNode();

            // Check.  If it's parseable, then it's valid (of course!).
            // If not parseable, then give a default value of the date in ValueNode.
            DateFormat dateFormat = RelativeTemporalValueNode.getDateFormat(DateFormat.FULL, -1);
           
            try {
                dateFormat.parse(currentText);
            } catch (ParseException pe) {
                currentText = dateFormat.format(dateValueNode.getDateValue());
                changed = true;

            }

        } else if (typeExpr.isNonParametricType(CAL_RelativeTime.TypeConstructors.RelativeTime)) {
View Full Code Here

Examples of org.openquark.cal.valuenode.RelativeDateValueNode

            DateFormat dateFormat = RelativeTemporalValueNode.getDateFormat(DateFormat.FULL, -1);

            try {
                Date date = dateFormat.parse(newVal);
                valueEntryPanel.replaceValueNode(new RelativeDateValueNode(date, typeExpr.copyTypeExpr()), true);
            } catch (ParseException pe) {
                System.out.println("Error in updateValueNode: Could not parse the Text into a Date value.");
            }

        } else if (typeExpr.isNonParametricType(CAL_RelativeTime.TypeConstructors.RelativeTime)) {
View Full Code Here

Examples of org.openquark.cal.valuenode.RelativeDateValueNode

     */
    @Override
    protected void commitValue() {
       
        // Update the value in the ValueNode.
        ValueNode returnVN = new RelativeDateValueNode(getCalendar().getTime(), getValueNode().getTypeExpr());
        replaceValueNode(returnVN, false);

        notifyValueCommitted();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.