Examples of JTimeValueNode


Examples of org.openquark.cal.valuenode.JTimeValueNode

                uiCalendar.get(Calendar.HOUR_OF_DAY),
                uiCalendar.get(Calendar.MINUTE),
                uiCalendar.get(Calendar.SECOND));
               
        // Update the value in the ValueNode.
        ValueNode returnVN = new JTimeValueNode(Time.fromDate(localCalendar.getTime()), getValueNode().getTypeExpr());
        replaceValueNode(returnVN, false);

        notifyValueCommitted();
    }
View Full Code Here

Examples of org.openquark.cal.valuenode.JTimeValueNode

                changed = true;
            }

        } else if (typeExpr.isNonParametricType(CAL_Time.TypeConstructors.Time)) {

            JTimeValueNode valueNode = (JTimeValueNode) 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 fmt=DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.LONG);
            fmt.setTimeZone(TimeZone.getDefault());

           
            try {
                fmt.parse(currentText);
            } catch (ParseException pe) {
                currentText = fmt.format(valueNode.getJavaDate());
                changed = true;
            }

        } else if (typeExpr.sameType(typeConstants.getCharListType())) {
View Full Code Here

Examples of org.openquark.cal.valuenode.JTimeValueNode

            fmt.setTimeZone(TimeZone.getDefault());

            try {
                Date date = fmt.parse(newVal);
                Time time = Time.fromDate(date);
                valueEntryPanel.replaceValueNode(new JTimeValueNode(time, typeExpr.copyTypeExpr()), true);
            } catch (ParseException pe) {
                System.out.println("Error in updateValueNode: Could not parse the Text into a Date value.");
            }
        } else {
View Full Code Here

Examples of org.openquark.cal.valuenode.JTimeValueNode

        else if (value instanceof Time) {
            TypeExpr timeType = calServices.getTypeFromQualifiedName(CAL_Time.TypeConstructors.Time);
            if (timeType == null) {
                return null;               
            }
            return new JTimeValueNode((Time) value, timeType);
        }
   
        return null;
    }
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.