Package org.openquark.cal.valuenode

Examples of org.openquark.cal.valuenode.RelativeTimeValueNode$RelativeTimeValueNodeProvider


        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


        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

        // Update the date.
        getUpdatedCalendar(calendar);

        // Save the updated date.
        ValueNode returnVN = new RelativeTimeValueNode(calendar.getTime(), getValueNode().getTypeExpr());
        replaceValueNode(returnVN, false);

        notifyValueCommitted();
    }
View Full Code Here

        // Create a value tree node to use with the value field.
        // The value will be the current time.
        TypeExpr timeTypeExpr = valueEditorManager.getValueNodeBuilderHelper().getTypeConstructorForName(CAL_RelativeTime.TypeConstructors.RelativeTime);
        Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
        Date time = calendar.getTime();
        RelativeTimeValueNode timeVN = new RelativeTimeValueNode(time, timeTypeExpr);

        valueField = new DateTimeValueEntryField(new ValueEntryPanel(valueEditorHierarchyManager, timeVN));

        // Give it a larger font.
        valueField.setFont(new java.awt.Font("sansserif", Font.BOLD, 18));
View Full Code Here

            }

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

            RelativeTimeValueNode timeValueNode = (RelativeTimeValueNode) valueEntryPanel.getValueNode();

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

            }

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

            DateFormat timeFormat = RelativeTemporalValueNode.getDateFormat(-1, DateFormat.MEDIUM);

            try {
                Date date = timeFormat.parse(newVal);
                valueEntryPanel.replaceValueNode(new RelativeTimeValueNode(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.RelativeDateTime)) {
View Full Code Here

TOP

Related Classes of org.openquark.cal.valuenode.RelativeTimeValueNode$RelativeTimeValueNodeProvider

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.