/** * Reassigns the set of canvases that this explorer controls. Though the collection of canvas mnay * be empty, it may not be null. * * @param items * @requires items != null && for each element in item, element!= null */ public void setDrawersCard(List<? extends Canvas> items) { drawerCards.clear(); menu.removeAll(); List<JComponent> buttons = new ArrayList<JComponent>(); for (int i = 0; i < items.size(); i++) { TabCard card = new TabCard(i, items.get(i), this, scrollable); drawerCards.add(card); buttons.add(card.getButton()); card.getButton().setPreferredSize(new Dimension(125, BUTTON_HEIGHT)); menu.add(card.getMenuItem()); } wheeler.setElements(buttons); this.selectCanvas(0); }