Container cnt = new Container(new BoxLayout(BoxLayout.Y_AXIS)); cnt.setScrollableY(true); cnt.setPreferredSize(new Dimension((int)(Display.getInstance().getDisplayWidth()*.25), 1)); if (mapCurrentHomes.size() == 0) cnt.add(new Label("No homes in range")); for (dbHome h : mapCurrentHomes.values()) { MultiButton mb = new MultiButton(h.getName()); mb.setHorizontalLayout(false); mb.setTextLine2(h.getContact(1)); mb.setTextLine3(h.getPhone()); mb.addActionListener(ev -> onClickList(h.getId()));
cnt.add(mb); } this.add(BorderLayout.EAST, cnt);
TitleBar has 3 buttons, on of which is "Show List"BorderLayout.CENTER is MapContainerBorderLayout.WEST is properties panelBorderLayout.EAST is container with list of multi buttons
(BTW, it is slightly different in portrait...i use BorderLayout.SOUTH for the list of multi buttons)
The map will have N number of markers based upon a user query. Normally the map is 100% of the screen. If the user so desires, they tap on the "show list" command which will make the list visible so they can quickly see brief information. Tapping on a marker brings up the properties for that particular item. If the properties panel is already visible it just fills the fields, otherwise it creates one. Tapping on the X in the properties panel hides it. The map and list and properties panel must all remain functional while one or all of the panels are visible.
Container cnt = new Container(layout) { @Override protected Dimension calcPreferredSize() { return new Dimension( (int)(Display.getInstance().getDisplayWidth()*.2), 75); } };