2015-06-01 09:35:51 +00:00
|
|
|
package com.bytezone.diskbrowser.gui;
|
|
|
|
|
|
|
|
import java.awt.event.ActionEvent;
|
|
|
|
import java.awt.event.KeyEvent;
|
|
|
|
|
|
|
|
import javax.swing.Action;
|
|
|
|
import javax.swing.KeyStroke;
|
|
|
|
|
|
|
|
import com.bytezone.common.DefaultAction;
|
|
|
|
|
|
|
|
class RefreshTreeAction extends DefaultAction
|
|
|
|
{
|
|
|
|
CatalogPanel owner;
|
|
|
|
|
|
|
|
public RefreshTreeAction (CatalogPanel owner)
|
|
|
|
{
|
|
|
|
super ("Refresh current tree", "Makes newly added/modified disks available",
|
2019-03-05 07:08:34 +00:00
|
|
|
"/com/bytezone/diskbrowser/icons/");
|
|
|
|
// putValue (Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke ("alt R"));
|
2015-06-01 09:35:51 +00:00
|
|
|
putValue (Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke (KeyEvent.VK_F5, 0));
|
2019-03-05 07:08:34 +00:00
|
|
|
// putValue (Action.MNEMONIC_KEY, KeyEvent.VK_R);
|
2015-06-01 09:35:51 +00:00
|
|
|
putValue (Action.MNEMONIC_KEY, KeyEvent.VK_F5);
|
|
|
|
this.owner = owner;
|
|
|
|
|
|
|
|
setIcon (Action.SMALL_ICON, "arrow_refresh.png");
|
|
|
|
setIcon (Action.LARGE_ICON_KEY, "arrow_refresh_32.png");
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void actionPerformed (ActionEvent e)
|
|
|
|
{
|
|
|
|
owner.refreshTree ();
|
|
|
|
}
|
|
|
|
}
|