@Test public void testPack() throws Exception { Tree<DisplayNode> expected = new Tree<>(new DisplayNode(new File("root"), new Rect(0, 0, 800, 300)), ImmutableSortedSet.of( new Tree<>(new DisplayNode(new File("root/12byteFile.txt"), new Rect(5, 5, 400, 295)), EMPTY_DISPLAY), new Tree<>(new DisplayNode(new File("root/dir1"), new Rect(400, 5, 795, 295)), ImmutableSortedSet.of( new Tree<>(new DisplayNode(new File("root/dir1/6byteFile.txt"), new Rect(404, 9, 597, 291)), EMPTY_DISPLAY), new Tree<>(new DisplayNode(new File("root/dir1/dir2"), new Rect(597, 9, 791, 291)), ImmutableSortedSet.of( new Tree<>(new DisplayNode(new File("root/dir1/dir2/3byteFile.txt"), new Rect(600, 12, 788, 150)), EMPTY_DISPLAY), new Tree<>(new DisplayNode(new File("root/dir1/dir2/3byteFile2.txt"), new Rect(600, 150, 788, 288)), EMPTY_DISPLAY))))))); Tree<DisplayNode> actual = SquarifiedPacking.pack(TestTrees.FS_SUMMARY_TREE, new Rect(0, 0, 800, 300)); assertEquals(expected, actual); }
@Nonnull public static Tree<DisplayNode> pack(@Nonnull Tree<FilesystemSummary> summaryTree, @Nonnull Rect bounds) { return pack(summaryTree, bounds, 0); }
SquarifiedPacking { @Nonnull public static Tree<DisplayNode> pack(@Nonnull Tree<FilesystemSummary> summaryTree, @Nonnull Rect bounds) { return pack(summaryTree, bounds, 0); } }
SquarifiedPacking { @Nonnull public static Tree<DisplayNode> pack(@Nonnull Tree<FilesystemSummary> summaryTree, @Nonnull Rect bounds) { return pack(summaryTree, bounds, 0); }  }
SquarifiedPacking { @Nonnull public static Tree<DisplayNode> pack(@Nonnull Tree<FilesystemSummary> summaryTree, @Nonnull Rect bounds) { return pack(summaryTree, bounds, 0); }  @Nonnull static Tree<DisplayNode> pack(@Nonnull Tree<FilesystemSummary> summaryTree, @Nonnull Rect bounds); }
SquarifiedPacking { @Nonnull public static Tree<DisplayNode> pack(@Nonnull Tree<FilesystemSummary> summaryTree, @Nonnull Rect bounds) { return pack(summaryTree, bounds, 0); }  @Nonnull static Tree<DisplayNode> pack(@Nonnull Tree<FilesystemSummary> summaryTree, @Nonnull Rect bounds); static final int MAX_PADDING; }