topBar.addFill();
topBar.addMember(new LocaleSelect("English"));
mainLayout.addMember(topBar);
HLayout layout = new HLayout();
layout.setWidth100();
layout.setHeight100();
layout.setMembersMargin(5);
layout.setMargin(5);
// ---------------------------------------------------------------------
// Create the left-side (map and tabs):
// ---------------------------------------------------------------------
final MapWidget map = new MapWidget("mapMain", "app");
final Toolbar toolbar = new Toolbar(map);
toolbar.setButtonSize(Toolbar.BUTTON_SIZE_BIG);
VLayout mapLayout = new VLayout();
mapLayout.setShowResizeBar(true);
mapLayout.setResizeBarTarget("tabs");
mapLayout.addMember(toolbar);
mapLayout.addMember(map);
mapLayout.setHeight("65%");
tabSet.setTabBarPosition(Side.TOP);
tabSet.setWidth100();
tabSet.setHeight("35%");
tabSet.setID("tabs");
VLayout leftLayout = new VLayout();
leftLayout.setShowEdges(true);
leftLayout.addMember(mapLayout);
leftLayout.addMember(tabSet);
layout.addMember(leftLayout);
// ---------------------------------------------------------------------
// Create the right-side (overview map, layer-tree, legend):
// ---------------------------------------------------------------------
final SectionStack sectionStack = new SectionStack();
sectionStack.setShowEdges(true);
sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
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);
// ---------------------------------------------------------------------
// Bottom left: Add tabs here:
// ---------------------------------------------------------------------
FeatureListGridPage page1 = new FeatureListGridPage(map);