/** * Constructor. * * @param parent The parent window containing <code>textArea</code>. * @param textArea The text area to paste into. */ ClipboardHistoryPopup(Window parent, RTextArea textArea) { super(parent); this.textArea = textArea; JPanel cp = new JPanel(new BorderLayout()); cp.setBorder(BorderFactory.createCompoundBorder( org.fife.ui.rsyntaxtextarea.focusabletip.TipUtil.getToolTipBorder(), BorderFactory.createEmptyBorder(2, 5, 5, 5))); cp.setBackground(org.fife.ui.rsyntaxtextarea.focusabletip.TipUtil.getToolTipBackground()); setContentPane(cp); ResourceBundle msg = ResourceBundle.getBundle(MSG); JLabel title = new JLabel( msg.getString("Action.ClipboardHistory.Popup.Label")); cp.add(title, BorderLayout.NORTH); list = new ChoiceList(); JScrollPane sp = new JScrollPane(list); sp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); cp.add(sp); installKeyBindings(); listener = new Listener(); setLocation(); }
/** * Constructor. * * @param parent The parent window containing <code>textArea</code>. * @param textArea The text area to paste into. */ ClipboardHistoryPopup(Window parent, RTextArea textArea) { super(parent); this.textArea = textArea; JPanel cp = new JPanel(new BorderLayout()); cp.setBorder(BorderFactory.createCompoundBorder( org.fife.ui.rsyntaxtextarea.focusabletip.TipUtil.getToolTipBorder(), BorderFactory.createEmptyBorder(2, 5, 5, 5))); cp.setBackground(org.fife.ui.rsyntaxtextarea.focusabletip.TipUtil.getToolTipBackground()); setContentPane(cp); ResourceBundle msg = ResourceBundle.getBundle(MSG); JLabel title = new JLabel( msg.getString("Action.ClipboardHistory.Popup.Label")); cp.add(title, BorderLayout.NORTH); list = new ChoiceList(); JScrollPane sp = new JScrollPane(list); sp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); cp.add(sp); installKeyBindings(); listener = new Listener(); setLocation(); }