sectionStack.setCanReorderSections(true);
sectionStack.setCanResizeSections(false);
sectionStack.setSize("300px", "100%");
// LayerTree layout:
SectionStackSection section2 = new SectionStackSection("Layer tree with legend");
section2.setExpanded(true);
layerTree = new LayerTreeWithLegend(map);
section2.addItem(layerTree);
sectionStack.addSection(section2);
// Putting the right side layouts together:
layout.addMember(sectionStack);
// ---------------------------------------------------------------------
// Create the right-side (overview map, layer-tree, legend):
// ---------------------------------------------------------------------
final SectionStack originalSectionStack = new SectionStack();
originalSectionStack.setShowEdges(true);
originalSectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
originalSectionStack.setCanReorderSections(true);
originalSectionStack.setCanResizeSections(false);
originalSectionStack.setSize("250px", "100%");
// Overview map layout:
SectionStackSection osection1 = new SectionStackSection("Overview map");
osection1.setExpanded(true);
overviewMap = new OverviewMap("mapOverview", "app", map, false, true);
osection1.addItem(overviewMap);
originalSectionStack.addSection(osection1);
// LayerTree layout:
SectionStackSection osection2 = new SectionStackSection("Layer tree");
osection2.setExpanded(true);
LayerTree lt = new LayerTree(map);
osection2.addItem(lt);
originalSectionStack.addSection(osection2);
// Legend layout:
SectionStackSection osection3 = new SectionStackSection("Legend");
osection3.setExpanded(true);
Legend l = new Legend(map.getMapModel());
osection3.addItem(l);
originalSectionStack.addSection(osection3);
// Putting the right side layouts together:
layout.addMember(originalSectionStack);