/** * Initializes this popup menu. */ private void init() { super.removeAll(); scrollPane = new JScrollPane(); scrollPane.setViewportView(menuPanel); scrollPane.setBorder(null); int minWidth = resources.getInteger("ScrollPane.minWidth"); int minHeight = resources.getInteger("ScrollPane.minHeight"); int maxWidth = resources.getInteger("ScrollPane.maxWidth"); int maxHeight = resources.getInteger("ScrollPane.maxHeight"); scrollPane.setMinimumSize(new Dimension(minWidth, minHeight)); scrollPane.setMaximumSize(new Dimension(maxWidth, maxHeight)); scrollPane.setHorizontalScrollBarPolicy (ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); add(scrollPane, BorderLayout.CENTER); addFooter(new DefaultScrollablePopupMenuItem(this, "")); }
/** * Initializes this popup menu. */ private void init() { super.removeAll(); scrollPane = new JScrollPane(); scrollPane.setViewportView(menuPanel); scrollPane.setBorder(null); int minWidth = resources.getInteger("ScrollPane.minWidth"); int minHeight = resources.getInteger("ScrollPane.minHeight"); int maxWidth = resources.getInteger("ScrollPane.maxWidth"); int maxHeight = resources.getInteger("ScrollPane.maxHeight"); scrollPane.setMinimumSize(new Dimension(minWidth, minHeight)); scrollPane.setMaximumSize(new Dimension(maxWidth, maxHeight)); scrollPane.setHorizontalScrollBarPolicy (ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); add(scrollPane, BorderLayout.CENTER); addFooter(new DefaultScrollablePopupMenuItem(this, "")); }
/** * Creates the ScrollablePopupMenuItem with the specific name. * * @param itemName * the name of the item * @return the item */ public ScrollablePopupMenuItem createItem(String itemName) { return new DefaultScrollablePopupMenuItem(parent, itemName); }
/** * Creates the ScrollablePopupMenuItem with the specific name. * * @param itemName * the name of the item * @return the item */ public ScrollablePopupMenuItem createItem(String itemName) { return new DefaultScrollablePopupMenuItem(parent, itemName); }