Examples of DateTimeRange


Examples of com.invient.vaadin.charts.InvientChartsConfig.AxisBase.DateTimePlotBand.DateTimeRange

                if (numberRange.getTo() != null) {
                    target.addAttribute("to", numberRange.getTo());
                }
            } else if (plotBandRange instanceof DateTimeRange) {
                target.addAttribute("valueType", "date");
                DateTimeRange dateRange = (DateTimeRange) plotBandRange;
                target.startTag("from");
                if (dateRange.getFrom() != null) {
                    target.addAttribute("year",
                            getYearFromDate(dateRange.getFrom()));
                    target.addAttribute("month",
                            getMonthFromDate(dateRange.getFrom()));
                    target.addAttribute("day",
                            getDayFromDate(dateRange.getFrom()));
                }
                target.endTag("from");
                target.startTag("to");
                if (dateRange.getTo() != null) {
                    target.addAttribute("year",
                            getYearFromDate(dateRange.getTo()));
                    target.addAttribute("month",
                            getMonthFromDate(dateRange.getTo()));
                    target.addAttribute("day",
                            getDayFromDate(dateRange.getTo()));
                }
                target.endTag("to");
            }
        }
        target.endTag("rangeValue");
View Full Code Here

Examples of com.invient.vaadin.charts.InvientChartsConfig.AxisBase.DateTimePlotBand.DateTimeRange

                DateTimeAxis masterDateTimeAxis = (DateTimeAxis) masterChart
                        .getConfig().getXAxes().iterator().next();
                masterDateTimeAxis.removePlotBand("mask-before");
                DateTimePlotBand plotBandBefore = new DateTimePlotBand(
                        "mask-before");
                plotBandBefore.setRange(new DateTimeRange(masterChartMinDate,
                        new Date((long) min)));
                plotBandBefore.setColor(new RGBA(0, 0, 0, 0.2f));
                masterDateTimeAxis.addPlotBand(plotBandBefore);

                masterDateTimeAxis.removePlotBand("mask-after");
                DateTimePlotBand plotBandAfter = new DateTimePlotBand(
                        "mask-after");
                plotBandAfter.setRange(new DateTimeRange(new Date((long) max),
                        masterChartMaxDate));
                plotBandAfter.setColor(new RGBA(0, 0, 0, 0.2f));
                masterDateTimeAxis.addPlotBand(plotBandAfter);
                masterChart.refresh();
            }
View Full Code Here

Examples of com.invient.vaadin.charts.InvientChartsConfig.AxisBase.DateTimePlotBand.DateTimeRange

        DateTimeAxis xAxis = new DateTimeAxis();
        xAxis.setShowLastLabel(true);
        xAxis.setMaxZoom(14 * 24 * 3600000);
        DateTimePlotBand plotBand = new DateTimePlotBand("mask-before");
        plotBand.setRange(new DateTimeRange(masterChartMinDate,
                detailChartPointStartDate));
        plotBand.setColor(new RGBA(0, 0, 0, 0.2f));
        xAxis.addPlotBand(plotBand);
        xAxis.setTitle(new AxisTitle(""));

View Full Code Here

Examples of org.hibernate.examples.model.DateTimeRange

        JodaDateTimeEntity entity = new JodaDateTimeEntity();

        entity.setStart(DateTime.now().withTimeAtStartOfDay());
        entity.setEnd(entity.getStart().plusDays(1));

        entity.setRange1(new DateTimeRange(entity.getStart(), entity.getEnd()));
        entity.setRange2(new DateTimeRange(entity.getStart().plusDays(1), entity.getEnd().plusDays(1)));

        em.persist(entity);
        em.flush();
        em.clear();
View Full Code Here

Examples of org.rometools.feed.module.base.types.DateTimeRange

        while(it.hasNext()) {
            CustomTag tag = (CustomTag)it.next();

            if(tag.getValue() instanceof DateTimeRange) {
                DateTimeRange dtr = (DateTimeRange)tag.getValue();
                Element newTag = new Element(tag.getName(),CustomTagParser.NS);
                newTag.setAttribute("type","dateTimeRange");
                newTag.addContent(this.generateSimpleElement("start",GoogleBaseParser.LONG_DT_FMT.format(dtr.getStart())));
                newTag.addContent(this.generateSimpleElement("end",GoogleBaseParser.LONG_DT_FMT.format(dtr.getEnd())));
                element.addContent(newTag);
            } else if(tag.getValue() instanceof ShortDate) {
                ShortDate sd = (ShortDate)tag.getValue();
                Element newTag = this.generateSimpleElement(tag.getName(),GoogleBaseParser.SHORT_DT_FMT.format(sd));
                newTag.setAttribute("type","date");
View Full Code Here

Examples of org.rometools.feed.module.base.types.DateTimeRange

        } else if((pd.getPropertyType() == IntUnit.class)||(pd.getPropertyType().getComponentType() == IntUnit.class)) {
            tagValue = new IntUnit(tag.getText());
        } else if((pd.getPropertyType() == FloatUnit.class)||(pd.getPropertyType().getComponentType() == FloatUnit.class)) {
            tagValue = new FloatUnit(tag.getText());
        } else if((pd.getPropertyType() == DateTimeRange.class)||(pd.getPropertyType().getComponentType() == DateTimeRange.class)) {
            tagValue = new DateTimeRange(LONG_DT_FMT.parse(tag.getChild("start",GoogleBaseParser.NS).getText().trim()),LONG_DT_FMT.parse(tag.getChild("end",GoogleBaseParser.NS).getText().trim()));
        } else if((pd.getPropertyType() == ShippingType.class)||(pd.getPropertyType().getComponentType() == ShippingType.class)) {
            FloatUnit price = new FloatUnit(tag.getChild("price",GoogleBaseParser.NS).getText().trim());
            ShippingType.ServiceEnumeration service = ShippingType.ServiceEnumeration.findByValue(tag.getChild("service",GoogleBaseParser.NS).getText().trim());

            if(service == null) {
View Full Code Here

Examples of org.rometools.feed.module.base.types.DateTimeRange

     
      element.addContent(this.generateSimpleElement("price",st.getPrice().toString()));
     
      return element;
  } else if(o instanceof DateTimeRange) {
      DateTimeRange dtr = (DateTimeRange)o;
      Element element = new Element(tagName,GoogleBaseGenerator.NS);
      element.addContent(this.generateSimpleElement("start",GoogleBaseParser.LONG_DT_FMT.format(dtr.getStart())));
      element.addContent(this.generateSimpleElement("end",GoogleBaseParser.LONG_DT_FMT.format(dtr.getEnd())));
     
      return element;
  }
 
  throw new RuntimeException("Unknown class type to handle: " + o.getClass().getName());
View Full Code Here

Examples of org.rometools.feed.module.base.types.DateTimeRange

      } catch(ParseException e){
          log.log( Level.WARNING, "Unable to parse date type on "+child.getName(), e );
      }
        } else if( type.equals( "dateTimeRange") ){
      try{
          tags.add( new CustomTagImpl( child.getName(), new DateTimeRange(GoogleBaseParser.LONG_DT_FMT.parse(child.getChild("start",CustomTagParser.NS).getText().trim()),GoogleBaseParser.LONG_DT_FMT.parse(child.getChild("end",CustomTagParser.NS).getText().trim()))));
      } catch(Exception e){
          log.log( Level.WARNING, "Unable to parse date type on "+child.getName(), e );
      }
        } else if( type.equals( "url") ){
      try{
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.