Package com.vaadin.addon.timeline

Examples of com.vaadin.addon.timeline.Timeline


    panel.setWidth("660px");
    panel.setHeight("375px");
    panel.setCaption("Synthèse du Mois");

    Timeline timeline = new Timeline(title);
    timeline.setWidth("100%");

    // create the data sources
    Container.Indexed graphDataSource = createGraphDataSource();
    Container.Indexed markerDataSource = createmarkerDataSource();
    final Container.Indexed eventDataSource = createEventDateSource();

    // add our data sources
    timeline.addGraphDataSource(graphDataSource,
        Timeline.PropertyId.TIMESTAMP, Timeline.PropertyId.VALUE);
    timeline.setMarkerDataSource(markerDataSource,
        Timeline.PropertyId.TIMESTAMP, Timeline.PropertyId.CAPTION,
        Timeline.PropertyId.VALUE);
    timeline.setEventDataSource(eventDataSource,
        Timeline.PropertyId.TIMESTAMP, Timeline.PropertyId.CAPTION);

    timeline.setGraphLegend(graphDataSource, "dimension x");
    timeline.setGraphOutlineColor(graphDataSource, Color.BLUE);
    timeline.setBrowserFillColor(graphDataSource, new Color(255, 0, 0, 128));
    timeline.setGraphOutlineThickness(2.0);

    timeline.setBrowserOutlineColor(graphDataSource, Color.BLACK);
    timeline.setBrowserFillColor(graphDataSource, new Color(0, 0, 0, 128));

    // adding a listener
    timeline.addListener(new Timeline.EventClickListener() {

      @Override
      public void eventClick(EventButtonClickEvent event) {
        Item item = eventDataSource.getItem(event.getItemIds()
            .iterator().next());
View Full Code Here


    panel.setWidth("660px");
    panel.setHeight("375px");
   
    panel.setCaption("Synthèse de l'année");
   
    Timeline timeline = new Timeline(title);
    timeline.setWidth("100%");
   
    //create the data sources
    Container.Indexed graphDataSource = createGraphDataSource();
    Container.Indexed markerDataSource = createmarkerDataSource();
    final Container.Indexed eventDataSource = createEventDateSource();
   
    //add our data sources
    timeline.addGraphDataSource(graphDataSource, Timeline.PropertyId.TIMESTAMP, Timeline.PropertyId.VALUE);
    timeline.setMarkerDataSource(markerDataSource, Timeline.PropertyId.TIMESTAMP, Timeline.PropertyId.CAPTION, Timeline.PropertyId.VALUE);
    timeline.setEventDataSource(eventDataSource, Timeline.PropertyId.TIMESTAMP, Timeline.PropertyId.CAPTION);
   
    timeline.setGraphLegend(graphDataSource, "dimension y");
    timeline.setGraphOutlineColor(graphDataSource, Color.GREEN);
    timeline.setBrowserFillColor(graphDataSource, new Color(255,0,0,128));
    timeline.setGraphOutlineThickness(2.0);
   
    timeline.setBrowserOutlineColor(graphDataSource, Color.BLACK);
    timeline.setBrowserFillColor(graphDataSource, new Color(0,0,0,128));
   
    //adding a listener
    timeline.addListener(new Timeline.EventClickListener(){

      @Override
      public void eventClick(EventButtonClickEvent event) {
        Item item = eventDataSource.getItem(event.getItemIds().iterator().next());
        Date sunday = (Date) item.getItemProperty(Timeline.PropertyId.TIMESTAMP).getValue();
View Full Code Here

TOP

Related Classes of com.vaadin.addon.timeline.Timeline

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.