Examples of sortFurniture()


Examples of com.eteks.sweethome3d.viewcontroller.FurnitureController.sortFurniture()

    FurnitureController furnitureController =
        new FurnitureController(home, preferences, new SwingViewFactory());
    FurnitureTable table = (FurnitureTable)furnitureController.getView();
   
    // 3. Sort furniture table in alphabetical order of furniture name
    furnitureController.sortFurniture(HomePieceOfFurniture.SortableProperty.NAME);
    // Check the alphabetical order of table data
    assertFurnitureIsSortedByName(table, true);
   
    // 4. Sort in descending order and check order
    furnitureController.sortFurniture(HomePieceOfFurniture.SortableProperty.NAME);

Examples of com.eteks.sweethome3d.viewcontroller.FurnitureController.sortFurniture()

    furnitureController.sortFurniture(HomePieceOfFurniture.SortableProperty.NAME);
    // Check the alphabetical order of table data
    assertFurnitureIsSortedByName(table, true);
   
    // 4. Sort in descending order and check order
    furnitureController.sortFurniture(HomePieceOfFurniture.SortableProperty.NAME);
    // Check table data is sorted in alphabetical descending order
    assertFurnitureIsSortedByName(table, false);
   
    // 5. Change first furniture name
    HomePieceOfFurniture firstPiece = home.getFurniture().get(0);

Examples of com.eteks.sweethome3d.viewcontroller.FurnitureController.sortFurniture()

    // Check one row was added in table
    assertEquals("Wrong furniture count in home", homeFurnitureCount + 2, home.getFurniture().size());
    assertEquals("Wrong row count in table", tableFilterRowCount + 1, table.getRowCount());
   
    // 5. Test sort and filter internal buffer of the table
    furnitureController.sortFurniture(HomePieceOfFurniture.SortableProperty.NAME);
    // Check the alphabetical order of table data
    assertFurnitureIsSortedByName(table, true);
    // Add a door or window and an other kind of piece to home
    home.addPieceOfFurniture(new HomePieceOfFurniture(doorOrWindowPiece));
    home.addPieceOfFurniture(new HomePieceOfFurniture(otherPiece));
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.