Examples of Timetable


Examples of model.Timetable

 
 
  @Test
  public void searchScheduleByLineAndStation()
  {
    Timetable timetable1 = new Timetable();
   
    Line line1 = new Line();
    Station station1 = new Station();
   
    timetable1.setLine(line1);
    timetable1.setStation(station1);
    map.getTimetables().add(timetable1);
   
    assertEquals(1, map.searchSchedule(line1, station1).size());
   
    Timetable timetable2 = new Timetable();
    Line line2 = new Line();
    Station station2 = new Station();
   
    timetable2.setLine(line2);
    timetable2.setStation(station2);
    map.getTimetables().add(timetable2);
   
    Timetable timetable3 = new Timetable();
    Line line3 = new Line();
    Station station3 = new Station();
   
    timetable3.setLine(line3);
    timetable3.setStation(station3);
    map.getTimetables().add(timetable3);
   
    assertEquals(1, map.searchSchedule(line1, station1).size());
   
    Timetable timetable4 = new Timetable();
    timetable4.setLine(line3);
    timetable4.setStation(station3);
    map.getTimetables().add(timetable4);
   
    assertEquals(2, map.searchSchedule(line3, station3).size());
  }
View Full Code Here

Examples of model.Timetable

  }
 
  @Test
  public void searchScheduleByStation()
  {
    Timetable timetable1 = new Timetable()
    Line line1 = new Line();
    Station station1 = new Station();
   
    timetable1.setLine(line1);
    timetable1.setStation(station1);
    map.getTimetables().add(timetable1);
   
    assertEquals(1, map.searchSchedule(station1).size());
   
    Timetable timetable2 = new Timetable();
    Line line2 = new Line();
    Station station2 = new Station();
   
    timetable2.setLine(line2);
    timetable2.setStation(station2);
    map.getTimetables().add(timetable2);
   
    Timetable timetable3 = new Timetable();
    Line line3 = new Line();
    Station station3 = new Station();
   
    timetable3.setLine(line3);
    timetable3.setStation(station3);
    map.getTimetables().add(timetable3);
   
    assertEquals(1, map.searchSchedule(station1).size());
   
    Timetable timetable4 = new Timetable();
    timetable4.setLine(line3);
    timetable4.setStation(station3);
    map.getTimetables().add(timetable4);
   
    assertEquals(2, map.searchSchedule(station3).size());
  }
View Full Code Here

Examples of model.Timetable

  Timetable timetable;
 
  @Before
  public void init()
  {
    timetable = new Timetable();
  }
View Full Code Here

Examples of model.Timetable

   *
   * @param controller le controlleur principal du logiciel
   */
  public DeleteTimetables(Controller controller) {
    super();
    this.temp = new Timetable();
    this.temp2 = new Timetable();
    this.controller = controller;
  }
View Full Code Here

Examples of model.Timetable

      if(temp==null)
      {
        errorPopup("noTimetable");
        return;
      }
      temp=new Timetable(temp);
     
      //Récupère la position de la timetable dans la liste de timetables
      positionInList=controller.positionInListTimetable(temp);
     
      deletePopup();
View Full Code Here

Examples of model.Timetable

   *
   * @param controller le controlleur principal du logiciel
   */
  public AlterTimetable(Controller controller) {
    super();
    this.temp = new Timetable();
    this.temp2 = new Timetable();
    this.controller = controller;
  }
View Full Code Here

Examples of model.Timetable

   * @param temp une timetable existante
   */
  public AlterTimetable(Controller controller, Timetable temp) {
    super();
    this.temp = temp;
    this.temp2 = new Timetable();
    this.controller = controller;
  }
View Full Code Here

Examples of model.Timetable

    if(temp==null)
    {
      errorPopup("noTimetable");
      return;
    }
    temp=new Timetable(temp);
   
    //Récupère la position de la timetable dans la liste de timetables
    positionInList=controller.positionInListTimetable(temp);
    int numberOfPasses = temp.getPeriods().get(numberPeriod).getPasses().size();
   
View Full Code Here

Examples of model.Timetable

   *
   * @param controller le controlleur principal du logiciel
   */
  public InsertTimetable(Controller controller) {
    super();
    this.temp=new Timetable();
    this.controller=controller;
  }
View Full Code Here

Examples of org.openfaces.component.timetable.Timetable

public class TimetableRenderer extends TimetableRendererBase {

    @Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        ResponseWriter writer = context.getResponseWriter();
        Timetable timetable = (Timetable) component;

        if (!component.isRendered())
            return;

        Rendering.registerDateTimeFormatObject(timetable.getLocale());
        AjaxUtil.prepareComponentForAjax(context, timetable);

        timetable.setEvent(null);
        String clientId = timetable.getClientId(context);
        writer.startElement("table", timetable);
        writer.writeAttribute("id", clientId, "id");
        writer.writeAttribute("cellspacing", "0", null);
        writer.writeAttribute("cellpadding", "0", null);
        writer.writeAttribute("border", "0", null);
        writer.writeAttribute("class", Styles.getCSSClass(context,
                timetable, timetable.getStyle(), "o_timetableView", timetable.getStyleClass()), null);
        Rendering.writeStandardEvents(writer, timetable);
        writer.startElement("tbody", timetable);

        renderHeader(context, timetable);

        writer.startElement("tr", timetable);
        writer.writeAttribute("class", "o_timetableView_tableRow", null);
        writer.startElement("td", timetable);
        writer.writeAttribute("style", "height: 100%", null);

        LayeredPane layeredPane = getLayeredPane(timetable);
        layeredPane.encodeAll(context);

        List<String> viewIds = new ArrayList<String>();
        for (UIComponent c : layeredPane.getChildren()) {
            SubPanel subPanel = (SubPanel) c;
            if (subPanel.getChildCount() != 1) throw new IllegalStateException();
            VirtualContainer container = (VirtualContainer) subPanel.getChildren().get(0);
            TimetableView timetableView = (TimetableView) container.getVirtualChild();
            String viewId = timetableView.getClientId(context);
            viewIds.add(viewId);
        }

        Rendering.renderInitScript(context, new ScriptBuilder().initScript(context, timetable, "O$.Timetable._init",
                layeredPane,
                viewIds,
                timetable.getViewType(),
                Rendering.getEventsParam(timetable, "onviewtypechange")

        ), getTimetableJsURL(context));

        writer.endElement("td");
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.