Package org.openquark.cal.valuenode

Examples of org.openquark.cal.valuenode.RelativeDateTimeValueNode$RelativeDateTimeValueNodeProvider


        // Get the date time values from the two inner value editors.
        Calendar calendar = dateValueEditor.getCalendar();
        timeValueEditor.getUpdatedCalendar(calendar);

        // Update the value in the ValueNode.
        ValueNode returnVN = new RelativeDateTimeValueNode(calendar.getTime(), getValueNode().getTypeExpr());
        replaceValueNode(returnVN, false);

        notifyValueCommitted();
    }
View Full Code Here


            }

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

            RelativeDateTimeValueNode dateTimeValueNode = (RelativeDateTimeValueNode) valueEntryPanel.getValueNode();

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

        } else if (typeExpr.isNonParametricType(CAL_Time.TypeConstructors.Time)) {
View Full Code Here

            DateFormat dateTimeFormat = RelativeTemporalValueNode.getDateFormat(DateFormat.FULL, DateFormat.MEDIUM);

            try {
                Date date = dateTimeFormat.parse(newVal);
                valueEntryPanel.replaceValueNode(new RelativeDateTimeValueNode(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_Time.TypeConstructors.Time)) {
View Full Code Here

TOP

Related Classes of org.openquark.cal.valuenode.RelativeDateTimeValueNode$RelativeDateTimeValueNodeProvider

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.