Package org.openquark.cal.valuenode

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


                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

            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

        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

Related Classes of org.openquark.cal.valuenode.JTimeValueNode

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.