protected ActionMap getActionMap() { return myList.getActionMap(); }
protected JComponent createContent() { myMouseMotionListener = new MyMouseMotionListener(); myMouseListener = new MyMouseListener(); myListModel = new ListPopupModel(this, getSpeedSearch(), getListStep()); myList = new MyList(); if (myStep.getTitle() != null) { myList.getAccessibleContext().setAccessibleName(myStep.getTitle()); } myList.setSelectionMode( isMultiSelectionEnabled() ? ListSelectionModel.MULTIPLE_INTERVAL_SELECTION : ListSelectionModel.SINGLE_SELECTION); myList.setSelectedIndex(0); Insets padding = UIUtil.getListViewportPadding(); myList.setBorder(new EmptyBorder(padding)); ListScrollingUtil.installActions(myList); myList.setCellRenderer(getListElementRenderer()); myList.getActionMap().get("selectNextColumn").setEnabled(false); myList.getActionMap().get("selectPreviousColumn").setEnabled(false); registerAction( "handleSelection1", KeyEvent.VK_ENTER, 0, new AbstractAction() { public void actionPerformed(ActionEvent e) { handleSelect(true); } }); registerAction( "handleSelection2", KeyEvent.VK_RIGHT, 0, new AbstractAction() { public void actionPerformed(ActionEvent e) { handleSelect(false); } }); registerAction( "goBack2", KeyEvent.VK_LEFT, 0, new AbstractAction() { public void actionPerformed(ActionEvent e) { if (isClosableByLeftArrow()) { goBack(); } } }); myList.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); return myList; }