mSearchBar = b.getPanel();
mSearchBar.addComponentListener(this);
mSearchBar.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, mSearchBar.getBackground().darker()));
mSearchCloseBtn = new JButton(IconLoader.getInstance()
.getIconFromTheme("actions", "process-stop", 16));
mSearchCloseBtn.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
mSearchCloseBtn.setPressedIcon(IconLoader.getInstance().getIconFromTheme(
"actions", "close-pressed", 16));
mSearchCloseBtn.setToolTipText(mLocalizer.msg("closeToolTip",
"Close Find bar"));
mSearchCloseBtn.setContentAreaFilled(false);
mSearchCloseBtn.setFocusable(false);
MouseListener[] ml = mSearchCloseBtn.getMouseListeners();
for(int i = 0; i < ml.length; i++) {
if(!(ml[i] instanceof ToolTipManager)) {
mSearchCloseBtn.removeMouseListener(ml[i]);
}
}
final JTextField searchField = getSearchField();
mFindNext = new JButton(mLocalizer.msg("next", "Find Next"));
mFindNext.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
mFindNext.setIcon(TVBrowserIcons.down(TVBrowserIcons.SIZE_SMALL));
mFindNext.setContentAreaFilled(false);
mFindNext.setFocusable(false);
mFindNext.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
next();
}
});
mFindPrev = new JButton(mLocalizer.msg("prev", "Find Previous"));
mFindPrev.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
mFindPrev.setIcon(TVBrowserIcons.up(TVBrowserIcons.SIZE_SMALL));
mFindPrev.setContentAreaFilled(false);
mFindPrev.setFocusable(false);
mFindPrev.addActionListener(new ActionListener() {