public void setList(MiTable list) { if (this.list != null) this.list.removeActionHandlers(this); this.list = list; list.appendActionHandler(this, Mi_ITEM_SELECTED_ACTION); list.setMinimumNumberOfVisibleRows(3); list.setPreferredNumberOfVisibleRows(7); list.setInsetMargins(0); MiToolkit.setBackgroundAttributes( list.getContentsBackground(), MiToolkit.Mi_TOOLKIT_UNEDITABLE_BG_ATTRIBUTES); list.getSelectionManager().setMinimumNumberSelected(1); // Do not allow interactive resizing of scrolled list cause not usefull and // when menu pops down the TableHeaderAndFooterManager is left grabbing the window list.getTableHeaderAndFooterManager().setEnabled(false); scrolledBox = new MiScrolledBox(list); scrolledBox.setInsetMargins(0); if (menu != null) menu.removeActionHandlers(this); menu = new MiMenu(scrolledBox); menu.setInsetMargins(2); menu.insertActionHandler(this, Mi_VISIBLE_ACTION, 0); menuLauncherButton.setMenu(menu); }