throw new RuntimeException("Couldn't initialize NavigationButtons", e);
}
}
public NavigationPane(final FolderBrowserPane browser) {
final JButton btnBack = new CoolButton(/*CoolButton.ButtonStyle.LEFT*/);
final JButton btnForward = new CoolButton(/*CoolButton.ButtonStyle.RIGHT*/);
final MenuButton btnPath = browser.getPathPopupMenu();
btnBack.setIcon(ImgBack);
btnBack.setToolTipText(LOCALE.get("BackToolTip"));
btnBack.setEnabled(false);
btnForward.setIcon(ImgFwd);
btnForward.setToolTipText(LOCALE.get("ForwardToolTip"));
btnForward.setEnabled(false);
btnPath.setIcon(imgPath);
// btnPath.putClientProperty(SubstanceLookAndFeel.FLAT_PROPERTY, Boolean.FALSE);
btnPath.setToolTipText(LOCALE.get("PathToolTip"));
btnBack.addActionListener(
new ActionListener() {
public void actionPerformed(ActionEvent e) {
browser.goBack();
}
}
);
btnForward.addActionListener(
new ActionListener() {
public void actionPerformed(ActionEvent e) {
browser.goForward();
}
}
);
browser.addSelectionListener(
new FolderTreeListener() {
public void folderSelectionChanged(File folder) {
btnBack.setEnabled(browser.isBackAvailable());
btnForward.setEnabled(browser.isForwardAvailable());
}
public void folderDropAccepted(List<File> files, File folder) {
}
}
);