Package org.openquark.util.time

Examples of org.openquark.util.time.Time.toDate()


    @Override
    public void setOwnerValueNode(ValueNode newValueNode) {
        super.setOwnerValueNode(newValueNode);
       
        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


    public void setInitialValue() {
        Time nodeValue=(Time)getJTimeValueNode().getValue();
       
        // Convert from local timezone to quasi-UTC
        Calendar localCalendar=Calendar.getInstance(TimeZone.getDefault());
        localCalendar.setTime(nodeValue.toDate());

        Calendar uiCalendar=Calendar.getInstance(TimeZone.getTimeZone("UTC"));
        uiCalendar.set(
              localCalendar.get(Calendar.YEAR),
              localCalendar.get(Calendar.MONTH),
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.